Mercurial > audlegacy
annotate src/audacious/ui_preferences.c @ 4000:a0bb67450552
more code duplication removal
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Sat, 24 Nov 2007 19:07:07 +0100 |
parents | fa3d61ea0a6e |
children | 733820bc7744 |
rev | line source |
---|---|
2313 | 1 /* Audacious - Cross-platform multimedia player |
2 * Copyright (C) 2005-2006 Audacious development team. | |
3 * | |
4 * BMP - Cross-platform multimedia player | |
5 * Copyright (C) 2003-2004 BMP development team. | |
6 * | |
7 * This program is free software; you can redistribute it and/or modify | |
8 * it under the terms of the GNU General Public License as published by | |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
3113
diff
changeset
|
9 * the Free Software Foundation; under version 3 of the License. |
2313 | 10 * |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
3113
diff
changeset
|
17 * along with this program. If not, see <http://www.gnu.org/licenses>. |
3123
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
18 * |
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
19 * The Audacious team does not consider modular code linking to |
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
20 * Audacious or using our public API to be a derived work. |
2313 | 21 */ |
22 | |
23 #ifdef HAVE_CONFIG_H | |
24 # include "config.h" | |
25 #endif | |
26 | |
27 #include <glib.h> | |
28 #include <glib/gi18n.h> | |
29 #include <gtk/gtk.h> | |
30 #include <string.h> | |
31 #include <stddef.h> | |
32 #include <stdio.h> | |
33 #include <sys/types.h> | |
34 #include <dirent.h> | |
35 #include <unistd.h> | |
36 #include <errno.h> | |
37 #include <sys/types.h> | |
38 #include <sys/stat.h> | |
3993 | 39 #include <gdk/gdkkeysyms.h> |
2313 | 40 |
41 #include "plugin.h" | |
42 #include "pluginenum.h" | |
43 #include "input.h" | |
44 #include "effect.h" | |
45 #include "general.h" | |
46 #include "output.h" | |
47 #include "visualization.h" | |
48 | |
49 #include "main.h" | |
2911 | 50 #include "ui_skinned_textbox.h" |
2373
ad1d7687814c
[svn] made strings.h for existing strings.c, cleanups
mf0102
parents:
2328
diff
changeset
|
51 #include "strings.h" |
2313 | 52 #include "util.h" |
53 #include "dnd.h" | |
2717 | 54 #include "configdb.h" |
2313 | 55 |
56 #include "ui_main.h" | |
57 #include "ui_playlist.h" | |
58 #include "ui_skinselector.h" | |
59 #include "ui_preferences.h" | |
2328 | 60 #include "ui_equalizer.h" |
3217 | 61 #include "ui_skinned_playlist.h" |
3221
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3217
diff
changeset
|
62 #include "ui_skinned_window.h" |
2313 | 63 |
64 #include "build_stamp.h" | |
65 | |
66 enum CategoryViewCols { | |
67 CATEGORY_VIEW_COL_ICON, | |
68 CATEGORY_VIEW_COL_NAME, | |
69 CATEGORY_VIEW_COL_ID, | |
70 CATEGORY_VIEW_N_COLS | |
71 }; | |
72 | |
73 enum PluginViewCols { | |
74 PLUGIN_VIEW_COL_ACTIVE, | |
75 PLUGIN_VIEW_COL_DESC, | |
76 PLUGIN_VIEW_COL_FILENAME, | |
77 PLUGIN_VIEW_COL_ID, | |
3439
93584d1b3e7e
Add plugin pointer to the plugin treestore.
William Pitcock <nenolod@atheme.org>
parents:
3437
diff
changeset
|
78 PLUGIN_VIEW_COL_PLUGIN_PTR, |
2313 | 79 PLUGIN_VIEW_N_COLS |
80 }; | |
81 | |
3353
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
82 enum PluginViewType { |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
83 PLUGIN_VIEW_TYPE_INPUT, |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
84 PLUGIN_VIEW_TYPE_GENERAL, |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
85 PLUGIN_VIEW_TYPE_VIS, |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
86 PLUGIN_VIEW_TYPE_EFFECT |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
87 }; |
2313 | 88 |
89 typedef struct { | |
90 const gchar *icon_path; | |
91 const gchar *name; | |
92 gint id; | |
93 } Category; | |
94 | |
95 typedef struct { | |
96 const gchar *name; | |
97 const gchar *tag; | |
98 } | |
99 TitleFieldTag; | |
100 | |
101 static GtkWidget *prefswin = NULL; | |
102 static GtkWidget *filepopup_settings = NULL; | |
103 static GtkWidget *colorize_settings = NULL; | |
104 static GtkWidget *category_treeview = NULL; | |
105 static GtkWidget *category_notebook = NULL; | |
106 GtkWidget *filepopupbutton = NULL; | |
107 | |
3989
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
108 /* colorize settings scales */ |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
109 GtkWidget *green_scale; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
110 GtkWidget *red_scale; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
111 GtkWidget *blue_scale; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
112 |
3990
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
113 /* filepopup settings widgets */ |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
114 GtkWidget *filepopup_settings_cover_name_include; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
115 GtkWidget *filepopup_settings_cover_name_exclude; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
116 GtkWidget *filepopup_settings_recurse_for_cover; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
117 GtkWidget *filepopup_settings_recurse_for_cover_depth; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
118 GtkWidget *filepopup_settings_recurse_for_cover_depth_box; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
119 GtkWidget *filepopup_settings_use_file_cover; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
120 GtkWidget *filepopup_settings_showprogressbar; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
121 GtkWidget *filepopup_settings_delay; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
122 |
3993 | 123 /* prefswin widgets */ |
124 GtkWidget *titlestring_entry; | |
125 GtkWidget *skin_view; | |
126 GtkWidget *skin_refresh_button; | |
127 GtkWidget *filepopup_for_tuple_settings_button; | |
128 | |
2313 | 129 static Category categories[] = { |
130 {DATA_DIR "/images/appearance.png", N_("Appearance"), 1}, | |
131 {DATA_DIR "/images/audio.png", N_("Audio"), 6}, | |
132 {DATA_DIR "/images/connectivity.png", N_("Connectivity"), 5}, | |
133 {DATA_DIR "/images/eq.png", N_("Equalizer"), 4}, | |
134 {DATA_DIR "/images/mouse.png", N_("Mouse"), 2}, | |
135 {DATA_DIR "/images/playlist.png", N_("Playlist"), 3}, | |
136 {DATA_DIR "/images/plugins.png", N_("Plugins"), 0}, | |
137 }; | |
138 | |
139 static gint n_categories = G_N_ELEMENTS(categories); | |
140 | |
141 static TitleFieldTag title_field_tags[] = { | |
3441
bd1a68dc9ebb
Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents:
3439
diff
changeset
|
142 { N_("Artist") , "${artist}" }, |
bd1a68dc9ebb
Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents:
3439
diff
changeset
|
143 { N_("Album") , "${album}" }, |
bd1a68dc9ebb
Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents:
3439
diff
changeset
|
144 { N_("Title") , "${title}" }, |
bd1a68dc9ebb
Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents:
3439
diff
changeset
|
145 { N_("Tracknumber"), "${track-number}" }, |
bd1a68dc9ebb
Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents:
3439
diff
changeset
|
146 { N_("Genre") , "${genre}" }, |
bd1a68dc9ebb
Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents:
3439
diff
changeset
|
147 { N_("Filename") , "${file-name}" }, |
bd1a68dc9ebb
Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents:
3439
diff
changeset
|
148 { N_("Filepath") , "${file-path}" }, |
bd1a68dc9ebb
Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents:
3439
diff
changeset
|
149 { N_("Date") , "${date}" }, |
bd1a68dc9ebb
Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents:
3439
diff
changeset
|
150 { N_("Year") , "${year}" }, |
bd1a68dc9ebb
Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents:
3439
diff
changeset
|
151 { N_("Comment") , "${comment}" }, |
bd1a68dc9ebb
Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents:
3439
diff
changeset
|
152 { N_("Codec") , "${codec}" }, |
bd1a68dc9ebb
Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents:
3439
diff
changeset
|
153 { N_("Quality") , "${quality}" }, |
2313 | 154 }; |
155 | |
156 typedef struct { | |
157 void *next; | |
158 GtkWidget *container; | |
159 char *pg_name; | |
160 char *img_url; | |
161 } CategoryQueueEntry; | |
162 | |
163 CategoryQueueEntry *category_queue = NULL; | |
164 | |
165 static const guint n_title_field_tags = G_N_ELEMENTS(title_field_tags); | |
166 | |
167 /* GLib 2.6 compatibility */ | |
168 #if (! ((GLIB_MAJOR_VERSION > 2) || ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION >= 8)))) | |
169 static const char * | |
170 g_get_host_name (void) | |
171 { | |
172 static char hostname [HOST_NAME_MAX + 1]; | |
173 if (gethostname (hostname, HOST_NAME_MAX) == -1) { | |
174 return _("localhost"); | |
175 } | |
176 return hostname; | |
177 } | |
178 #endif | |
179 | |
3991
d6ac99c2be1d
destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents:
3990
diff
changeset
|
180 static void create_colorize_settings(void); |
2313 | 181 static void prefswin_page_queue_destroy(CategoryQueueEntry *ent); |
182 | |
183 static void | |
184 change_category(GtkNotebook * notebook, | |
185 GtkTreeSelection * selection) | |
186 { | |
187 GtkTreeModel *model; | |
188 GtkTreeIter iter; | |
189 gint index; | |
190 | |
191 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
192 return; | |
193 | |
194 gtk_tree_model_get(model, &iter, CATEGORY_VIEW_COL_ID, &index, -1); | |
195 gtk_notebook_set_current_page(notebook, index); | |
196 } | |
197 | |
198 void | |
199 prefswin_set_category(gint index) | |
200 { | |
201 g_return_if_fail(index >= 0 && index < n_categories); | |
202 | |
3993 | 203 gtk_notebook_set_current_page(GTK_NOTEBOOK(category_treeview), index); |
2313 | 204 } |
205 | |
206 static void | |
207 output_plugin_open_prefs(GtkComboBox * cbox, | |
208 gpointer data) | |
209 { | |
210 output_configure(gtk_combo_box_get_active(cbox)); | |
211 } | |
212 | |
213 static void | |
214 output_plugin_open_info(GtkComboBox * cbox, | |
215 gpointer data) | |
216 { | |
217 output_about(gtk_combo_box_get_active(cbox)); | |
218 } | |
219 | |
220 static void | |
3985
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
221 plugin_toggle(GtkCellRendererToggle * cell, |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
222 const gchar * path_str, |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
223 gpointer data) |
2313 | 224 { |
225 GtkTreeModel *model = GTK_TREE_MODEL(data); | |
226 GtkTreeIter iter; | |
227 GtkTreePath *path = gtk_tree_path_new_from_string(path_str); | |
228 gint pluginnr; | |
3985
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
229 gint plugin_type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(data), "plugin_type")); |
2313 | 230 |
231 /* get toggled iter */ | |
232 gtk_tree_model_get_iter(model, &iter, path); | |
233 | |
3985
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
234 if (plugin_type == PLUGIN_VIEW_TYPE_INPUT) { |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
235 Plugin *plugin; |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
236 /*GList *diplist, *tmplist; */ |
2313 | 237 |
3985
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
238 gtk_tree_model_get(model, &iter, |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
239 PLUGIN_VIEW_COL_ID, &pluginnr, |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
240 PLUGIN_VIEW_COL_PLUGIN_PTR, &plugin, -1); |
2313 | 241 |
3985
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
242 /* do something with the value */ |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
243 plugin->enabled ^= 1; |
2313 | 244 |
3985
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
245 /* set new value */ |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
246 gtk_list_store_set(GTK_LIST_STORE(model), &iter, |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
247 PLUGIN_VIEW_COL_ACTIVE, plugin->enabled, -1); |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
248 } else { |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
249 gboolean fixed; |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
250 gtk_tree_model_get(model, &iter, |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
251 PLUGIN_VIEW_COL_ACTIVE, &fixed, |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
252 PLUGIN_VIEW_COL_ID, &pluginnr, -1); |
2313 | 253 |
3985
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
254 /* do something with the value */ |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
255 fixed ^= 1; |
2313 | 256 |
3985
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
257 switch (plugin_type) { |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
258 case PLUGIN_VIEW_TYPE_GENERAL: |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
259 enable_general_plugin(pluginnr, fixed); |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
260 break; |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
261 case PLUGIN_VIEW_TYPE_VIS: |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
262 enable_vis_plugin(pluginnr, fixed); |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
263 break; |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
264 case PLUGIN_VIEW_TYPE_EFFECT: |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
265 enable_effect_plugin(pluginnr, fixed); |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
266 break; |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
267 } |
2313 | 268 |
3985
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
269 /* set new value */ |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
270 gtk_list_store_set(GTK_LIST_STORE(model), &iter, |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
271 PLUGIN_VIEW_COL_ACTIVE, fixed, -1); |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
272 } |
2313 | 273 |
274 /* clean up */ | |
275 gtk_tree_path_free(path); | |
276 } | |
277 | |
278 static void | |
279 on_output_plugin_cbox_changed(GtkComboBox * combobox, | |
280 gpointer data) | |
281 { | |
282 gint selected; | |
283 selected = gtk_combo_box_get_active(combobox); | |
284 | |
285 set_current_output_plugin(selected); | |
286 } | |
287 | |
288 static void | |
289 on_output_plugin_cbox_realize(GtkComboBox * cbox, | |
290 gpointer data) | |
291 { | |
292 GList *olist = get_output_list(); | |
293 OutputPlugin *op, *cp = get_current_output_plugin(); | |
294 gint i = 0, selected = 0; | |
295 | |
296 if (!olist) { | |
297 gtk_widget_set_sensitive(GTK_WIDGET(cbox), FALSE); | |
298 return; | |
299 } | |
300 | |
301 for (i = 0; olist; i++, olist = g_list_next(olist)) { | |
302 op = OUTPUT_PLUGIN(olist->data); | |
303 | |
304 if (olist->data == cp) | |
305 selected = i; | |
306 | |
307 gtk_combo_box_append_text(cbox, op->description); | |
308 } | |
309 | |
310 gtk_combo_box_set_active(cbox, selected); | |
311 g_signal_connect(cbox, "changed", | |
312 G_CALLBACK(on_output_plugin_cbox_changed), NULL); | |
313 } | |
314 | |
315 static void | |
3437
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
316 on_plugin_view_realize(GtkTreeView * treeview, |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
317 GCallback callback, |
3985
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
318 gpointer data, |
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
319 gint plugin_type) |
2313 | 320 { |
321 GtkListStore *store; | |
322 GtkTreeIter iter; | |
323 | |
324 GtkCellRenderer *renderer; | |
325 GtkTreeViewColumn *column; | |
326 | |
327 GList *ilist; | |
328 gchar *description[2]; | |
329 gint id = 0; | |
330 | |
3437
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
331 GList *list = (GList *) data; |
2313 | 332 |
333 store = gtk_list_store_new(PLUGIN_VIEW_N_COLS, | |
334 G_TYPE_BOOLEAN, G_TYPE_STRING, | |
3439
93584d1b3e7e
Add plugin pointer to the plugin treestore.
William Pitcock <nenolod@atheme.org>
parents:
3437
diff
changeset
|
335 G_TYPE_STRING, G_TYPE_INT, G_TYPE_POINTER); |
3985
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
336 g_object_set_data(G_OBJECT(store), "plugin_type" , GINT_TO_POINTER(plugin_type)); |
2313 | 337 |
338 column = gtk_tree_view_column_new(); | |
339 gtk_tree_view_column_set_title(column, _("Enabled")); | |
340 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); | |
341 gtk_tree_view_column_set_spacing(column, 4); | |
342 gtk_tree_view_column_set_resizable(column, FALSE); | |
343 gtk_tree_view_column_set_fixed_width(column, 50); | |
344 | |
345 renderer = gtk_cell_renderer_toggle_new(); | |
346 g_signal_connect(renderer, "toggled", | |
3437
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
347 G_CALLBACK(callback), store); |
2313 | 348 gtk_tree_view_column_pack_start(column, renderer, TRUE); |
349 gtk_tree_view_column_set_attributes(column, renderer, "active", | |
350 PLUGIN_VIEW_COL_ACTIVE, NULL); | |
351 | |
352 gtk_tree_view_append_column(treeview, column); | |
353 | |
354 column = gtk_tree_view_column_new(); | |
355 gtk_tree_view_column_set_title(column, _("Description")); | |
356 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); | |
357 gtk_tree_view_column_set_spacing(column, 4); | |
358 gtk_tree_view_column_set_resizable(column, TRUE); | |
359 | |
360 | |
361 renderer = gtk_cell_renderer_text_new(); | |
362 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
363 gtk_tree_view_column_set_attributes(column, renderer, | |
364 "text", PLUGIN_VIEW_COL_DESC, NULL); | |
365 gtk_tree_view_append_column(treeview, column); | |
366 | |
367 column = gtk_tree_view_column_new(); | |
368 | |
369 gtk_tree_view_column_set_title(column, _("Filename")); | |
370 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); | |
371 gtk_tree_view_column_set_spacing(column, 4); | |
372 gtk_tree_view_column_set_resizable(column, TRUE); | |
373 | |
374 renderer = gtk_cell_renderer_text_new(); | |
375 gtk_tree_view_column_pack_start(column, renderer, TRUE); | |
376 gtk_tree_view_column_set_attributes(column, renderer, "text", | |
377 PLUGIN_VIEW_COL_FILENAME, NULL); | |
378 | |
379 gtk_tree_view_append_column(treeview, column); | |
380 | |
3437
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
381 MOWGLI_ITER_FOREACH(ilist, list) |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
382 { |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
383 Plugin *plugin = PLUGIN(ilist->data); |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
384 |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
385 description[0] = g_strdup(plugin->description); |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
386 description[1] = g_strdup(plugin->filename); |
2313 | 387 |
388 gtk_list_store_append(store, &iter); | |
389 gtk_list_store_set(store, &iter, | |
3437
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
390 PLUGIN_VIEW_COL_ACTIVE, plugin->enabled, |
2313 | 391 PLUGIN_VIEW_COL_DESC, description[0], |
392 PLUGIN_VIEW_COL_FILENAME, description[1], | |
3439
93584d1b3e7e
Add plugin pointer to the plugin treestore.
William Pitcock <nenolod@atheme.org>
parents:
3437
diff
changeset
|
393 PLUGIN_VIEW_COL_ID, id++, |
93584d1b3e7e
Add plugin pointer to the plugin treestore.
William Pitcock <nenolod@atheme.org>
parents:
3437
diff
changeset
|
394 PLUGIN_VIEW_COL_PLUGIN_PTR, plugin, -1); |
2313 | 395 |
396 g_free(description[1]); | |
397 g_free(description[0]); | |
398 } | |
399 | |
400 gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(store)); | |
401 } | |
402 | |
403 static void | |
3437
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
404 on_input_plugin_view_realize(GtkTreeView * treeview, |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
405 gpointer data) |
2313 | 406 { |
3985
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
407 on_plugin_view_realize(treeview, G_CALLBACK(plugin_toggle), ip_data.input_list, PLUGIN_VIEW_TYPE_INPUT); |
2313 | 408 } |
409 | |
410 static void | |
411 on_effect_plugin_view_realize(GtkTreeView * treeview, | |
412 gpointer data) | |
413 { | |
3985
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
414 on_plugin_view_realize(treeview, G_CALLBACK(plugin_toggle), ep_data.effect_list, PLUGIN_VIEW_TYPE_EFFECT); |
3437
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
415 } |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
416 |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
417 static void |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
418 on_general_plugin_view_realize(GtkTreeView * treeview, |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
419 gpointer data) |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
420 { |
3985
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
421 on_plugin_view_realize(treeview, G_CALLBACK(plugin_toggle), gp_data.general_list, PLUGIN_VIEW_TYPE_GENERAL); |
3437
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
422 } |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
423 |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
424 static void |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
425 on_vis_plugin_view_realize(GtkTreeView * treeview, |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
426 gpointer data) |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
427 { |
3985
ba5af8e85857
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3917
diff
changeset
|
428 on_plugin_view_realize(treeview, G_CALLBACK(plugin_toggle), vp_data.vis_list, PLUGIN_VIEW_TYPE_VIS); |
3437
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
429 } |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
430 |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
431 static void |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
432 editable_insert_text(GtkEditable * editable, |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
433 const gchar * text, |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
434 gint * pos) |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
435 { |
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3357
diff
changeset
|
436 gtk_editable_insert_text(editable, text, strlen(text), pos); |
2313 | 437 } |
438 | |
439 static void | |
440 titlestring_tag_menu_callback(GtkMenuItem * menuitem, | |
441 gpointer data) | |
442 { | |
443 const gchar *separator = " - "; | |
444 gint item = GPOINTER_TO_INT(data); | |
445 gint pos; | |
3993 | 446 |
447 pos = gtk_editable_get_position(GTK_EDITABLE(titlestring_entry)); | |
2313 | 448 |
449 /* insert separator as needed */ | |
3993 | 450 if (g_utf8_strlen(gtk_entry_get_text(GTK_ENTRY(titlestring_entry)), -1) > 0) |
451 editable_insert_text(GTK_EDITABLE(titlestring_entry), separator, &pos); | |
452 | |
453 editable_insert_text(GTK_EDITABLE(titlestring_entry), _(title_field_tags[item].tag), | |
2313 | 454 &pos); |
455 | |
3993 | 456 gtk_editable_set_position(GTK_EDITABLE(titlestring_entry), pos); |
2313 | 457 } |
458 | |
459 static void | |
460 on_titlestring_help_button_clicked(GtkButton * button, | |
461 gpointer data) | |
462 { | |
463 | |
464 GtkMenu *menu; | |
465 MenuPos *pos = g_new0(MenuPos, 1); | |
466 GdkWindow *parent; | |
467 | |
468 gint x_ro, y_ro; | |
469 gint x_widget, y_widget; | |
470 gint x_size, y_size; | |
471 | |
472 g_return_if_fail (button != NULL); | |
473 g_return_if_fail (GTK_IS_MENU (data)); | |
474 | |
475 parent = gtk_widget_get_parent_window(GTK_WIDGET(button)); | |
476 | |
477 gdk_drawable_get_size(parent, &x_size, &y_size); | |
478 gdk_window_get_root_origin(GTK_WIDGET(button)->window, &x_ro, &y_ro); | |
479 gdk_window_get_position(GTK_WIDGET(button)->window, &x_widget, &y_widget); | |
480 | |
481 pos->x = x_size + x_ro; | |
482 pos->y = y_size + y_ro - 100; | |
483 | |
484 menu = GTK_MENU(data); | |
485 gtk_menu_popup (menu, NULL, NULL, util_menu_position, pos, | |
486 0, GDK_CURRENT_TIME); | |
487 } | |
488 | |
489 | |
490 static void | |
491 on_titlestring_entry_realize(GtkWidget * entry, | |
492 gpointer data) | |
493 { | |
494 gtk_entry_set_text(GTK_ENTRY(entry), cfg.gentitle_format); | |
495 } | |
496 | |
497 static void | |
498 on_titlestring_entry_changed(GtkWidget * entry, | |
499 gpointer data) | |
500 { | |
501 g_free(cfg.gentitle_format); | |
502 cfg.gentitle_format = g_strdup(gtk_entry_get_text(GTK_ENTRY(entry))); | |
503 } | |
504 | |
505 static void | |
506 on_titlestring_cbox_realize(GtkWidget * cbox, | |
507 gpointer data) | |
508 { | |
509 gtk_combo_box_set_active(GTK_COMBO_BOX(cbox), cfg.titlestring_preset); | |
510 gtk_widget_set_sensitive(GTK_WIDGET(data), | |
511 (cfg.titlestring_preset == (gint)n_titlestring_presets)); | |
512 } | |
513 | |
514 static void | |
515 on_titlestring_cbox_changed(GtkWidget * cbox, | |
516 gpointer data) | |
517 { | |
518 gint position = gtk_combo_box_get_active(GTK_COMBO_BOX(cbox)); | |
519 | |
520 cfg.titlestring_preset = position; | |
521 gtk_widget_set_sensitive(GTK_WIDGET(data), (position == 6)); | |
522 } | |
523 | |
524 static void | |
525 on_mainwin_font_button_font_set(GtkFontButton * button, | |
526 gpointer data) | |
527 { | |
528 g_free(cfg.mainwin_font); | |
529 cfg.mainwin_font = g_strdup(gtk_font_button_get_font_name(button)); | |
530 | |
2911 | 531 ui_skinned_textbox_set_xfont(mainwin_info, cfg.mainwin_use_xfont, cfg.mainwin_font); |
2313 | 532 } |
533 | |
534 static void | |
535 on_use_bitmap_fonts_realize(GtkToggleButton * button, | |
536 gpointer data) | |
537 { | |
538 gtk_toggle_button_set_active(button, | |
539 cfg.mainwin_use_xfont != FALSE ? FALSE : TRUE); | |
540 } | |
541 | |
542 static void | |
543 on_use_bitmap_fonts_toggled(GtkToggleButton * button, | |
544 gpointer data) | |
545 { | |
546 gboolean useit = gtk_toggle_button_get_active(button); | |
547 cfg.mainwin_use_xfont = useit != FALSE ? FALSE : TRUE; | |
2911 | 548 ui_skinned_textbox_set_xfont(mainwin_info, cfg.mainwin_use_xfont, cfg.mainwin_font); |
2313 | 549 playlistwin_set_sinfo_font(cfg.playlist_font); |
550 | |
551 if (cfg.playlist_shaded) { | |
552 playlistwin_update_list(playlist_get_active()); | |
3221
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3217
diff
changeset
|
553 ui_skinned_window_draw_all(playlistwin); |
2313 | 554 } |
555 } | |
556 | |
557 static void | |
558 on_mainwin_font_button_realize(GtkFontButton * button, | |
559 gpointer data) | |
560 { | |
561 gtk_font_button_set_font_name(button, cfg.mainwin_font); | |
562 } | |
563 | |
564 static void | |
565 on_playlist_font_button_font_set(GtkFontButton * button, | |
566 gpointer data) | |
567 { | |
568 g_free(cfg.playlist_font); | |
569 cfg.playlist_font = g_strdup(gtk_font_button_get_font_name(button)); | |
570 | |
3217 | 571 ui_skinned_playlist_set_font(cfg.playlist_font); |
2313 | 572 playlistwin_set_sinfo_font(cfg.playlist_font); /* propagate font setting to playlistwin_sinfo */ |
573 playlistwin_update_list(playlist_get_active()); | |
3221
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3217
diff
changeset
|
574 gtk_widget_queue_draw(playlistwin_list); |
2313 | 575 } |
576 | |
577 static void | |
578 on_playlist_font_button_realize(GtkFontButton * button, | |
579 gpointer data) | |
580 { | |
581 gtk_font_button_set_font_name(button, cfg.playlist_font); | |
582 } | |
583 | |
584 static void | |
585 on_playlist_show_pl_numbers_realize(GtkToggleButton * button, | |
586 gpointer data) | |
587 { | |
588 gtk_toggle_button_set_active(button, cfg.show_numbers_in_pl); | |
589 } | |
590 | |
591 static void | |
592 on_playlist_show_pl_numbers_toggled(GtkToggleButton * button, | |
593 gpointer data) | |
594 { | |
595 cfg.show_numbers_in_pl = gtk_toggle_button_get_active(button); | |
596 playlistwin_update_list(playlist_get_active()); | |
3221
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3217
diff
changeset
|
597 gtk_widget_queue_draw(playlistwin_list); |
2313 | 598 } |
599 | |
600 static void | |
601 on_playlist_show_pl_separator_realize(GtkToggleButton * button, | |
602 gpointer data) | |
603 { | |
604 gtk_toggle_button_set_active(button, cfg.show_separator_in_pl); | |
605 } | |
606 | |
607 static void | |
608 on_playlist_show_pl_separator_toggled(GtkToggleButton * button, | |
609 gpointer data) | |
610 { | |
611 cfg.show_separator_in_pl = gtk_toggle_button_get_active(button); | |
612 playlistwin_update_list(playlist_get_active()); | |
3221
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3217
diff
changeset
|
613 gtk_widget_queue_draw(playlistwin_list); |
2313 | 614 } |
615 | |
616 /* format detection */ | |
617 static void | |
618 on_audio_format_det_cb_toggled(GtkToggleButton * button, | |
619 gpointer data) | |
620 { | |
621 cfg.playlist_detect = gtk_toggle_button_get_active(button); | |
622 } | |
623 | |
624 static void | |
625 on_audio_format_det_cb_realize(GtkToggleButton * button, | |
626 gpointer data) | |
627 { | |
628 gtk_toggle_button_set_active(button, cfg.playlist_detect); | |
629 } | |
630 | |
631 static void | |
632 on_detect_by_extension_cb_toggled(GtkToggleButton * button, | |
633 gpointer data) | |
634 { | |
635 cfg.use_extension_probing = gtk_toggle_button_get_active(button); | |
636 } | |
637 | |
638 static void | |
639 on_detect_by_extension_cb_realize(GtkToggleButton * button, | |
640 gpointer data) | |
641 { | |
642 gtk_toggle_button_set_active(button, cfg.use_extension_probing); | |
643 } | |
644 | |
645 /* proxy */ | |
646 static void | |
4000
a0bb67450552
more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents:
3999
diff
changeset
|
647 on_proxy_button_realize(GtkToggleButton *button, gchar *cfg) |
2313 | 648 { |
4000
a0bb67450552
more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents:
3999
diff
changeset
|
649 g_return_if_fail(cfg != NULL); |
a0bb67450552
more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents:
3999
diff
changeset
|
650 |
2313 | 651 ConfigDb *db; |
652 gboolean ret; | |
653 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
654 db = cfg_db_open(); |
2313 | 655 |
4000
a0bb67450552
more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents:
3999
diff
changeset
|
656 if (cfg_db_get_bool(db, NULL, cfg, &ret) != FALSE) |
2313 | 657 gtk_toggle_button_set_active(button, ret); |
658 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
659 cfg_db_close(db); |
2313 | 660 } |
661 | |
662 static void | |
4000
a0bb67450552
more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents:
3999
diff
changeset
|
663 on_proxy_button_toggled(GtkToggleButton *button, gchar *cfg) |
2313 | 664 { |
4000
a0bb67450552
more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents:
3999
diff
changeset
|
665 g_return_if_fail(cfg != NULL); |
a0bb67450552
more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents:
3999
diff
changeset
|
666 |
2313 | 667 ConfigDb *db; |
668 gboolean ret = gtk_toggle_button_get_active(button); | |
669 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
670 db = cfg_db_open(); |
4000
a0bb67450552
more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents:
3999
diff
changeset
|
671 cfg_db_set_bool(db, NULL, cfg, ret); |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
672 cfg_db_close(db); |
2313 | 673 } |
674 | |
675 static void | |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
676 on_proxy_entry_changed(GtkEntry *entry, gchar *cfg) |
2313 | 677 { |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
678 g_return_if_fail(cfg != NULL); |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
679 |
2313 | 680 ConfigDb *db; |
681 gchar *ret = g_strdup(gtk_entry_get_text(entry)); | |
682 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
683 db = cfg_db_open(); |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
684 cfg_db_set_string(db, NULL, cfg, ret); |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
685 cfg_db_close(db); |
2313 | 686 |
687 g_free(ret); | |
688 } | |
689 | |
690 static void | |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
691 on_proxy_entry_realize(GtkEntry *entry, gchar *cfg) |
2313 | 692 { |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
693 g_return_if_fail(cfg != NULL); |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
694 |
2313 | 695 ConfigDb *db; |
696 gchar *ret; | |
697 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
698 db = cfg_db_open(); |
2313 | 699 |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
700 if (cfg_db_get_string(db, NULL, cfg, &ret) != FALSE) |
2313 | 701 gtk_entry_set_text(entry, ret); |
702 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
703 cfg_db_close(db); |
2313 | 704 } |
705 | |
706 static void | |
3356 | 707 plugin_treeview_open_prefs(GtkTreeView *treeview) |
3353
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
708 { |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
709 GtkTreeSelection *selection; |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
710 GtkTreeModel *model; |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
711 GtkTreeIter iter; |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
712 Plugin *plugin = NULL; |
3353
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
713 |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
714 selection = gtk_tree_view_get_selection(treeview); |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
715 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
716 return; |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
717 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_PLUGIN_PTR, &plugin, -1); |
3353
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
718 |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
719 g_return_if_fail(plugin != NULL); |
3542
f8880f2e0501
Fix crash on calling plugin->configure() in preferences when plugin->configure==NULL
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
3442
diff
changeset
|
720 g_return_if_fail(plugin->configure != NULL); |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
721 |
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
722 plugin->configure(); |
3353
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
723 } |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
724 |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
725 static void |
3357 | 726 plugin_treeview_open_info(GtkTreeView *treeview) |
727 { | |
728 GtkTreeSelection *selection; | |
729 GtkTreeModel *model; | |
730 GtkTreeIter iter; | |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
731 Plugin *plugin = NULL; |
3357 | 732 |
733 selection = gtk_tree_view_get_selection(treeview); | |
734 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
735 return; | |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
736 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_PLUGIN_PTR, &plugin, -1); |
3357 | 737 |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
738 g_return_if_fail(plugin != NULL); |
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
739 |
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
740 plugin->about(); |
3357 | 741 } |
742 | |
743 static void | |
3355
31ecb89e871c
introduce plugin_treeview_enable_prefs and plugin_treeview_enable_info
Tomasz Mon <desowin@gmail.com>
parents:
3353
diff
changeset
|
744 plugin_treeview_enable_prefs(GtkTreeView * treeview, GtkButton * button) |
2313 | 745 { |
746 GtkTreeSelection *selection; | |
747 GtkTreeModel *model; | |
748 GtkTreeIter iter; | |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
749 Plugin *plugin = NULL; |
2313 | 750 |
751 selection = gtk_tree_view_get_selection(treeview); | |
752 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
753 return; | |
754 | |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
755 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_PLUGIN_PTR, &plugin, -1); |
2313 | 756 |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
757 g_return_if_fail(plugin != NULL); |
2313 | 758 |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
759 gtk_widget_set_sensitive(GTK_WIDGET(button), plugin->configure != NULL); |
2313 | 760 } |
761 | |
762 static void | |
3355
31ecb89e871c
introduce plugin_treeview_enable_prefs and plugin_treeview_enable_info
Tomasz Mon <desowin@gmail.com>
parents:
3353
diff
changeset
|
763 plugin_treeview_enable_info(GtkTreeView * treeview, GtkButton * button) |
2313 | 764 { |
765 GtkTreeSelection *selection; | |
766 GtkTreeModel *model; | |
767 GtkTreeIter iter; | |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
768 Plugin *plugin = NULL; |
2313 | 769 |
770 selection = gtk_tree_view_get_selection(treeview); | |
771 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
772 return; | |
773 | |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
774 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_PLUGIN_PTR, &plugin, -1); |
2313 | 775 |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
776 g_return_if_fail(plugin != NULL); |
2313 | 777 |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
778 gtk_widget_set_sensitive(GTK_WIDGET(button), plugin->about != NULL); |
2313 | 779 } |
780 | |
781 | |
782 static void | |
783 output_plugin_enable_info(GtkComboBox * cbox, GtkButton * button) | |
784 { | |
785 GList *plist; | |
786 | |
787 gint id = gtk_combo_box_get_active(cbox); | |
788 | |
789 plist = get_output_list(); | |
790 plist = g_list_nth(plist, id); | |
791 | |
792 gtk_widget_set_sensitive(GTK_WIDGET(button), | |
793 OUTPUT_PLUGIN(plist->data)->about != NULL); | |
794 } | |
795 | |
796 static void | |
797 output_plugin_enable_prefs(GtkComboBox * cbox, GtkButton * button) | |
798 { | |
799 GList *plist; | |
800 gint id = gtk_combo_box_get_active(cbox); | |
801 | |
802 plist = get_output_list(); | |
803 plist = g_list_nth(plist, id); | |
804 | |
805 gtk_widget_set_sensitive(GTK_WIDGET(button), | |
806 OUTPUT_PLUGIN(plist->data)->configure != NULL); | |
807 } | |
808 | |
809 static void | |
810 on_output_plugin_bufsize_realize(GtkSpinButton *button, | |
811 gpointer data) | |
812 { | |
813 gtk_spin_button_set_value(button, cfg.output_buffer_size); | |
814 } | |
815 | |
816 static void | |
817 on_output_plugin_bufsize_value_changed(GtkSpinButton *button, | |
818 gpointer data) | |
819 { | |
820 cfg.output_buffer_size = gtk_spin_button_get_value_as_int(button); | |
821 } | |
822 | |
823 static void | |
824 on_mouse_wheel_volume_realize(GtkSpinButton * button, | |
825 gpointer data) | |
826 { | |
827 gtk_spin_button_set_value(button, cfg.mouse_change); | |
828 } | |
829 | |
830 static void | |
831 on_mouse_wheel_volume_changed(GtkSpinButton * button, | |
832 gpointer data) | |
833 { | |
834 cfg.mouse_change = gtk_spin_button_get_value_as_int(button); | |
835 } | |
836 | |
837 static void | |
838 on_pause_between_songs_time_realize(GtkSpinButton * button, | |
839 gpointer data) | |
840 { | |
841 gtk_spin_button_set_value(button, cfg.pause_between_songs_time); | |
842 } | |
843 | |
844 static void | |
845 on_pause_between_songs_time_changed(GtkSpinButton * button, | |
846 gpointer data) | |
847 { | |
848 cfg.pause_between_songs_time = gtk_spin_button_get_value_as_int(button); | |
849 } | |
850 | |
851 static void | |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
852 on_enable_src_realize(GtkToggleButton * button, |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
853 gpointer data) |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
854 { |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
855 #ifdef USE_SRC |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
856 ConfigDb *db; |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
857 gboolean ret; |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
858 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
859 db = cfg_db_open(); |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
860 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
861 if (cfg_db_get_bool(db, NULL, "enable_src", &ret) != FALSE) |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
862 gtk_toggle_button_set_active(button, ret); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
863 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
864 cfg_db_close(db); |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
865 #else |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
866 gtk_toggle_button_set_active(button, FALSE); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
867 gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
868 #endif |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
869 } |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
870 |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
871 static void |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
872 on_enable_src_toggled(GtkToggleButton * button, |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
873 gpointer data) |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
874 { |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
875 ConfigDb *db; |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
876 gboolean ret = gtk_toggle_button_get_active(button); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
877 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
878 db = cfg_db_open(); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
879 cfg_db_set_bool(db, NULL, "enable_src", ret); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
880 cfg_db_close(db); |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
881 } |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
882 |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
883 static void |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
884 on_src_rate_realize(GtkSpinButton * button, |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
885 gpointer data) |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
886 { |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
887 #ifdef USE_SRC |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
888 ConfigDb *db; |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
889 gint value; |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
890 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
891 db = cfg_db_open(); |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
892 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
893 if (cfg_db_get_int(db, NULL, "src_rate", &value) != FALSE) |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
894 gtk_spin_button_set_value(button, (gdouble)value); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
895 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
896 cfg_db_close(db); |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
897 #else |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
898 gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
899 #endif |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
900 } |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
901 |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
902 static void |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
903 on_src_rate_value_changed(GtkSpinButton * button, |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
904 gpointer data) |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
905 { |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
906 ConfigDb *db; |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
907 gint value = gtk_spin_button_get_value_as_int(button); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
908 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
909 db = cfg_db_open(); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
910 cfg_db_set_int(db, NULL, "src_rate", value); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
911 cfg_db_close(db); |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
912 } |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
913 |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
914 static void |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
915 on_src_converter_type_realize(GtkComboBox * box, |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
916 gpointer data) |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
917 { |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
918 #ifdef USE_SRC |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
919 ConfigDb *db; |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
920 gint value; |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
921 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
922 db = cfg_db_open(); |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
923 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
924 if (cfg_db_get_int(db, NULL, "src_type", &value) != FALSE) |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
925 gtk_combo_box_set_active(box, value); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
926 else |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
927 gtk_combo_box_set_active(box, 0); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
928 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
929 cfg_db_close(db); |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
930 #else |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
931 gtk_widget_set_sensitive(GTK_WIDGET(box), FALSE); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
932 #endif |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
933 } |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
934 |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
935 static void |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
936 on_src_converter_type_changed(GtkComboBox * box, |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
937 gpointer data) |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
938 { |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
939 ConfigDb *db; |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
940 gint value = gtk_combo_box_get_active(box); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
941 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
942 db = cfg_db_open(); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
943 cfg_db_set_int(db, NULL, "src_type", value); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
944 cfg_db_close(db); |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
945 } |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
946 |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
947 static void |
2313 | 948 on_mouse_wheel_scroll_pl_realize(GtkSpinButton * button, |
949 gpointer data) | |
950 { | |
951 gtk_spin_button_set_value(button, cfg.scroll_pl_by); | |
952 } | |
953 | |
954 static void | |
955 on_mouse_wheel_scroll_pl_changed(GtkSpinButton * button, | |
956 gpointer data) | |
957 { | |
958 cfg.scroll_pl_by = gtk_spin_button_get_value_as_int(button); | |
959 } | |
960 | |
961 static void | |
962 on_playlist_convert_underscore_realize(GtkToggleButton * button, | |
963 gpointer data) | |
964 { | |
965 gtk_toggle_button_set_active(button, cfg.convert_underscore); | |
966 } | |
967 | |
968 static void | |
969 on_playlist_convert_underscore_toggled(GtkToggleButton * button, | |
970 gpointer data) | |
971 { | |
972 cfg.convert_underscore = gtk_toggle_button_get_active(button); | |
973 } | |
974 | |
975 static void | |
976 on_playlist_no_advance_realize(GtkToggleButton * button, gpointer data) | |
977 { | |
978 gtk_toggle_button_set_active(button, cfg.no_playlist_advance); | |
979 } | |
980 | |
981 static void | |
982 on_playlist_no_advance_toggled(GtkToggleButton * button, gpointer data) | |
983 { | |
984 cfg.no_playlist_advance = gtk_toggle_button_get_active(button); | |
985 } | |
986 | |
987 static void | |
988 on_continue_playback_on_startup_realize(GtkToggleButton * button, gpointer data) | |
989 { | |
990 gtk_toggle_button_set_active(button, cfg.resume_playback_on_startup); | |
991 } | |
992 | |
993 static void | |
3544
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
994 on_software_volume_control_toggled(GtkToggleButton * button, gpointer data) |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
995 { |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
996 cfg.software_volume_control = gtk_toggle_button_get_active(button); |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
997 } |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
998 |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
999 static void |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
1000 on_software_volume_control_realize(GtkToggleButton * button, gpointer data) |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
1001 { |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
1002 gtk_toggle_button_set_active(button, cfg.software_volume_control); |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
1003 } |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
1004 |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
1005 static void |
2313 | 1006 on_continue_playback_on_startup_toggled(GtkToggleButton * button, gpointer data) |
1007 { | |
1008 cfg.resume_playback_on_startup = gtk_toggle_button_get_active(button); | |
1009 } | |
1010 | |
1011 static void | |
1012 on_refresh_file_list_realize(GtkToggleButton * button, gpointer data) | |
1013 { | |
1014 gtk_toggle_button_set_active(button, cfg.refresh_file_list); | |
1015 } | |
1016 | |
1017 static void | |
1018 on_refresh_file_list_toggled(GtkToggleButton * button, gpointer data) | |
1019 { | |
1020 cfg.refresh_file_list = gtk_toggle_button_get_active(button); | |
1021 } | |
1022 | |
1023 static void | |
1024 on_playlist_convert_twenty_realize(GtkToggleButton * button, gpointer data) | |
1025 { | |
1026 gtk_toggle_button_set_active(button, cfg.convert_twenty); | |
1027 } | |
1028 | |
1029 static void | |
1030 on_playlist_convert_twenty_toggled(GtkToggleButton * button, gpointer data) | |
1031 { | |
1032 cfg.convert_twenty = gtk_toggle_button_get_active(button); | |
1033 } | |
1034 | |
1035 static void | |
1036 on_playlist_convert_slash_realize(GtkToggleButton * button, gpointer data) | |
1037 { | |
1038 gtk_toggle_button_set_active(button, cfg.convert_slash); | |
1039 } | |
1040 | |
1041 static void | |
1042 on_playlist_convert_slash_toggled(GtkToggleButton * button, gpointer data) | |
1043 { | |
1044 cfg.convert_slash = gtk_toggle_button_get_active(button); | |
1045 } | |
1046 | |
1047 static void | |
1048 on_use_pl_metadata_realize(GtkToggleButton * button, | |
1049 gpointer data) | |
1050 { | |
1051 gboolean state = cfg.use_pl_metadata; | |
1052 gtk_toggle_button_set_active(button, state); | |
1053 gtk_widget_set_sensitive(GTK_WIDGET(data), state); | |
1054 } | |
1055 | |
1056 static void | |
1057 on_use_pl_metadata_toggled(GtkToggleButton * button, | |
1058 gpointer data) | |
1059 { | |
1060 gboolean state = gtk_toggle_button_get_active(button); | |
1061 cfg.use_pl_metadata = state; | |
1062 gtk_widget_set_sensitive(GTK_WIDGET(data), state); | |
1063 } | |
1064 | |
1065 static void | |
1066 on_pause_between_songs_realize(GtkToggleButton * button, | |
1067 gpointer data) | |
1068 { | |
1069 gboolean state = cfg.pause_between_songs; | |
1070 gtk_toggle_button_set_active(button, state); | |
1071 gtk_widget_set_sensitive(GTK_WIDGET(data), state); | |
1072 } | |
1073 | |
1074 static void | |
1075 on_pause_between_songs_toggled(GtkToggleButton * button, | |
1076 gpointer data) | |
1077 { | |
1078 gboolean state = gtk_toggle_button_get_active(button); | |
1079 cfg.pause_between_songs = state; | |
1080 gtk_widget_set_sensitive(GTK_WIDGET(data), state); | |
1081 } | |
1082 | |
1083 static void | |
1084 on_pl_metadata_on_load_realize(GtkRadioButton * button, | |
1085 gpointer data) | |
1086 { | |
1087 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), | |
1088 cfg.get_info_on_load); | |
1089 } | |
1090 | |
1091 static void | |
1092 on_pl_metadata_on_display_realize(GtkRadioButton * button, | |
1093 gpointer data) | |
1094 { | |
1095 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), | |
1096 cfg.get_info_on_demand); | |
1097 } | |
1098 | |
1099 static void | |
1100 on_pl_metadata_on_load_toggled(GtkRadioButton * button, | |
1101 gpointer data) | |
1102 { | |
1103 cfg.get_info_on_load = | |
1104 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)); | |
1105 } | |
1106 | |
1107 static void | |
1108 on_pl_metadata_on_display_toggled(GtkRadioButton * button, | |
1109 gpointer data) | |
1110 { | |
1111 cfg.get_info_on_demand = | |
1112 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)); | |
1113 } | |
1114 | |
1115 static void | |
1116 on_custom_cursors_realize(GtkToggleButton * button, | |
1117 gpointer data) | |
1118 { | |
1119 gtk_toggle_button_set_active(button, cfg.custom_cursors); | |
1120 } | |
1121 | |
1122 static void | |
1123 on_custom_cursors_toggled(GtkToggleButton *togglebutton, | |
1124 gpointer data) | |
1125 { | |
1126 cfg.custom_cursors = gtk_toggle_button_get_active(togglebutton); | |
1127 skin_reload_forced(); | |
1128 } | |
1129 | |
1130 static void | |
1131 on_eq_dir_preset_entry_realize(GtkEntry * entry, | |
1132 gpointer data) | |
1133 { | |
1134 gtk_entry_set_text(entry, cfg.eqpreset_default_file); | |
1135 } | |
1136 | |
1137 static void | |
1138 on_eq_dir_preset_entry_changed(GtkEntry * entry, | |
1139 gpointer data) | |
1140 { | |
1141 g_free(cfg.eqpreset_default_file); | |
1142 cfg.eqpreset_default_file = g_strdup(gtk_entry_get_text(entry)); | |
1143 } | |
1144 | |
1145 static void | |
1146 on_eq_file_preset_entry_realize(GtkEntry * entry, | |
1147 gpointer data) | |
1148 { | |
1149 gtk_entry_set_text(entry, cfg.eqpreset_extension); | |
1150 } | |
1151 | |
1152 static void | |
1153 on_eq_file_preset_entry_changed(GtkEntry * entry, gpointer data) | |
1154 { | |
1155 const gchar *text = gtk_entry_get_text(entry); | |
1156 | |
1157 while (*text == '.') | |
1158 text++; | |
1159 | |
1160 g_free(cfg.eqpreset_extension); | |
1161 cfg.eqpreset_extension = g_strdup(text); | |
1162 } | |
1163 | |
1164 | |
1165 static void | |
1166 on_skin_refresh_button_clicked(GtkButton * button, | |
1167 gpointer data) | |
1168 { | |
1169 const mode_t mode755 = S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; | |
1170 | |
1171 del_directory(bmp_paths[BMP_PATH_SKIN_THUMB_DIR]); | |
1172 make_directory(bmp_paths[BMP_PATH_SKIN_THUMB_DIR], mode755); | |
1173 | |
3993 | 1174 skin_view_update(GTK_TREE_VIEW(skin_view), GTK_WIDGET(skin_refresh_button)); |
2313 | 1175 } |
1176 | |
1177 static gboolean | |
1178 on_skin_view_realize(GtkTreeView * treeview, | |
1179 gpointer data) | |
1180 { | |
1181 skin_view_realize(treeview); | |
1182 | |
1183 return TRUE; | |
1184 } | |
1185 | |
1186 static void | |
3993 | 1187 on_category_treeview_realize(GtkTreeView * treeview, |
2313 | 1188 GtkNotebook * notebook) |
1189 { | |
1190 GtkListStore *store; | |
1191 GtkCellRenderer *renderer; | |
1192 GtkTreeViewColumn *column; | |
1193 GtkTreeSelection *selection; | |
1194 GtkTreeIter iter; | |
1195 GdkPixbuf *img; | |
1196 CategoryQueueEntry *qlist; | |
1197 gint i; | |
1198 | |
1199 column = gtk_tree_view_column_new(); | |
1200 gtk_tree_view_column_set_title(column, _("Category")); | |
1201 gtk_tree_view_append_column(treeview, column); | |
1202 gtk_tree_view_column_set_spacing(column, 2); | |
1203 | |
1204 renderer = gtk_cell_renderer_pixbuf_new(); | |
1205 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
1206 gtk_tree_view_column_set_attributes(column, renderer, "pixbuf", 0, NULL); | |
1207 | |
1208 renderer = gtk_cell_renderer_text_new(); | |
1209 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
1210 gtk_tree_view_column_set_attributes(column, renderer, "text", 1, NULL); | |
1211 | |
1212 store = gtk_list_store_new(CATEGORY_VIEW_N_COLS, | |
1213 GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_INT); | |
1214 gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(store)); | |
1215 | |
1216 for (i = 0; i < n_categories; i++) { | |
1217 img = gdk_pixbuf_new_from_file(categories[i].icon_path, NULL); | |
1218 gtk_list_store_append(store, &iter); | |
1219 gtk_list_store_set(store, &iter, | |
1220 CATEGORY_VIEW_COL_ICON, img, | |
1221 CATEGORY_VIEW_COL_NAME, | |
1222 gettext(categories[i].name), CATEGORY_VIEW_COL_ID, | |
1223 categories[i].id, -1); | |
1224 g_object_unref(img); | |
1225 } | |
1226 | |
1227 selection = gtk_tree_view_get_selection(treeview); | |
1228 | |
1229 g_signal_connect_swapped(selection, "changed", | |
1230 G_CALLBACK(change_category), notebook); | |
1231 | |
1232 /* mark the treeview widget as available to third party plugins */ | |
1233 category_treeview = GTK_WIDGET(treeview); | |
1234 | |
1235 /* prefswin_page_queue_destroy already pops the queue forward for us. */ | |
1236 for (qlist = category_queue; qlist != NULL; qlist = category_queue) | |
1237 { | |
1238 CategoryQueueEntry *ent = (CategoryQueueEntry *) qlist; | |
1239 | |
1240 prefswin_page_new(ent->container, ent->pg_name, ent->img_url); | |
1241 prefswin_page_queue_destroy(ent); | |
1242 } | |
1243 } | |
1244 | |
1245 static void | |
1246 on_skin_view_drag_data_received(GtkWidget * widget, | |
1247 GdkDragContext * context, | |
1248 gint x, gint y, | |
1249 GtkSelectionData * selection_data, | |
1250 guint info, guint time, | |
1251 gpointer user_data) | |
1252 { | |
1253 ConfigDb *db; | |
1254 gchar *path; | |
1255 | |
1256 if (!selection_data->data) { | |
1257 g_warning("DND data string is NULL"); | |
1258 return; | |
1259 } | |
1260 | |
1261 path = (gchar *) selection_data->data; | |
1262 | |
1263 /* FIXME: use a real URL validator/parser */ | |
1264 | |
1265 if (str_has_prefix_nocase(path, "file:///")) { | |
1266 path[strlen(path) - 2] = 0; /* Why the hell a CR&LF? */ | |
1267 path += 7; | |
1268 } | |
1269 else if (str_has_prefix_nocase(path, "file:")) { | |
1270 path += 5; | |
1271 } | |
1272 | |
1273 if (file_is_archive(path)) { | |
1274 bmp_active_skin_load(path); | |
1275 skin_install_skin(path); | |
3993 | 1276 skin_view_update(GTK_TREE_VIEW(widget), GTK_WIDGET(skin_refresh_button)); |
2313 | 1277 /* Change skin name in the config file */ |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1278 db = cfg_db_open(); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1279 cfg_db_set_string(db, NULL, "skin", path); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1280 cfg_db_close(db); |
2313 | 1281 } |
1282 | |
1283 } | |
1284 | |
1285 static void | |
1286 on_chardet_detector_cbox_changed(GtkComboBox * combobox, gpointer data) | |
1287 { | |
1288 ConfigDb *db; | |
1289 gint position = 0; | |
1290 | |
1291 position = gtk_combo_box_get_active(GTK_COMBO_BOX(combobox)); | |
1292 cfg.chardet_detector = (char *)chardet_detector_presets[position]; | |
1293 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1294 db = cfg_db_open(); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1295 cfg_db_set_string(db, NULL, "chardet_detector", cfg.chardet_detector); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1296 cfg_db_close(db); |
2313 | 1297 if (data != NULL) |
1298 gtk_widget_set_sensitive(GTK_WIDGET(data), 1); | |
1299 } | |
1300 | |
1301 static void | |
1302 on_chardet_detector_cbox_realize(GtkComboBox *combobox, gpointer data) | |
1303 { | |
1304 ConfigDb *db; | |
1305 gchar *ret=NULL; | |
1306 guint i=0,index=0; | |
1307 | |
1308 for(i=0; i<n_chardet_detector_presets; i++) { | |
1309 gtk_combo_box_append_text(combobox, chardet_detector_presets[i]); | |
1310 } | |
1311 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1312 db = cfg_db_open(); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1313 if(cfg_db_get_string(db, NULL, "chardet_detector", &ret) != FALSE) { |
2313 | 1314 for(i=0; i<n_chardet_detector_presets; i++) { |
1315 if(!strcmp(chardet_detector_presets[i], ret)) { | |
1316 cfg.chardet_detector = (char *)chardet_detector_presets[i]; | |
1317 index = i; | |
1318 } | |
1319 } | |
1320 } | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1321 cfg_db_close(db); |
2313 | 1322 |
1323 #ifdef USE_CHARDET | |
1324 gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), index); | |
1325 | |
1326 if (data != NULL) | |
1327 gtk_widget_set_sensitive(GTK_WIDGET(data), TRUE); | |
1328 | |
1329 g_signal_connect(combobox, "changed", | |
1330 G_CALLBACK(on_chardet_detector_cbox_changed), NULL); | |
1331 #else | |
1332 gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), -1); | |
1333 gtk_widget_set_sensitive(GTK_WIDGET(combobox), 0); | |
1334 #endif | |
1335 if(ret) | |
1336 g_free(ret); | |
1337 } | |
1338 | |
1339 static void | |
1340 on_chardet_fallback_realize(GtkEntry *entry, gpointer data) | |
1341 { | |
1342 ConfigDb *db; | |
1343 gchar *ret = NULL; | |
1344 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1345 db = cfg_db_open(); |
2313 | 1346 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1347 if (cfg_db_get_string(db, NULL, "chardet_fallback", &ret) != FALSE) { |
2313 | 1348 if(cfg.chardet_fallback) |
1349 g_free(cfg.chardet_fallback); | |
1350 | |
1351 if(ret && strncasecmp(ret, "None", sizeof("None"))) { | |
1352 cfg.chardet_fallback = ret; | |
1353 } else { | |
1354 cfg.chardet_fallback = g_strdup(""); | |
1355 } | |
1356 gtk_entry_set_text(entry, cfg.chardet_fallback); | |
1357 } | |
1358 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1359 cfg_db_close(db); |
2313 | 1360 } |
1361 | |
1362 static void | |
1363 on_chardet_fallback_changed(GtkEntry *entry, gpointer data) | |
1364 { | |
1365 ConfigDb *db; | |
1366 gchar *ret = NULL; | |
1367 | |
1368 if(cfg.chardet_fallback) | |
1369 g_free(cfg.chardet_fallback); | |
1370 | |
1371 ret = g_strdup(gtk_entry_get_text(entry)); | |
1372 | |
1373 if(ret == NULL) | |
1374 cfg.chardet_fallback = g_strdup(""); | |
1375 else | |
1376 cfg.chardet_fallback = ret; | |
1377 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1378 db = cfg_db_open(); |
2313 | 1379 |
1380 if(cfg.chardet_fallback == NULL || !strcmp(cfg.chardet_fallback, "")) | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1381 cfg_db_set_string(db, NULL, "chardet_fallback", "None"); |
2313 | 1382 else |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1383 cfg_db_set_string(db, NULL, "chardet_fallback", cfg.chardet_fallback); |
2313 | 1384 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1385 cfg_db_close(db); |
2313 | 1386 } |
1387 | |
1388 static void | |
1389 on_show_filepopup_for_tuple_realize(GtkToggleButton * button, gpointer data) | |
1390 { | |
1391 gtk_toggle_button_set_active(button, cfg.show_filepopup_for_tuple); | |
3993 | 1392 filepopupbutton = GTK_WIDGET(button); |
1393 | |
1394 gtk_widget_set_sensitive(filepopup_for_tuple_settings_button, cfg.show_filepopup_for_tuple); | |
2313 | 1395 } |
1396 | |
1397 static void | |
1398 on_show_filepopup_for_tuple_toggled(GtkToggleButton * button, gpointer data) | |
1399 { | |
1400 cfg.show_filepopup_for_tuple = gtk_toggle_button_get_active(button); | |
1401 | |
3993 | 1402 gtk_widget_set_sensitive(filepopup_for_tuple_settings_button, cfg.show_filepopup_for_tuple); |
2313 | 1403 } |
1404 | |
1405 static void | |
1406 on_recurse_for_cover_toggled(GtkToggleButton *button, gpointer data) | |
1407 { | |
1408 gtk_widget_set_sensitive(GTK_WIDGET(data), | |
1409 gtk_toggle_button_get_active(button)); | |
1410 } | |
1411 | |
1412 static void | |
1413 on_colorize_button_clicked(GtkButton *button, gpointer data) | |
1414 { | |
3992
50bf02b4f048
correct mf0102's commit a bit
Tomasz Mon <desowin@gmail.com>
parents:
3991
diff
changeset
|
1415 if (colorize_settings) |
50bf02b4f048
correct mf0102's commit a bit
Tomasz Mon <desowin@gmail.com>
parents:
3991
diff
changeset
|
1416 gtk_window_present(GTK_WINDOW(colorize_settings)); |
50bf02b4f048
correct mf0102's commit a bit
Tomasz Mon <desowin@gmail.com>
parents:
3991
diff
changeset
|
1417 else |
50bf02b4f048
correct mf0102's commit a bit
Tomasz Mon <desowin@gmail.com>
parents:
3991
diff
changeset
|
1418 create_colorize_settings(); |
2313 | 1419 } |
1420 | |
1421 static void | |
3856
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1422 reload_skin() |
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1423 { |
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1424 /* reload the skin to apply the change */ |
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1425 skin_reload_forced(); |
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1426 ui_skinned_window_draw_all(mainwin); |
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1427 ui_skinned_window_draw_all(equalizerwin); |
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1428 ui_skinned_window_draw_all(playlistwin); |
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1429 } |
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1430 |
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1431 static void |
2313 | 1432 on_red_scale_value_changed(GtkHScale *scale, gpointer data) |
1433 { | |
3856
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1434 cfg.colorize_r = gtk_range_get_value(GTK_RANGE(scale)); |
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1435 reload_skin(); |
2313 | 1436 } |
1437 | |
1438 static void | |
1439 on_green_scale_value_changed(GtkHScale *scale, gpointer data) | |
1440 { | |
3856
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1441 cfg.colorize_g = gtk_range_get_value(GTK_RANGE(scale)); |
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1442 reload_skin(); |
2313 | 1443 } |
1444 | |
1445 static void | |
1446 on_blue_scale_value_changed(GtkHScale *scale, gpointer data) | |
1447 { | |
3856
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1448 cfg.colorize_b = gtk_range_get_value(GTK_RANGE(scale)); |
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1449 reload_skin(); |
2313 | 1450 } |
1451 | |
1452 static void | |
1453 on_colorize_close_clicked(GtkButton *button, gpointer data) | |
1454 { | |
3992
50bf02b4f048
correct mf0102's commit a bit
Tomasz Mon <desowin@gmail.com>
parents:
3991
diff
changeset
|
1455 gtk_widget_destroy(colorize_settings); |
50bf02b4f048
correct mf0102's commit a bit
Tomasz Mon <desowin@gmail.com>
parents:
3991
diff
changeset
|
1456 colorize_settings = NULL; |
2313 | 1457 } |
1458 | |
1459 static void | |
1460 on_filepopup_for_tuple_settings_clicked(GtkButton *button, gpointer data) | |
1461 { | |
3990
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1462 gtk_entry_set_text(GTK_ENTRY(filepopup_settings_cover_name_include), cfg.cover_name_include); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1463 gtk_entry_set_text(GTK_ENTRY(filepopup_settings_cover_name_exclude), cfg.cover_name_exclude); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1464 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filepopup_settings_recurse_for_cover), cfg.recurse_for_cover); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1465 gtk_spin_button_set_value(GTK_SPIN_BUTTON(filepopup_settings_recurse_for_cover_depth), cfg.recurse_for_cover_depth); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1466 on_recurse_for_cover_toggled(GTK_TOGGLE_BUTTON(filepopup_settings_recurse_for_cover), filepopup_settings_recurse_for_cover_depth_box); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1467 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filepopup_settings_use_file_cover), cfg.use_file_cover); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1468 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filepopup_settings_showprogressbar), cfg.filepopup_showprogressbar); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1469 gtk_spin_button_set_value(GTK_SPIN_BUTTON(filepopup_settings_delay), cfg.filepopup_delay); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1470 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1471 gtk_widget_show(filepopup_settings); |
2313 | 1472 } |
1473 | |
1474 static void | |
1475 on_filepopup_settings_ok_clicked(GtkButton *button, gpointer data) | |
1476 { | |
3990
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1477 g_free(cfg.cover_name_include); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1478 cfg.cover_name_include = g_strdup(gtk_entry_get_text(GTK_ENTRY(filepopup_settings_cover_name_include))); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1479 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1480 g_free(cfg.cover_name_exclude); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1481 cfg.cover_name_exclude = g_strdup(gtk_entry_get_text(GTK_ENTRY(filepopup_settings_cover_name_exclude))); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1482 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1483 cfg.recurse_for_cover = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filepopup_settings_recurse_for_cover)); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1484 cfg.recurse_for_cover_depth = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(filepopup_settings_recurse_for_cover_depth)); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1485 cfg.use_file_cover = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filepopup_settings_use_file_cover)); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1486 cfg.filepopup_showprogressbar = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filepopup_settings_showprogressbar)); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1487 cfg.filepopup_delay = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(filepopup_settings_delay)); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1488 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1489 gtk_widget_hide(filepopup_settings); |
2313 | 1490 } |
1491 | |
1492 static void | |
1493 on_filepopup_settings_cancel_clicked(GtkButton *button, gpointer data) | |
1494 { | |
1495 gtk_widget_hide(filepopup_settings); | |
1496 } | |
1497 | |
1498 static void | |
1499 on_xmms_style_fileselector_realize(GtkToggleButton * button, | |
1500 gpointer data) | |
1501 { | |
1502 gtk_toggle_button_set_active(button, cfg.use_xmms_style_fileselector); | |
1503 } | |
1504 | |
1505 static void | |
1506 on_xmms_style_fileselector_toggled(GtkToggleButton * button, | |
1507 gpointer data) | |
1508 { | |
1509 cfg.use_xmms_style_fileselector = gtk_toggle_button_get_active(button); | |
1510 } | |
1511 | |
1512 static void | |
1513 on_show_wm_decorations_realize(GtkToggleButton * button, | |
1514 gpointer data) | |
1515 { | |
1516 gtk_toggle_button_set_active(button, cfg.show_wm_decorations); | |
1517 } | |
1518 | |
1519 static void | |
1520 on_show_wm_decorations_toggled(GtkToggleButton * button, | |
1521 gpointer data) | |
1522 { | |
1523 extern GtkWidget *equalizerwin; | |
1524 cfg.show_wm_decorations = gtk_toggle_button_get_active(button); | |
1525 gtk_window_set_decorated(GTK_WINDOW(mainwin), cfg.show_wm_decorations); | |
1526 gtk_window_set_decorated(GTK_WINDOW(playlistwin), cfg.show_wm_decorations); | |
1527 gtk_window_set_decorated(GTK_WINDOW(equalizerwin), cfg.show_wm_decorations); | |
2623 | 1528 } |
1529 | |
1530 static void | |
1531 on_reload_plugins_clicked(GtkButton * button, gpointer data) | |
1532 { | |
1533 /* TBD: should every playlist entry have to be reprobed? | |
1534 * Pointers could come back stale if new plugins are added or | |
1535 * symbol sizes change. - nenolod | |
1536 */ | |
1537 | |
2682
c3cd6e47faf6
[svn] - make the evil 'reload plugins' button behave a bit better
giacomo
parents:
2635
diff
changeset
|
1538 bmp_config_save(); |
2623 | 1539 plugin_system_cleanup(); |
2682
c3cd6e47faf6
[svn] - make the evil 'reload plugins' button behave a bit better
giacomo
parents:
2635
diff
changeset
|
1540 bmp_config_free(); |
c3cd6e47faf6
[svn] - make the evil 'reload plugins' button behave a bit better
giacomo
parents:
2635
diff
changeset
|
1541 bmp_config_load(); |
2623 | 1542 plugin_system_init(); |
2313 | 1543 } |
1544 | |
3712
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1545 static void |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1546 on_twoway_scroller_realize(GtkToggleButton * button, |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1547 gpointer data) |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1548 { |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1549 gtk_toggle_button_set_active(button, cfg.twoway_scroll); |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1550 } |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1551 |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1552 static void |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1553 on_twoway_scroller_toggled(GtkToggleButton * button, |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1554 gpointer data) |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1555 { |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1556 cfg.twoway_scroll = gtk_toggle_button_get_active(button); |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1557 //XXX need to redraw textbox? --yaz |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1558 } |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1559 |
2313 | 1560 void |
3989
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1561 create_colorize_settings(void) |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1562 { |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1563 GtkWidget *vbox; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1564 GtkWidget *label; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1565 GtkWidget *table; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1566 GtkWidget *hbuttonbox; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1567 GtkWidget *colorize_close; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1568 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1569 GtkWidget *green_label; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1570 GtkWidget *red_label; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1571 GtkWidget *blue_label; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1572 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1573 colorize_settings = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1574 gtk_container_set_border_width(GTK_CONTAINER(colorize_settings), 12); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1575 gtk_window_set_title(GTK_WINDOW(colorize_settings), _("Color Adjustment")); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1576 gtk_window_set_type_hint(GTK_WINDOW(colorize_settings), GDK_WINDOW_TYPE_HINT_DIALOG); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1577 gtk_window_set_transient_for(GTK_WINDOW(colorize_settings), GTK_WINDOW(prefswin)); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1578 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1579 vbox = gtk_vbox_new(FALSE, 12); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1580 gtk_container_add(GTK_CONTAINER(colorize_settings), vbox); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1581 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1582 label = gtk_label_new(_("Audacious allows you to alter the color balance of the skinned UI. The sliders below will allow you to do this.")); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1583 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1584 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1585 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1586 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1587 table = gtk_table_new(3, 2, FALSE); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1588 gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1589 gtk_table_set_row_spacings(GTK_TABLE(table), 6); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1590 gtk_table_set_col_spacings(GTK_TABLE(table), 12); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1591 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1592 blue_label = gtk_label_new(_("Blue")); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1593 gtk_table_attach(GTK_TABLE(table), blue_label, 0, 1, 2, 3, |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1594 (GtkAttachOptions) (0), |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1595 (GtkAttachOptions) (0), 0, 0); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1596 gtk_label_set_justify(GTK_LABEL(blue_label), GTK_JUSTIFY_RIGHT); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1597 gtk_misc_set_alignment(GTK_MISC(blue_label), 1, 0.5); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1598 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1599 green_label = gtk_label_new(_("Green")); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1600 gtk_table_attach(GTK_TABLE(table), green_label, 0, 1, 1, 2, |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1601 (GtkAttachOptions) (0), |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1602 (GtkAttachOptions) (0), 0, 0); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1603 gtk_label_set_justify(GTK_LABEL(green_label), GTK_JUSTIFY_RIGHT); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1604 gtk_misc_set_alignment(GTK_MISC(green_label), 1, 0.5); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1605 |
3990
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1606 red_label = gtk_label_new(_("Red")); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1607 gtk_table_attach(GTK_TABLE(table), red_label, 0, 1, 0, 1, |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1608 (GtkAttachOptions) (0), |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1609 (GtkAttachOptions) (0), 0, 0); |
3989
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1610 gtk_label_set_justify(GTK_LABEL(red_label), GTK_JUSTIFY_RIGHT); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1611 gtk_misc_set_alignment(GTK_MISC(red_label), 1, 0.5); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1612 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1613 red_scale = gtk_hscale_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 255, 0, 0, 0))); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1614 gtk_table_attach(GTK_TABLE(table), red_scale, 1, 2, 0, 1, |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1615 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1616 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1617 gtk_scale_set_draw_value(GTK_SCALE(red_scale), FALSE); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1618 gtk_scale_set_digits(GTK_SCALE(red_scale), 3); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1619 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1620 green_scale = gtk_hscale_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 255, 0, 0, 0))); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1621 gtk_table_attach(GTK_TABLE(table), green_scale, 1, 2, 1, 2, |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1622 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1623 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1624 gtk_scale_set_draw_value(GTK_SCALE(green_scale), FALSE); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1625 gtk_scale_set_digits(GTK_SCALE(green_scale), 3); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1626 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1627 blue_scale = gtk_hscale_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 255, 0, 0, 0))); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1628 gtk_table_attach(GTK_TABLE(table), blue_scale, 1, 2, 2, 3, |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1629 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1630 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1631 gtk_scale_set_draw_value(GTK_SCALE(blue_scale), FALSE); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1632 gtk_scale_set_digits(GTK_SCALE(blue_scale), 3); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1633 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1634 hbuttonbox = gtk_hbutton_box_new(); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1635 gtk_box_pack_start(GTK_BOX(vbox), hbuttonbox, FALSE, FALSE, 0); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1636 gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox), GTK_BUTTONBOX_END); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1637 gtk_box_set_spacing(GTK_BOX(hbuttonbox), 6); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1638 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1639 colorize_close = gtk_button_new_from_stock("gtk-close"); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1640 gtk_container_add(GTK_CONTAINER(hbuttonbox), colorize_close); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1641 GTK_WIDGET_SET_FLAGS(colorize_close, GTK_CAN_DEFAULT); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1642 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1643 g_signal_connect((gpointer) red_scale, "value_changed", |
3993 | 1644 G_CALLBACK(on_red_scale_value_changed), |
3989
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1645 NULL); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1646 g_signal_connect((gpointer) green_scale, "value_changed", |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1647 G_CALLBACK(on_green_scale_value_changed), |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1648 NULL); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1649 g_signal_connect((gpointer) blue_scale, "value_changed", |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1650 G_CALLBACK(on_blue_scale_value_changed), |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1651 NULL); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1652 g_signal_connect((gpointer) colorize_close, "clicked", |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1653 G_CALLBACK(on_colorize_close_clicked), |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1654 NULL); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1655 |
3991
d6ac99c2be1d
destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents:
3990
diff
changeset
|
1656 gtk_range_set_value(GTK_RANGE(red_scale), cfg.colorize_r); |
d6ac99c2be1d
destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents:
3990
diff
changeset
|
1657 gtk_range_set_value(GTK_RANGE(green_scale), cfg.colorize_g); |
d6ac99c2be1d
destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents:
3990
diff
changeset
|
1658 gtk_range_set_value(GTK_RANGE(blue_scale), cfg.colorize_b); |
d6ac99c2be1d
destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents:
3990
diff
changeset
|
1659 |
3989
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1660 gtk_widget_grab_default(colorize_close); |
3991
d6ac99c2be1d
destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents:
3990
diff
changeset
|
1661 gtk_widget_show_all(colorize_settings); |
3989
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1662 } |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1663 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1664 void |
3990
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1665 create_filepopup_settings(void) |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1666 { |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1667 GtkWidget *vbox; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1668 GtkWidget *table; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1669 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1670 GtkWidget *label_cover_retrieve; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1671 GtkWidget *label_cover_search; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1672 GtkWidget *label_exclude; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1673 GtkWidget *label_include; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1674 GtkWidget *label_search_depth; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1675 GtkWidget *label_misc; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1676 GtkWidget *label_delay; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1677 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1678 GtkObject *recurse_for_cover_depth_adj; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1679 GtkObject *delay_adj; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1680 GtkWidget *alignment; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1681 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1682 GtkWidget *hbox; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1683 GtkWidget *hbuttonbox; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1684 GtkWidget *btn_cancel; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1685 GtkWidget *btn_ok; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1686 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1687 filepopup_settings = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1688 gtk_container_set_border_width(GTK_CONTAINER(filepopup_settings), 12); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1689 gtk_window_set_title(GTK_WINDOW(filepopup_settings), _("Popup Information Settings")); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1690 gtk_window_set_position(GTK_WINDOW(filepopup_settings), GTK_WIN_POS_CENTER_ON_PARENT); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1691 gtk_window_set_skip_taskbar_hint(GTK_WINDOW(filepopup_settings), TRUE); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1692 gtk_window_set_type_hint(GTK_WINDOW(filepopup_settings), GDK_WINDOW_TYPE_HINT_DIALOG); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1693 gtk_window_set_transient_for(GTK_WINDOW(filepopup_settings), GTK_WINDOW(prefswin)); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1694 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1695 vbox = gtk_vbox_new(FALSE, 12); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1696 gtk_container_add(GTK_CONTAINER(filepopup_settings), vbox); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1697 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1698 label_cover_retrieve = gtk_label_new(_("<b>Cover image retrieve</b>")); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1699 gtk_box_pack_start(GTK_BOX(vbox), label_cover_retrieve, FALSE, FALSE, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1700 gtk_label_set_use_markup(GTK_LABEL(label_cover_retrieve), TRUE); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1701 gtk_misc_set_alignment(GTK_MISC(label_cover_retrieve), 0, 0.5); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1702 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1703 label_cover_search = gtk_label_new(_("While searching for the album's cover, Audacious looks for certain words in the filename. You can specify those words in the lists below, separated using commas.")); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1704 gtk_box_pack_start(GTK_BOX(vbox), label_cover_search, FALSE, FALSE, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1705 gtk_label_set_line_wrap(GTK_LABEL(label_cover_search), TRUE); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1706 gtk_misc_set_alignment(GTK_MISC(label_cover_search), 0, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1707 gtk_misc_set_padding(GTK_MISC(label_cover_search), 12, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1708 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1709 table = gtk_table_new(2, 2, FALSE); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1710 gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1711 gtk_table_set_row_spacings(GTK_TABLE(table), 4); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1712 gtk_table_set_col_spacings(GTK_TABLE(table), 4); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1713 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1714 filepopup_settings_cover_name_include = gtk_entry_new(); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1715 gtk_table_attach(GTK_TABLE(table), filepopup_settings_cover_name_include, 1, 2, 0, 1, |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1716 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1717 (GtkAttachOptions) (0), 0, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1718 gtk_entry_set_activates_default(GTK_ENTRY(filepopup_settings_cover_name_include), TRUE); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1719 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1720 label_exclude = gtk_label_new(_("Exclude:")); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1721 gtk_table_attach(GTK_TABLE(table), label_exclude, 0, 1, 1, 2, |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1722 (GtkAttachOptions) (0), |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1723 (GtkAttachOptions) (0), 0, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1724 gtk_misc_set_alignment(GTK_MISC(label_exclude), 0, 0.5); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1725 gtk_misc_set_padding(GTK_MISC(label_exclude), 12, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1726 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1727 label_include = gtk_label_new(_("Include:")); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1728 gtk_table_attach(GTK_TABLE(table), label_include, 0, 1, 0, 1, |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1729 (GtkAttachOptions) (0), |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1730 (GtkAttachOptions) (0), 0, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1731 gtk_misc_set_alignment(GTK_MISC(label_include), 0, 0.5); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1732 gtk_misc_set_padding(GTK_MISC(label_include), 12, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1733 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1734 filepopup_settings_cover_name_exclude = gtk_entry_new(); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1735 gtk_table_attach(GTK_TABLE(table), filepopup_settings_cover_name_exclude, 1, 2, 1, 2, |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1736 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1737 (GtkAttachOptions) (0), 0, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1738 gtk_entry_set_activates_default(GTK_ENTRY(filepopup_settings_cover_name_exclude), TRUE); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1739 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1740 alignment = gtk_alignment_new(0.5, 0.5, 1, 1); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1741 gtk_box_pack_start(GTK_BOX(vbox), alignment, TRUE, TRUE, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1742 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 12, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1743 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1744 filepopup_settings_recurse_for_cover = gtk_check_button_new_with_mnemonic(_("Recursively search for cover")); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1745 gtk_container_add(GTK_CONTAINER(alignment), filepopup_settings_recurse_for_cover); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1746 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1747 alignment = gtk_alignment_new(0.5, 0.5, 1, 1); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1748 gtk_box_pack_start(GTK_BOX(vbox), alignment, FALSE, FALSE, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1749 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 45, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1750 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1751 filepopup_settings_recurse_for_cover_depth_box = gtk_hbox_new(FALSE, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1752 gtk_container_add(GTK_CONTAINER(alignment), filepopup_settings_recurse_for_cover_depth_box); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1753 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1754 label_search_depth = gtk_label_new(_("Search depth: ")); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1755 gtk_box_pack_start(GTK_BOX(filepopup_settings_recurse_for_cover_depth_box), label_search_depth, TRUE, TRUE, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1756 gtk_misc_set_padding(GTK_MISC(label_search_depth), 4, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1757 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1758 recurse_for_cover_depth_adj = gtk_adjustment_new(0, 0, 100, 1, 10, 10); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1759 filepopup_settings_recurse_for_cover_depth = gtk_spin_button_new(GTK_ADJUSTMENT(recurse_for_cover_depth_adj), 1, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1760 gtk_box_pack_start(GTK_BOX(filepopup_settings_recurse_for_cover_depth_box), filepopup_settings_recurse_for_cover_depth, TRUE, TRUE, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1761 gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(filepopup_settings_recurse_for_cover_depth), TRUE); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1762 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1763 alignment = gtk_alignment_new(0.5, 0.5, 1, 1); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1764 gtk_box_pack_start(GTK_BOX(vbox), alignment, TRUE, TRUE, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1765 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 12, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1766 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1767 filepopup_settings_use_file_cover = gtk_check_button_new_with_mnemonic(_("Use per-file cover")); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1768 gtk_container_add(GTK_CONTAINER(alignment), filepopup_settings_use_file_cover); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1769 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1770 label_misc = gtk_label_new(_("<b>Miscellaneous</b>")); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1771 gtk_box_pack_start(GTK_BOX(vbox), label_misc, FALSE, FALSE, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1772 gtk_label_set_use_markup(GTK_LABEL(label_misc), TRUE); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1773 gtk_misc_set_alignment(GTK_MISC(label_misc), 0, 0.5); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1774 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1775 alignment = gtk_alignment_new(0.5, 0.5, 1, 1); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1776 gtk_box_pack_start(GTK_BOX(vbox), alignment, FALSE, FALSE, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1777 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 12, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1778 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1779 filepopup_settings_showprogressbar = gtk_check_button_new_with_mnemonic(_("Show Progress bar for the current track")); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1780 gtk_container_add(GTK_CONTAINER(alignment), filepopup_settings_showprogressbar); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1781 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1782 alignment = gtk_alignment_new(0, 0.5, 1, 1); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1783 gtk_box_pack_start(GTK_BOX(vbox), alignment, TRUE, TRUE, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1784 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 12, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1785 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1786 hbox = gtk_hbox_new(FALSE, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1787 gtk_container_add(GTK_CONTAINER(alignment), hbox); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1788 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1789 label_delay = gtk_label_new(_("Delay until filepopup comes up: ")); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1790 gtk_box_pack_start(GTK_BOX(hbox), label_delay, TRUE, TRUE, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1791 gtk_misc_set_alignment(GTK_MISC(label_delay), 0, 0.5); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1792 gtk_misc_set_padding(GTK_MISC(label_delay), 12, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1793 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1794 delay_adj = gtk_adjustment_new(0, 0, 100, 1, 10, 10); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1795 filepopup_settings_delay = gtk_spin_button_new(GTK_ADJUSTMENT(delay_adj), 1, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1796 gtk_box_pack_start(GTK_BOX(hbox), filepopup_settings_delay, TRUE, TRUE, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1797 gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(filepopup_settings_delay), TRUE); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1798 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1799 hbuttonbox = gtk_hbutton_box_new(); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1800 gtk_box_pack_start(GTK_BOX(vbox), hbuttonbox, FALSE, FALSE, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1801 gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox), GTK_BUTTONBOX_END); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1802 gtk_box_set_spacing(GTK_BOX(hbuttonbox), 6); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1803 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1804 btn_cancel = gtk_button_new_from_stock("gtk-cancel"); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1805 gtk_container_add(GTK_CONTAINER(hbuttonbox), btn_cancel); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1806 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1807 btn_ok = gtk_button_new_from_stock("gtk-ok"); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1808 gtk_container_add(GTK_CONTAINER(hbuttonbox), btn_ok); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1809 GTK_WIDGET_SET_FLAGS(btn_ok, GTK_CAN_DEFAULT); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1810 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1811 g_signal_connect(G_OBJECT(filepopup_settings), "delete_event", |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1812 G_CALLBACK(gtk_widget_hide_on_delete), |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1813 NULL); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1814 g_signal_connect(G_OBJECT(btn_cancel), "clicked", |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1815 G_CALLBACK(on_filepopup_settings_cancel_clicked), |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1816 NULL); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1817 g_signal_connect(G_OBJECT(btn_ok), "clicked", |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1818 G_CALLBACK(on_filepopup_settings_ok_clicked), |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1819 NULL); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1820 g_signal_connect(G_OBJECT(filepopup_settings_recurse_for_cover), "toggled", |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1821 G_CALLBACK(on_recurse_for_cover_toggled), |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1822 filepopup_settings_recurse_for_cover_depth_box); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1823 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1824 gtk_widget_grab_default(btn_ok); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1825 gtk_widget_show_all(vbox); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1826 } |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1827 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1828 void |
2313 | 1829 create_prefs_window(void) |
1830 { | |
2467 | 1831 gchar *aud_version_string; |
2313 | 1832 |
1833 GtkWidget *titlestring_tag_menu, *menu_item; | |
1834 guint i; | |
3993 | 1835 |
1836 GtkWidget *vbox; | |
1837 GtkWidget *hbox1; | |
1838 GtkWidget *scrolledwindow6; | |
1839 GtkWidget *plugin_page_vbox; | |
1840 GtkWidget *plugin_notebook; | |
1841 GtkWidget *plugin_input_vbox; | |
1842 GtkWidget *alignment43; | |
1843 GtkWidget *input_plugin_list_label; | |
1844 GtkWidget *scrolledwindow3; | |
1845 GtkWidget *input_plugin_view; | |
1846 GtkWidget *input_plugin_button_box; | |
1847 GtkWidget *input_plugin_prefs; | |
1848 GtkWidget *input_plugin_info; | |
1849 GtkWidget *plugin_input_label; | |
1850 GtkWidget *plugin_general_vbox; | |
1851 GtkWidget *alignment45; | |
1852 GtkWidget *label11; | |
1853 GtkWidget *scrolledwindow5; | |
1854 GtkWidget *general_plugin_view; | |
1855 GtkWidget *general_plugin_button_box; | |
1856 GtkWidget *general_plugin_prefs; | |
1857 GtkWidget *general_plugin_info; | |
1858 GtkWidget *plugin_general_label; | |
1859 GtkWidget *vbox21; | |
1860 GtkWidget *alignment46; | |
1861 GtkWidget *label53; | |
1862 GtkWidget *scrolledwindow7; | |
1863 GtkWidget *vis_plugin_view; | |
1864 GtkWidget *hbuttonbox6; | |
1865 GtkWidget *vis_plugin_prefs; | |
1866 GtkWidget *vis_plugin_info; | |
1867 GtkWidget *vis_label; | |
1868 GtkWidget *vbox25; | |
1869 GtkWidget *alignment58; | |
1870 GtkWidget *label64; | |
1871 GtkWidget *scrolledwindow9; | |
1872 GtkWidget *effect_plugin_view; | |
1873 GtkWidget *hbuttonbox9; | |
1874 GtkWidget *effect_plugin_prefs; | |
1875 GtkWidget *effect_plugin_info; | |
1876 GtkWidget *effects_label; | |
1877 GtkWidget *plugin_label; | |
1878 GtkWidget *appearance_page_vbox; | |
1879 GtkWidget *vbox37; | |
1880 GtkWidget *vbox38; | |
1881 GtkWidget *hbox12; | |
1882 GtkWidget *alignment94; | |
1883 GtkWidget *hbox13; | |
1884 GtkWidget *label103; | |
1885 GtkWidget *colorspace_button; | |
1886 GtkWidget *image11; | |
1887 GtkWidget *image12; | |
1888 GtkWidget *alignment95; | |
1889 GtkWidget *skin_view_scrolled_window; | |
1890 GtkWidget *vbox39; | |
1891 GtkWidget *alignment96; | |
1892 GtkWidget *label104; | |
1893 GtkWidget *table14; | |
1894 GtkWidget *alignment97; | |
1895 GtkWidget *label105; | |
1896 GtkWidget *alignment98; | |
1897 GtkWidget *label106; | |
1898 GtkWidget *fontbutton1; | |
1899 GtkWidget *fontbutton2; | |
1900 GtkWidget *alignment99; | |
1901 GtkWidget *checkbutton11; | |
1902 GtkWidget *vbox40; | |
1903 GtkWidget *alignment100; | |
1904 GtkWidget *label107; | |
1905 GtkWidget *alignment101; | |
1906 GtkWidget *playlist_show_pl_numbers; | |
1907 GtkWidget *alignment102; | |
1908 GtkWidget *playlist_show_pl_separator; | |
1909 GtkWidget *alignment103; | |
1910 GtkWidget *checkbutton14; | |
1911 GtkWidget *alignment104; | |
1912 GtkWidget *show_wm_decorations; | |
1913 GtkWidget *alignment105; | |
1914 GtkWidget *xmms_style_fileselector_cb1; | |
1915 GtkWidget *alignment106; | |
1916 GtkWidget *checkbutton17; | |
1917 GtkWidget *appearance_label; | |
1918 GtkWidget *mouse_page_vbox; | |
1919 GtkWidget *vbox20; | |
1920 GtkWidget *alignment36; | |
1921 GtkWidget *label51; | |
1922 GtkWidget *alignment34; | |
1923 GtkWidget *table4; | |
1924 GtkObject *mouse_wheel_volume_adj; | |
1925 GtkWidget *mouse_wheel_volume; | |
1926 GtkWidget *label35; | |
1927 GtkObject *mouse_wheel_scroll_pl_adj; | |
1928 GtkWidget *mouse_wheel_scroll_pl; | |
1929 GtkWidget *label34; | |
1930 GtkWidget *label33; | |
1931 GtkWidget *label32; | |
1932 GtkWidget *mouse_label; | |
1933 GtkWidget *playlist_page_vbox; | |
1934 GtkWidget *vbox5; | |
1935 GtkWidget *alignment14; | |
1936 GtkWidget *label38; | |
1937 GtkWidget *alignment12; | |
1938 GtkWidget *playlist_convert_underscore; | |
1939 GtkWidget *alignment13; | |
1940 GtkWidget *playlist_convert_twenty; | |
1941 GtkWidget *alignment88; | |
1942 GtkWidget *playlist_convert_slash; | |
1943 GtkWidget *alignment15; | |
1944 GtkWidget *label39; | |
1945 GtkWidget *alignment16; | |
1946 GtkWidget *playlist_use_metadata; | |
1947 GtkWidget *alignment18; | |
1948 GtkWidget *playlist_use_metadata_box; | |
1949 GtkWidget *playlist_metadata_on_load; | |
1950 GSList *playlist_metadata_on_load_group = NULL; | |
1951 GtkWidget *playlist_metadata_on_display; | |
1952 GtkWidget *table10; | |
1953 GtkWidget *label73; | |
1954 GtkWidget *combobox1; | |
1955 GtkWidget *entry1; | |
1956 GtkWidget *label74; | |
1957 GtkWidget *alignment19; | |
1958 GtkWidget *label40; | |
1959 GtkWidget *alignment20; | |
1960 GtkWidget *refresh_file_list; | |
1961 GtkWidget *alignment55; | |
1962 GtkWidget *label60; | |
1963 GtkWidget *alignment56; | |
1964 GtkWidget *table6; | |
1965 GtkWidget *titlestring_help_button; | |
1966 GtkWidget *image1; | |
1967 GtkWidget *titlestring_cbox; | |
1968 GtkWidget *label62; | |
1969 GtkWidget *label61; | |
1970 GtkWidget *alignment85; | |
1971 GtkWidget *label84; | |
1972 GtkWidget *alignment86; | |
1973 GtkWidget *hbox9; | |
1974 GtkWidget *vbox34; | |
1975 GtkWidget *checkbutton10; | |
1976 GtkWidget *image8; | |
1977 GtkWidget *playlist_label; | |
1978 GtkWidget *equalizer_page_vbox; | |
1979 GtkWidget *alignment28; | |
1980 GtkWidget *vbox22; | |
1981 GtkWidget *alignment30; | |
1982 GtkWidget *equalizer_page_label; | |
1983 GtkWidget *vbox23; | |
1984 GtkWidget *alignment33; | |
1985 GtkWidget *table5; | |
1986 GtkWidget *label58; | |
1987 GtkWidget *label57; | |
1988 GtkWidget *eq_file_preset_entry; | |
1989 GtkWidget *eq_dir_preset_entry; | |
1990 GtkWidget *equalizer_label; | |
1991 GtkWidget *connectivity_page_vbox; | |
1992 GtkWidget *vbox29; | |
1993 GtkWidget *alignment63; | |
1994 GtkWidget *connectivity_page_label; | |
1995 GtkWidget *alignment68; | |
1996 GtkWidget *vbox30; | |
1997 GtkWidget *alignment65; | |
1998 GtkWidget *proxy_use; | |
1999 GtkWidget *table8; | |
2000 GtkWidget *proxy_port; | |
2001 GtkWidget *proxy_host; | |
2002 GtkWidget *label69; | |
2003 GtkWidget *label68; | |
2004 GtkWidget *alignment67; | |
2005 GtkWidget *proxy_auth; | |
2006 GtkWidget *table9; | |
2007 GtkWidget *proxy_pass; | |
2008 GtkWidget *proxy_user; | |
2009 GtkWidget *label71; | |
2010 GtkWidget *label70; | |
2011 GtkWidget *alignment72; | |
2012 GtkWidget *hbox6; | |
2013 GtkWidget *image4; | |
2014 GtkWidget *label75; | |
2015 GtkWidget *label95; | |
2016 GtkWidget *empty_notebook_page; | |
2017 GtkWidget *label96; | |
2018 GtkWidget *audio_scrolled_window; | |
2019 GtkWidget *audio_page_viewport; | |
2020 GtkWidget *audio_page_vbox; | |
2021 GtkWidget *alignment74; | |
2022 GtkWidget *label77; | |
2023 GtkWidget *alignment73; | |
2024 GtkWidget *vbox33; | |
2025 GtkWidget *table11; | |
2026 GtkWidget *image7; | |
2027 GtkWidget *label79; | |
2028 GtkWidget *label82; | |
2029 GtkObject *output_plugin_bufsize_adj; | |
2030 GtkWidget *output_plugin_bufsize; | |
2031 GtkWidget *output_plugin_cbox; | |
2032 GtkWidget *label78; | |
2033 GtkWidget *alignment82; | |
2034 GtkWidget *output_plugin_button_box; | |
2035 GtkWidget *output_plugin_prefs; | |
2036 GtkWidget *alignment76; | |
2037 GtkWidget *hbox7; | |
2038 GtkWidget *image5; | |
2039 GtkWidget *label80; | |
2040 GtkWidget *output_plugin_info; | |
2041 GtkWidget *alignment77; | |
2042 GtkWidget *hbox8; | |
2043 GtkWidget *image6; | |
2044 GtkWidget *label81; | |
2045 GtkWidget *alignment78; | |
2046 GtkWidget *label83; | |
2047 GtkWidget *alignment84; | |
2048 GtkWidget *audio_format_det_cb; | |
2049 GtkWidget *alignment89; | |
2050 GtkWidget *detect_by_extension_cb; | |
2051 GtkWidget *alignment83; | |
2052 GtkWidget *continue_playback_on_startup; | |
2053 GtkWidget *alignment79; | |
2054 GtkWidget *playlist_no_advance; | |
2055 GtkWidget *alignment80; | |
2056 GtkWidget *pause_between_songs; | |
2057 GtkWidget *alignment22; | |
2058 GtkWidget *pause_between_songs_box; | |
2059 GtkWidget *label41; | |
2060 GtkObject *pause_between_songs_time_adj; | |
2061 GtkWidget *pause_between_songs_time; | |
2062 GtkWidget *label42; | |
2063 GtkWidget *alignment90; | |
2064 GtkWidget *label93; | |
2065 GtkWidget *alignment92; | |
2066 GtkWidget *enable_src; | |
2067 GtkWidget *alignment91; | |
2068 GtkWidget *vbox36; | |
2069 GtkWidget *table13; | |
2070 GtkWidget *src_converter_type; | |
2071 GtkWidget *label94; | |
2072 GtkWidget *label92; | |
2073 GtkWidget *image9; | |
2074 GtkObject *src_rate_adj; | |
2075 GtkWidget *src_rate; | |
2076 GtkWidget *label91; | |
2077 GtkWidget *alignment4; | |
2078 GtkWidget *label2; | |
2079 GtkWidget *alignment7; | |
2080 GtkWidget *software_volume_control; | |
2081 GtkWidget *hseparator1; | |
2082 GtkWidget *hbox4; | |
2083 GtkWidget *audversionlabel; | |
2084 GtkWidget *prefswin_button_box; | |
2085 GtkWidget *reload_plugins; | |
2086 GtkWidget *alignment93; | |
2087 GtkWidget *hbox11; | |
2088 GtkWidget *image10; | |
2089 GtkWidget *label102; | |
2090 GtkWidget *close; | |
2091 GtkAccelGroup *accel_group; | |
2092 GtkTooltips *tooltips; | |
2093 | |
2094 tooltips = gtk_tooltips_new (); | |
2095 | |
2096 accel_group = gtk_accel_group_new (); | |
2097 | |
2098 prefswin = gtk_window_new (GTK_WINDOW_TOPLEVEL); | |
2099 gtk_container_set_border_width (GTK_CONTAINER (prefswin), 12); | |
2100 gtk_window_set_title (GTK_WINDOW (prefswin), _("Audacious Preferences")); | |
2101 gtk_window_set_position (GTK_WINDOW (prefswin), GTK_WIN_POS_CENTER); | |
2102 gtk_window_set_default_size (GTK_WINDOW (prefswin), 680, 400); | |
2103 | |
2104 vbox = gtk_vbox_new (FALSE, 0); | |
2105 gtk_container_add (GTK_CONTAINER (prefswin), vbox); | |
2106 | |
2107 hbox1 = gtk_hbox_new (FALSE, 8); | |
2108 gtk_box_pack_start (GTK_BOX (vbox), hbox1, TRUE, TRUE, 0); | |
2109 | |
2110 scrolledwindow6 = gtk_scrolled_window_new (NULL, NULL); | |
2111 gtk_box_pack_start (GTK_BOX (hbox1), scrolledwindow6, TRUE, TRUE, 0); | |
2112 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow6), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); | |
2113 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow6), GTK_SHADOW_IN); | |
2114 | |
2115 category_treeview = gtk_tree_view_new (); | |
2116 gtk_container_add (GTK_CONTAINER (scrolledwindow6), category_treeview); | |
2117 gtk_widget_set_size_request (category_treeview, 172, -1); | |
2118 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (category_treeview), FALSE); | |
2119 | |
2120 category_notebook = gtk_notebook_new (); | |
2121 gtk_box_pack_start (GTK_BOX (hbox1), category_notebook, TRUE, TRUE, 0); | |
2122 GTK_WIDGET_UNSET_FLAGS (category_notebook, GTK_CAN_FOCUS); | |
2123 gtk_notebook_set_show_tabs (GTK_NOTEBOOK (category_notebook), FALSE); | |
2124 gtk_notebook_set_show_border (GTK_NOTEBOOK (category_notebook), FALSE); | |
2125 gtk_notebook_set_scrollable (GTK_NOTEBOOK (category_notebook), TRUE); | |
2126 | |
2127 plugin_page_vbox = gtk_vbox_new (FALSE, 0); | |
2128 gtk_container_add (GTK_CONTAINER (category_notebook), plugin_page_vbox); | |
2129 | |
2130 plugin_notebook = gtk_notebook_new (); | |
2131 gtk_box_pack_start (GTK_BOX (plugin_page_vbox), plugin_notebook, TRUE, TRUE, 0); | |
2132 gtk_notebook_set_show_border (GTK_NOTEBOOK (plugin_notebook), FALSE); | |
2133 | |
2134 plugin_input_vbox = gtk_vbox_new (FALSE, 0); | |
2135 gtk_container_add (GTK_CONTAINER (plugin_notebook), plugin_input_vbox); | |
2136 gtk_container_set_border_width (GTK_CONTAINER (plugin_input_vbox), 12); | |
2137 | |
2138 alignment43 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2139 gtk_box_pack_start (GTK_BOX (plugin_input_vbox), alignment43, FALSE, FALSE, 4); | |
2140 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment43), 0, 6, 0, 0); | |
2141 | |
2142 input_plugin_list_label = gtk_label_new_with_mnemonic (_("_Decoder list:")); | |
2143 gtk_container_add (GTK_CONTAINER (alignment43), input_plugin_list_label); | |
2144 gtk_label_set_use_markup (GTK_LABEL (input_plugin_list_label), TRUE); | |
2145 gtk_misc_set_alignment (GTK_MISC (input_plugin_list_label), 0, 0.5); | |
2146 | |
2147 scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL); | |
2148 gtk_box_pack_start (GTK_BOX (plugin_input_vbox), scrolledwindow3, TRUE, TRUE, 0); | |
2149 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); | |
2150 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_SHADOW_IN); | |
2151 | |
2152 input_plugin_view = gtk_tree_view_new (); | |
2153 gtk_container_add (GTK_CONTAINER (scrolledwindow3), input_plugin_view); | |
2154 gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (input_plugin_view), TRUE); | |
2155 gtk_tree_view_set_reorderable (GTK_TREE_VIEW (input_plugin_view), TRUE); | |
2156 | |
2157 input_plugin_button_box = gtk_hbutton_box_new (); | |
2158 gtk_box_pack_start (GTK_BOX (plugin_input_vbox), input_plugin_button_box, FALSE, FALSE, 8); | |
2159 gtk_button_box_set_layout (GTK_BUTTON_BOX (input_plugin_button_box), GTK_BUTTONBOX_START); | |
2160 gtk_box_set_spacing (GTK_BOX (input_plugin_button_box), 8); | |
2161 | |
2162 input_plugin_prefs = gtk_button_new_from_stock ("gtk-preferences"); | |
2163 gtk_container_add (GTK_CONTAINER (input_plugin_button_box), input_plugin_prefs); | |
2164 gtk_widget_set_sensitive (input_plugin_prefs, FALSE); | |
2165 GTK_WIDGET_SET_FLAGS (input_plugin_prefs, GTK_CAN_DEFAULT); | |
2166 | |
2167 input_plugin_info = gtk_button_new_from_stock ("gtk-dialog-info"); | |
2168 gtk_container_add (GTK_CONTAINER (input_plugin_button_box), input_plugin_info); | |
2169 gtk_widget_set_sensitive (input_plugin_info, FALSE); | |
2170 GTK_WIDGET_SET_FLAGS (input_plugin_info, GTK_CAN_DEFAULT); | |
2171 | |
2172 plugin_input_label = gtk_label_new (_("<span size=\"medium\"><b>Decoders</b></span>")); | |
2173 gtk_notebook_set_tab_label (GTK_NOTEBOOK (plugin_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (plugin_notebook), 0), plugin_input_label); | |
2174 gtk_label_set_use_markup (GTK_LABEL (plugin_input_label), TRUE); | |
2175 gtk_misc_set_alignment (GTK_MISC (plugin_input_label), 0, 0); | |
2176 | |
2177 plugin_general_vbox = gtk_vbox_new (FALSE, 0); | |
2178 gtk_container_add (GTK_CONTAINER (plugin_notebook), plugin_general_vbox); | |
2179 gtk_container_set_border_width (GTK_CONTAINER (plugin_general_vbox), 12); | |
2180 | |
2181 alignment45 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2182 gtk_box_pack_start (GTK_BOX (plugin_general_vbox), alignment45, FALSE, FALSE, 4); | |
2183 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment45), 0, 6, 0, 0); | |
2184 | |
2185 label11 = gtk_label_new_with_mnemonic (_("_General plugin list:")); | |
2186 gtk_container_add (GTK_CONTAINER (alignment45), label11); | |
2187 gtk_label_set_use_markup (GTK_LABEL (label11), TRUE); | |
2188 gtk_misc_set_alignment (GTK_MISC (label11), 0, 0.5); | |
2189 | |
2190 scrolledwindow5 = gtk_scrolled_window_new (NULL, NULL); | |
2191 gtk_box_pack_start (GTK_BOX (plugin_general_vbox), scrolledwindow5, TRUE, TRUE, 0); | |
2192 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); | |
2193 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_SHADOW_IN); | |
2194 | |
2195 general_plugin_view = gtk_tree_view_new (); | |
2196 gtk_container_add (GTK_CONTAINER (scrolledwindow5), general_plugin_view); | |
2197 gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (general_plugin_view), TRUE); | |
2198 gtk_tree_view_set_reorderable (GTK_TREE_VIEW (general_plugin_view), TRUE); | |
2199 | |
2200 general_plugin_button_box = gtk_hbutton_box_new (); | |
2201 gtk_box_pack_start (GTK_BOX (plugin_general_vbox), general_plugin_button_box, FALSE, FALSE, 8); | |
2202 gtk_button_box_set_layout (GTK_BUTTON_BOX (general_plugin_button_box), GTK_BUTTONBOX_START); | |
2203 gtk_box_set_spacing (GTK_BOX (general_plugin_button_box), 8); | |
2204 | |
2205 general_plugin_prefs = gtk_button_new_from_stock ("gtk-preferences"); | |
2206 gtk_container_add (GTK_CONTAINER (general_plugin_button_box), general_plugin_prefs); | |
2207 gtk_widget_set_sensitive (general_plugin_prefs, FALSE); | |
2208 GTK_WIDGET_SET_FLAGS (general_plugin_prefs, GTK_CAN_DEFAULT); | |
2209 | |
2210 general_plugin_info = gtk_button_new_from_stock ("gtk-dialog-info"); | |
2211 gtk_container_add (GTK_CONTAINER (general_plugin_button_box), general_plugin_info); | |
2212 gtk_widget_set_sensitive (general_plugin_info, FALSE); | |
2213 GTK_WIDGET_SET_FLAGS (general_plugin_info, GTK_CAN_DEFAULT); | |
2214 | |
2215 plugin_general_label = gtk_label_new (_("<span size=\"medium\"><b>General</b></span>")); | |
2216 gtk_notebook_set_tab_label (GTK_NOTEBOOK (plugin_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (plugin_notebook), 1), plugin_general_label); | |
2217 gtk_label_set_use_markup (GTK_LABEL (plugin_general_label), TRUE); | |
2218 | |
2219 vbox21 = gtk_vbox_new (FALSE, 0); | |
2220 gtk_container_add (GTK_CONTAINER (plugin_notebook), vbox21); | |
2221 gtk_container_set_border_width (GTK_CONTAINER (vbox21), 12); | |
2222 | |
2223 alignment46 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2224 gtk_box_pack_start (GTK_BOX (vbox21), alignment46, FALSE, FALSE, 4); | |
2225 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment46), 0, 6, 0, 0); | |
2226 | |
2227 label53 = gtk_label_new_with_mnemonic (_("_Visualization plugin list:")); | |
2228 gtk_container_add (GTK_CONTAINER (alignment46), label53); | |
2229 gtk_label_set_use_markup (GTK_LABEL (label53), TRUE); | |
2230 gtk_misc_set_alignment (GTK_MISC (label53), 0, 0.5); | |
2231 | |
2232 scrolledwindow7 = gtk_scrolled_window_new (NULL, NULL); | |
2233 gtk_box_pack_start (GTK_BOX (vbox21), scrolledwindow7, TRUE, TRUE, 0); | |
2234 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow7), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); | |
2235 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow7), GTK_SHADOW_IN); | |
2236 | |
2237 vis_plugin_view = gtk_tree_view_new (); | |
2238 gtk_container_add (GTK_CONTAINER (scrolledwindow7), vis_plugin_view); | |
2239 gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (vis_plugin_view), TRUE); | |
2240 gtk_tree_view_set_reorderable (GTK_TREE_VIEW (vis_plugin_view), TRUE); | |
2241 | |
2242 hbuttonbox6 = gtk_hbutton_box_new (); | |
2243 gtk_box_pack_start (GTK_BOX (vbox21), hbuttonbox6, FALSE, FALSE, 8); | |
2244 gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox6), GTK_BUTTONBOX_START); | |
2245 gtk_box_set_spacing (GTK_BOX (hbuttonbox6), 8); | |
2246 | |
2247 vis_plugin_prefs = gtk_button_new_from_stock ("gtk-preferences"); | |
2248 gtk_container_add (GTK_CONTAINER (hbuttonbox6), vis_plugin_prefs); | |
2249 gtk_widget_set_sensitive (vis_plugin_prefs, FALSE); | |
2250 GTK_WIDGET_SET_FLAGS (vis_plugin_prefs, GTK_CAN_DEFAULT); | |
2251 | |
2252 vis_plugin_info = gtk_button_new_from_stock ("gtk-dialog-info"); | |
2253 gtk_container_add (GTK_CONTAINER (hbuttonbox6), vis_plugin_info); | |
2254 gtk_widget_set_sensitive (vis_plugin_info, FALSE); | |
2255 GTK_WIDGET_SET_FLAGS (vis_plugin_info, GTK_CAN_DEFAULT); | |
2256 | |
2257 vis_label = gtk_label_new (_("<b>Visualization</b>")); | |
2258 gtk_notebook_set_tab_label (GTK_NOTEBOOK (plugin_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (plugin_notebook), 2), vis_label); | |
2259 gtk_label_set_use_markup (GTK_LABEL (vis_label), TRUE); | |
2260 | |
2261 vbox25 = gtk_vbox_new (FALSE, 0); | |
2262 gtk_container_add (GTK_CONTAINER (plugin_notebook), vbox25); | |
2263 gtk_container_set_border_width (GTK_CONTAINER (vbox25), 12); | |
2264 | |
2265 alignment58 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2266 gtk_box_pack_start (GTK_BOX (vbox25), alignment58, FALSE, FALSE, 4); | |
2267 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment58), 0, 6, 0, 0); | |
2268 | |
2269 label64 = gtk_label_new_with_mnemonic (_("_Effect plugin list:")); | |
2270 gtk_container_add (GTK_CONTAINER (alignment58), label64); | |
2271 gtk_label_set_use_markup (GTK_LABEL (label64), TRUE); | |
2272 gtk_misc_set_alignment (GTK_MISC (label64), 0, 0.5); | |
2273 | |
2274 scrolledwindow9 = gtk_scrolled_window_new (NULL, NULL); | |
2275 gtk_box_pack_start (GTK_BOX (vbox25), scrolledwindow9, TRUE, TRUE, 0); | |
2276 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow9), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); | |
2277 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow9), GTK_SHADOW_IN); | |
2278 | |
2279 effect_plugin_view = gtk_tree_view_new (); | |
2280 gtk_container_add (GTK_CONTAINER (scrolledwindow9), effect_plugin_view); | |
2281 gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (effect_plugin_view), TRUE); | |
2282 gtk_tree_view_set_reorderable (GTK_TREE_VIEW (effect_plugin_view), TRUE); | |
2283 | |
2284 hbuttonbox9 = gtk_hbutton_box_new (); | |
2285 gtk_box_pack_start (GTK_BOX (vbox25), hbuttonbox9, FALSE, FALSE, 8); | |
2286 gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox9), GTK_BUTTONBOX_START); | |
2287 gtk_box_set_spacing (GTK_BOX (hbuttonbox9), 8); | |
2288 | |
2289 effect_plugin_prefs = gtk_button_new_from_stock ("gtk-preferences"); | |
2290 gtk_container_add (GTK_CONTAINER (hbuttonbox9), effect_plugin_prefs); | |
2291 gtk_widget_set_sensitive (effect_plugin_prefs, FALSE); | |
2292 GTK_WIDGET_SET_FLAGS (effect_plugin_prefs, GTK_CAN_DEFAULT); | |
2293 | |
2294 effect_plugin_info = gtk_button_new_from_stock ("gtk-dialog-info"); | |
2295 gtk_container_add (GTK_CONTAINER (hbuttonbox9), effect_plugin_info); | |
2296 gtk_widget_set_sensitive (effect_plugin_info, FALSE); | |
2297 GTK_WIDGET_SET_FLAGS (effect_plugin_info, GTK_CAN_DEFAULT); | |
2298 | |
2299 effects_label = gtk_label_new (_("<b>Effects</b>")); | |
2300 gtk_notebook_set_tab_label (GTK_NOTEBOOK (plugin_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (plugin_notebook), 3), effects_label); | |
2301 gtk_label_set_use_markup (GTK_LABEL (effects_label), TRUE); | |
2302 | |
2303 plugin_label = gtk_label_new (_("Plugins")); | |
2304 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 0), plugin_label); | |
2305 | |
2306 appearance_page_vbox = gtk_vbox_new (FALSE, 0); | |
2307 gtk_container_add (GTK_CONTAINER (category_notebook), appearance_page_vbox); | |
2308 | |
2309 vbox37 = gtk_vbox_new (FALSE, 0); | |
2310 gtk_box_pack_start (GTK_BOX (appearance_page_vbox), vbox37, TRUE, TRUE, 0); | |
2311 | |
2312 vbox38 = gtk_vbox_new (FALSE, 0); | |
2313 gtk_box_pack_start (GTK_BOX (vbox37), vbox38, FALSE, TRUE, 0); | |
2314 | |
2315 hbox12 = gtk_hbox_new (FALSE, 0); | |
2316 gtk_box_pack_start (GTK_BOX (vbox38), hbox12, TRUE, TRUE, 0); | |
2317 | |
2318 alignment94 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2319 gtk_box_pack_start (GTK_BOX (hbox12), alignment94, TRUE, TRUE, 0); | |
2320 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment94), 0, 4, 0, 0); | |
2321 | |
2322 hbox13 = gtk_hbox_new (FALSE, 0); | |
2323 gtk_container_add (GTK_CONTAINER (alignment94), hbox13); | |
2324 | |
2325 label103 = gtk_label_new_with_mnemonic (_("<b>_Skin</b>")); | |
2326 gtk_box_pack_start (GTK_BOX (hbox13), label103, TRUE, TRUE, 0); | |
2327 gtk_label_set_use_markup (GTK_LABEL (label103), TRUE); | |
2328 gtk_misc_set_alignment (GTK_MISC (label103), 0, 0); | |
2329 | |
2330 colorspace_button = gtk_button_new (); | |
2331 gtk_box_pack_start (GTK_BOX (hbox13), colorspace_button, FALSE, FALSE, 0); | |
2332 | |
2333 image11 = gtk_image_new_from_stock ("gtk-properties", GTK_ICON_SIZE_BUTTON); | |
2334 gtk_container_add (GTK_CONTAINER (colorspace_button), image11); | |
2335 | |
2336 skin_refresh_button = gtk_button_new (); | |
2337 gtk_box_pack_start (GTK_BOX (hbox13), skin_refresh_button, FALSE, FALSE, 0); | |
2338 GTK_WIDGET_UNSET_FLAGS (skin_refresh_button, GTK_CAN_FOCUS); | |
2339 gtk_tooltips_set_tip (tooltips, skin_refresh_button, _("Refresh skin list"), NULL); | |
2340 gtk_button_set_relief (GTK_BUTTON (skin_refresh_button), GTK_RELIEF_HALF); | |
2341 gtk_button_set_focus_on_click (GTK_BUTTON (skin_refresh_button), FALSE); | |
2342 | |
2343 image12 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON); | |
2344 gtk_container_add (GTK_CONTAINER (skin_refresh_button), image12); | |
2345 | |
2346 alignment95 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2347 gtk_box_pack_start (GTK_BOX (vbox38), alignment95, TRUE, TRUE, 0); | |
2348 gtk_widget_set_size_request (alignment95, -1, 172); | |
2349 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment95), 0, 0, 12, 0); | |
2350 | |
2351 skin_view_scrolled_window = gtk_scrolled_window_new (NULL, NULL); | |
2352 gtk_container_add (GTK_CONTAINER (alignment95), skin_view_scrolled_window); | |
2353 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (skin_view_scrolled_window), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); | |
2354 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (skin_view_scrolled_window), GTK_SHADOW_IN); | |
2355 | |
2356 skin_view = gtk_tree_view_new (); | |
2357 gtk_container_add (GTK_CONTAINER (skin_view_scrolled_window), skin_view); | |
2358 gtk_widget_set_size_request (skin_view, -1, 100); | |
2359 | |
2360 vbox39 = gtk_vbox_new (FALSE, 0); | |
2361 gtk_box_pack_start (GTK_BOX (vbox37), vbox39, FALSE, TRUE, 0); | |
2362 | |
2363 alignment96 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2364 gtk_box_pack_start (GTK_BOX (vbox39), alignment96, TRUE, TRUE, 0); | |
2365 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment96), 12, 6, 0, 0); | |
2366 | |
2367 label104 = gtk_label_new_with_mnemonic (_("<b>_Fonts</b>")); | |
2368 gtk_container_add (GTK_CONTAINER (alignment96), label104); | |
2369 gtk_label_set_use_markup (GTK_LABEL (label104), TRUE); | |
2370 gtk_misc_set_alignment (GTK_MISC (label104), 0, 0.5); | |
2371 | |
2372 table14 = gtk_table_new (2, 2, FALSE); | |
2373 gtk_box_pack_start (GTK_BOX (vbox39), table14, TRUE, TRUE, 0); | |
2374 gtk_table_set_row_spacings (GTK_TABLE (table14), 8); | |
2375 gtk_table_set_col_spacings (GTK_TABLE (table14), 2); | |
2376 | |
2377 alignment97 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2378 gtk_table_attach (GTK_TABLE (table14), alignment97, 0, 1, 0, 1, | |
2379 (GtkAttachOptions) (0), | |
2380 (GtkAttachOptions) (0), 0, 0); | |
2381 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment97), 0, 0, 12, 6); | |
2382 | |
2383 label105 = gtk_label_new_with_mnemonic (_("_Player:")); | |
2384 gtk_container_add (GTK_CONTAINER (alignment97), label105); | |
2385 gtk_label_set_use_markup (GTK_LABEL (label105), TRUE); | |
2386 gtk_misc_set_alignment (GTK_MISC (label105), 1, 0.5); | |
2387 | |
2388 alignment98 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2389 gtk_table_attach (GTK_TABLE (table14), alignment98, 0, 1, 1, 2, | |
2390 (GtkAttachOptions) (0), | |
2391 (GtkAttachOptions) (0), 0, 0); | |
2392 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment98), 0, 0, 12, 6); | |
2393 | |
2394 label106 = gtk_label_new_with_mnemonic (_("_Playlist:")); | |
2395 gtk_container_add (GTK_CONTAINER (alignment98), label106); | |
2396 gtk_label_set_use_markup (GTK_LABEL (label106), TRUE); | |
2397 gtk_label_set_justify (GTK_LABEL (label106), GTK_JUSTIFY_RIGHT); | |
2398 gtk_misc_set_alignment (GTK_MISC (label106), 1, 0.5); | |
2399 | |
2400 fontbutton1 = gtk_font_button_new (); | |
2401 gtk_table_attach (GTK_TABLE (table14), fontbutton1, 1, 2, 0, 1, | |
2402 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2403 (GtkAttachOptions) (0), 0, 0); | |
2404 gtk_font_button_set_title (GTK_FONT_BUTTON (fontbutton1), _("Select main player window font:")); | |
2405 gtk_font_button_set_use_font (GTK_FONT_BUTTON (fontbutton1), TRUE); | |
2406 gtk_font_button_set_use_size (GTK_FONT_BUTTON (fontbutton1), TRUE); | |
2407 | |
2408 fontbutton2 = gtk_font_button_new (); | |
2409 gtk_table_attach (GTK_TABLE (table14), fontbutton2, 1, 2, 1, 2, | |
2410 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2411 (GtkAttachOptions) (0), 0, 0); | |
2412 gtk_font_button_set_title (GTK_FONT_BUTTON (fontbutton2), _("Select playlist font:")); | |
2413 gtk_font_button_set_use_font (GTK_FONT_BUTTON (fontbutton2), TRUE); | |
2414 gtk_font_button_set_use_size (GTK_FONT_BUTTON (fontbutton2), TRUE); | |
2415 | |
2416 alignment99 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2417 gtk_box_pack_start (GTK_BOX (vbox39), alignment99, TRUE, TRUE, 0); | |
2418 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment99), 4, 0, 12, 0); | |
2419 | |
2420 checkbutton11 = gtk_check_button_new_with_mnemonic (_("Use Bitmap fonts if available")); | |
2421 gtk_container_add (GTK_CONTAINER (alignment99), checkbutton11); | |
2422 gtk_tooltips_set_tip (tooltips, checkbutton11, _("Use bitmap fonts if they are available. Bitmap fonts do not support Unicode strings."), NULL); | |
2423 | |
2424 vbox40 = gtk_vbox_new (FALSE, 0); | |
2425 gtk_box_pack_start (GTK_BOX (vbox37), vbox40, FALSE, TRUE, 0); | |
2426 | |
2427 alignment100 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2428 gtk_box_pack_start (GTK_BOX (vbox40), alignment100, TRUE, TRUE, 0); | |
2429 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment100), 12, 6, 0, 0); | |
2430 | |
2431 label107 = gtk_label_new_with_mnemonic (_("<b>_Miscellaneous</b>")); | |
2432 gtk_container_add (GTK_CONTAINER (alignment100), label107); | |
2433 gtk_label_set_use_markup (GTK_LABEL (label107), TRUE); | |
2434 gtk_misc_set_alignment (GTK_MISC (label107), 0, 0.5); | |
2435 | |
2436 alignment101 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2437 gtk_box_pack_start (GTK_BOX (vbox40), alignment101, TRUE, TRUE, 0); | |
2438 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment101), 2, 0, 12, 0); | |
2439 | |
2440 playlist_show_pl_numbers = gtk_check_button_new_with_mnemonic (_("Show track numbers in playlist")); | |
2441 gtk_container_add (GTK_CONTAINER (alignment101), playlist_show_pl_numbers); | |
2442 | |
2443 alignment102 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2444 gtk_box_pack_start (GTK_BOX (vbox40), alignment102, TRUE, TRUE, 0); | |
2445 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment102), 0, 0, 12, 0); | |
2446 | |
2447 playlist_show_pl_separator = gtk_check_button_new_with_mnemonic (_("Show separators in playlist")); | |
2448 gtk_container_add (GTK_CONTAINER (alignment102), playlist_show_pl_separator); | |
2449 | |
2450 alignment103 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2451 gtk_box_pack_start (GTK_BOX (vbox40), alignment103, TRUE, TRUE, 0); | |
2452 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment103), 0, 0, 12, 0); | |
2453 | |
2454 checkbutton14 = gtk_check_button_new_with_mnemonic (_("Use custom cursors")); | |
2455 gtk_container_add (GTK_CONTAINER (alignment103), checkbutton14); | |
2456 | |
2457 alignment104 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2458 gtk_box_pack_start (GTK_BOX (vbox40), alignment104, TRUE, TRUE, 0); | |
2459 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment104), 0, 0, 12, 0); | |
2460 | |
2461 show_wm_decorations = gtk_check_button_new_with_mnemonic (_("Show window manager decoration")); | |
2462 gtk_container_add (GTK_CONTAINER (alignment104), show_wm_decorations); | |
2463 gtk_tooltips_set_tip (tooltips, show_wm_decorations, _("This enables the window manager to show decorations for windows."), NULL); | |
2464 | |
2465 alignment105 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2466 gtk_box_pack_start (GTK_BOX (vbox40), alignment105, TRUE, TRUE, 0); | |
2467 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment105), 0, 0, 12, 0); | |
2468 | |
2469 xmms_style_fileselector_cb1 = gtk_check_button_new_with_mnemonic (_("Use XMMS-style file selector instead of the default selector")); | |
2470 gtk_container_add (GTK_CONTAINER (alignment105), xmms_style_fileselector_cb1); | |
2471 gtk_tooltips_set_tip (tooltips, xmms_style_fileselector_cb1, _("This enables the XMMS/GTK1-style file selection dialogs. This selector is provided by Audacious itself and is faster than the default GTK2 selector (but sadly not as user-friendly)."), NULL); | |
2472 | |
2473 alignment106 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2474 gtk_box_pack_start (GTK_BOX (vbox40), alignment106, TRUE, TRUE, 0); | |
2475 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment106), 0, 0, 12, 0); | |
2476 | |
2477 checkbutton17 = gtk_check_button_new_with_mnemonic (_("Use two-way text scroller")); | |
2478 gtk_container_add (GTK_CONTAINER (alignment106), checkbutton17); | |
2479 gtk_tooltips_set_tip (tooltips, checkbutton17, _("If selected, the file information text in the main window will scroll back and forth. If not selected, the text will only scroll in one direction."), NULL); | |
2480 | |
2481 appearance_label = gtk_label_new (_("Appearance")); | |
2482 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 1), appearance_label); | |
2483 | |
2484 mouse_page_vbox = gtk_vbox_new (FALSE, 0); | |
2485 gtk_container_add (GTK_CONTAINER (category_notebook), mouse_page_vbox); | |
2486 | |
2487 vbox20 = gtk_vbox_new (FALSE, 0); | |
2488 gtk_box_pack_start (GTK_BOX (mouse_page_vbox), vbox20, TRUE, TRUE, 0); | |
2489 | |
2490 alignment36 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2491 gtk_box_pack_start (GTK_BOX (vbox20), alignment36, FALSE, FALSE, 0); | |
2492 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment36), 0, 12, 0, 0); | |
2493 | |
2494 label51 = gtk_label_new (_("<b>Mouse wheel</b>")); | |
2495 gtk_container_add (GTK_CONTAINER (alignment36), label51); | |
2496 gtk_label_set_use_markup (GTK_LABEL (label51), TRUE); | |
2497 gtk_misc_set_alignment (GTK_MISC (label51), 0, 0); | |
2498 | |
2499 alignment34 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2500 gtk_box_pack_start (GTK_BOX (vbox20), alignment34, FALSE, FALSE, 0); | |
2501 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment34), 0, 0, 12, 0); | |
2502 | |
2503 table4 = gtk_table_new (2, 3, FALSE); | |
2504 gtk_container_add (GTK_CONTAINER (alignment34), table4); | |
2505 gtk_table_set_row_spacings (GTK_TABLE (table4), 6); | |
2506 | |
2507 mouse_wheel_volume_adj = gtk_adjustment_new (5, 0, 100, 1, 10, 10); | |
2508 mouse_wheel_volume = gtk_spin_button_new (GTK_ADJUSTMENT (mouse_wheel_volume_adj), 1, 0); | |
2509 gtk_table_attach (GTK_TABLE (table4), mouse_wheel_volume, 1, 2, 0, 1, | |
2510 (GtkAttachOptions) (0), | |
2511 (GtkAttachOptions) (0), 4, 0); | |
2512 gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (mouse_wheel_volume), TRUE); | |
2513 | |
2514 label35 = gtk_label_new (_("lines")); | |
2515 gtk_table_attach (GTK_TABLE (table4), label35, 2, 3, 1, 2, | |
2516 (GtkAttachOptions) (0), | |
2517 (GtkAttachOptions) (0), 0, 0); | |
2518 gtk_misc_set_alignment (GTK_MISC (label35), 0, 0.5); | |
2519 gtk_misc_set_padding (GTK_MISC (label35), 4, 0); | |
2520 | |
2521 mouse_wheel_scroll_pl_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10); | |
2522 mouse_wheel_scroll_pl = gtk_spin_button_new (GTK_ADJUSTMENT (mouse_wheel_scroll_pl_adj), 1, 0); | |
2523 gtk_table_attach (GTK_TABLE (table4), mouse_wheel_scroll_pl, 1, 2, 1, 2, | |
2524 (GtkAttachOptions) (0), | |
2525 (GtkAttachOptions) (0), 4, 0); | |
2526 | |
2527 label34 = gtk_label_new (_("Scrolls playlist by")); | |
2528 gtk_table_attach (GTK_TABLE (table4), label34, 0, 1, 1, 2, | |
2529 (GtkAttachOptions) (0), | |
2530 (GtkAttachOptions) (0), 0, 0); | |
2531 gtk_misc_set_alignment (GTK_MISC (label34), 0, 0.5); | |
2532 gtk_misc_set_padding (GTK_MISC (label34), 4, 0); | |
2533 | |
2534 label33 = gtk_label_new (_("percent")); | |
2535 gtk_table_attach (GTK_TABLE (table4), label33, 2, 3, 0, 1, | |
2536 (GtkAttachOptions) (0), | |
2537 (GtkAttachOptions) (0), 0, 0); | |
2538 gtk_misc_set_alignment (GTK_MISC (label33), 0, 0.5); | |
2539 gtk_misc_set_padding (GTK_MISC (label33), 4, 0); | |
2540 | |
2541 label32 = gtk_label_new (_("Changes volume by")); | |
2542 gtk_table_attach (GTK_TABLE (table4), label32, 0, 1, 0, 1, | |
2543 (GtkAttachOptions) (0), | |
2544 (GtkAttachOptions) (0), 0, 0); | |
2545 gtk_misc_set_alignment (GTK_MISC (label32), 0, 0.5); | |
2546 gtk_misc_set_padding (GTK_MISC (label32), 4, 0); | |
2547 | |
2548 mouse_label = gtk_label_new (_("Mouse")); | |
2549 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 2), mouse_label); | |
2550 | |
2551 playlist_page_vbox = gtk_vbox_new (FALSE, 0); | |
2552 gtk_container_add (GTK_CONTAINER (category_notebook), playlist_page_vbox); | |
2553 | |
2554 vbox5 = gtk_vbox_new (FALSE, 0); | |
2555 gtk_box_pack_start (GTK_BOX (playlist_page_vbox), vbox5, TRUE, TRUE, 0); | |
2556 | |
2557 alignment14 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2558 gtk_box_pack_start (GTK_BOX (vbox5), alignment14, FALSE, FALSE, 0); | |
2559 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment14), 0, 12, 0, 0); | |
2560 | |
2561 label38 = gtk_label_new (_("<b>Filename</b>")); | |
2562 gtk_container_add (GTK_CONTAINER (alignment14), label38); | |
2563 gtk_label_set_use_markup (GTK_LABEL (label38), TRUE); | |
2564 gtk_misc_set_alignment (GTK_MISC (label38), 0, 0.5); | |
2565 | |
2566 alignment12 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2567 gtk_box_pack_start (GTK_BOX (vbox5), alignment12, FALSE, FALSE, 0); | |
2568 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment12), 0, 0, 12, 0); | |
2569 | |
2570 playlist_convert_underscore = gtk_check_button_new_with_mnemonic (_("Convert underscores to blanks")); | |
2571 gtk_container_add (GTK_CONTAINER (alignment12), playlist_convert_underscore); | |
2572 | |
2573 alignment13 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2574 gtk_box_pack_start (GTK_BOX (vbox5), alignment13, FALSE, FALSE, 0); | |
2575 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment13), 0, 0, 12, 0); | |
2576 | |
2577 playlist_convert_twenty = gtk_check_button_new_with_mnemonic (_("Convert %20 to blanks")); | |
2578 gtk_container_add (GTK_CONTAINER (alignment13), playlist_convert_twenty); | |
2579 | |
2580 alignment88 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2581 gtk_box_pack_start (GTK_BOX (vbox5), alignment88, FALSE, FALSE, 0); | |
2582 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment88), 0, 0, 12, 0); | |
2583 | |
2584 playlist_convert_slash = gtk_check_button_new_with_mnemonic (_("Convert backslash '\\' to forward slash '/'")); | |
2585 gtk_container_add (GTK_CONTAINER (alignment88), playlist_convert_slash); | |
2586 | |
2587 alignment15 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2588 gtk_box_pack_start (GTK_BOX (vbox5), alignment15, FALSE, FALSE, 0); | |
2589 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment15), 12, 12, 0, 0); | |
2590 | |
2591 label39 = gtk_label_new (_("<b>Metadata</b>")); | |
2592 gtk_container_add (GTK_CONTAINER (alignment15), label39); | |
2593 gtk_label_set_use_markup (GTK_LABEL (label39), TRUE); | |
2594 gtk_misc_set_alignment (GTK_MISC (label39), 0, 0.5); | |
2595 | |
2596 alignment16 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2597 gtk_box_pack_start (GTK_BOX (vbox5), alignment16, FALSE, FALSE, 0); | |
2598 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment16), 0, 0, 12, 0); | |
2599 | |
2600 playlist_use_metadata = gtk_check_button_new_with_mnemonic (_("Load metadata from playlists and files")); | |
2601 gtk_container_add (GTK_CONTAINER (alignment16), playlist_use_metadata); | |
2602 gtk_tooltips_set_tip (tooltips, playlist_use_metadata, _("Load metadata (tag information) from music files."), NULL); | |
2603 | |
2604 alignment18 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2605 gtk_box_pack_start (GTK_BOX (vbox5), alignment18, FALSE, FALSE, 0); | |
2606 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment18), 0, 0, 24, 0); | |
2607 | |
2608 playlist_use_metadata_box = gtk_vbox_new (FALSE, 0); | |
2609 gtk_container_add (GTK_CONTAINER (alignment18), playlist_use_metadata_box); | |
2610 | |
2611 playlist_metadata_on_load = gtk_radio_button_new_with_mnemonic (NULL, _("On load")); | |
2612 gtk_box_pack_start (GTK_BOX (playlist_use_metadata_box), playlist_metadata_on_load, FALSE, FALSE, 0); | |
2613 gtk_tooltips_set_tip (tooltips, playlist_metadata_on_load, _("Load metadata when adding the file to the playlist or opening it"), NULL); | |
2614 gtk_radio_button_set_group (GTK_RADIO_BUTTON (playlist_metadata_on_load), playlist_metadata_on_load_group); | |
2615 playlist_metadata_on_load_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (playlist_metadata_on_load)); | |
2616 | |
2617 playlist_metadata_on_display = gtk_radio_button_new_with_mnemonic (NULL, _("On display")); | |
2618 gtk_box_pack_start (GTK_BOX (playlist_use_metadata_box), playlist_metadata_on_display, FALSE, FALSE, 0); | |
2619 gtk_tooltips_set_tip (tooltips, playlist_metadata_on_display, _("Load metadata on demand when displaying the file in the playlist. You may need to set \"Detect file formats on demand\" in Audio page for full benefit."), NULL); | |
2620 gtk_radio_button_set_group (GTK_RADIO_BUTTON (playlist_metadata_on_display), playlist_metadata_on_load_group); | |
2621 playlist_metadata_on_load_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (playlist_metadata_on_display)); | |
2622 | |
2623 table10 = gtk_table_new (2, 2, FALSE); | |
2624 gtk_box_pack_start (GTK_BOX (playlist_use_metadata_box), table10, TRUE, TRUE, 0); | |
2625 | |
2626 label73 = gtk_label_new (_("Auto character encoding detector for:")); | |
2627 gtk_table_attach (GTK_TABLE (table10), label73, 0, 1, 0, 1, | |
2628 (GtkAttachOptions) (0), | |
2629 (GtkAttachOptions) (0), 0, 0); | |
2630 gtk_label_set_justify (GTK_LABEL (label73), GTK_JUSTIFY_RIGHT); | |
2631 gtk_misc_set_alignment (GTK_MISC (label73), 1, 0.5); | |
2632 | |
2633 combobox1 = gtk_combo_box_new_text (); | |
2634 gtk_table_attach (GTK_TABLE (table10), combobox1, 1, 2, 0, 1, | |
2635 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2636 (GtkAttachOptions) (0), 0, 0); | |
2637 | |
2638 entry1 = gtk_entry_new (); | |
2639 gtk_table_attach (GTK_TABLE (table10), entry1, 1, 2, 1, 2, | |
2640 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2641 (GtkAttachOptions) (0), 0, 0); | |
2642 gtk_tooltips_set_tip (tooltips, entry1, _("List of character encodings used for fall back conversion of metadata. If automatic character encoding detector failed or has been disabled, encodings in this list would be treated as candidates of the encoding of metadata, and fall back conversion from these encodings to UTF-8 would be attempted."), NULL); | |
2643 | |
2644 label74 = gtk_label_new (_("Fallback character encodings:")); | |
2645 gtk_table_attach (GTK_TABLE (table10), label74, 0, 1, 1, 2, | |
2646 (GtkAttachOptions) (0), | |
2647 (GtkAttachOptions) (0), 0, 0); | |
2648 gtk_label_set_justify (GTK_LABEL (label74), GTK_JUSTIFY_RIGHT); | |
2649 gtk_misc_set_alignment (GTK_MISC (label74), 1, 0.5); | |
2650 | |
2651 alignment19 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2652 gtk_box_pack_start (GTK_BOX (vbox5), alignment19, FALSE, FALSE, 0); | |
2653 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment19), 12, 12, 0, 0); | |
2654 | |
2655 label40 = gtk_label_new (_("<b>File Dialog</b>")); | |
2656 gtk_container_add (GTK_CONTAINER (alignment19), label40); | |
2657 gtk_label_set_use_markup (GTK_LABEL (label40), TRUE); | |
2658 gtk_misc_set_alignment (GTK_MISC (label40), 0, 0.5); | |
2659 | |
2660 alignment20 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2661 gtk_box_pack_start (GTK_BOX (vbox5), alignment20, FALSE, FALSE, 0); | |
2662 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment20), 0, 0, 12, 0); | |
2663 | |
2664 refresh_file_list = gtk_check_button_new_with_mnemonic (_("Always refresh directory when opening file dialog")); | |
2665 gtk_container_add (GTK_CONTAINER (alignment20), refresh_file_list); | |
2666 gtk_tooltips_set_tip (tooltips, refresh_file_list, _("Always refresh the file dialog (this will slow opening the dialog on large directories, and Gnome VFS should handle automatically)."), NULL); | |
2667 | |
2668 alignment55 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2669 gtk_box_pack_start (GTK_BOX (vbox5), alignment55, FALSE, FALSE, 0); | |
2670 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment55), 12, 12, 0, 0); | |
2671 | |
2672 label60 = gtk_label_new (_("<b>Song Display</b>")); | |
2673 gtk_container_add (GTK_CONTAINER (alignment55), label60); | |
2674 gtk_label_set_use_markup (GTK_LABEL (label60), TRUE); | |
2675 gtk_misc_set_alignment (GTK_MISC (label60), 0, 0.5); | |
2676 | |
2677 alignment56 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2678 gtk_box_pack_start (GTK_BOX (vbox5), alignment56, FALSE, FALSE, 0); | |
2679 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment56), 0, 0, 12, 0); | |
2680 | |
2681 table6 = gtk_table_new (2, 3, FALSE); | |
2682 gtk_container_add (GTK_CONTAINER (alignment56), table6); | |
2683 gtk_table_set_row_spacings (GTK_TABLE (table6), 4); | |
2684 gtk_table_set_col_spacings (GTK_TABLE (table6), 12); | |
2685 | |
2686 titlestring_help_button = gtk_button_new (); | |
2687 gtk_table_attach (GTK_TABLE (table6), titlestring_help_button, 2, 3, 1, 2, | |
2688 (GtkAttachOptions) (0), | |
2689 (GtkAttachOptions) (0), 0, 0); | |
2690 GTK_WIDGET_UNSET_FLAGS (titlestring_help_button, GTK_CAN_FOCUS); | |
2691 gtk_tooltips_set_tip (tooltips, titlestring_help_button, _("Show information about titlestring format"), NULL); | |
2692 gtk_button_set_relief (GTK_BUTTON (titlestring_help_button), GTK_RELIEF_HALF); | |
2693 gtk_button_set_focus_on_click (GTK_BUTTON (titlestring_help_button), FALSE); | |
2694 | |
2695 image1 = gtk_image_new_from_stock ("gtk-index", GTK_ICON_SIZE_BUTTON); | |
2696 gtk_container_add (GTK_CONTAINER (titlestring_help_button), image1); | |
2697 | |
2698 titlestring_cbox = gtk_combo_box_new_text (); | |
2699 gtk_table_attach (GTK_TABLE (table6), titlestring_cbox, 1, 3, 0, 1, | |
2700 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2701 (GtkAttachOptions) (0), 0, 0); | |
2702 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("TITLE")); | |
2703 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("ARTIST - TITLE")); | |
2704 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("ARTIST - ALBUM - TITLE")); | |
2705 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("ARTIST - ALBUM - TRACK. TITLE")); | |
2706 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("ARTIST [ ALBUM ] - TRACK. TITLE")); | |
2707 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("ALBUM - TITLE")); | |
2708 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("Custom")); | |
2709 | |
2710 titlestring_entry = gtk_entry_new (); | |
2711 gtk_table_attach (GTK_TABLE (table6), titlestring_entry, 1, 2, 1, 2, | |
2712 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2713 (GtkAttachOptions) (0), 0, 0); | |
2714 | |
2715 label62 = gtk_label_new (_("Custom string:")); | |
2716 gtk_table_attach (GTK_TABLE (table6), label62, 0, 1, 1, 2, | |
2717 (GtkAttachOptions) (0), | |
2718 (GtkAttachOptions) (0), 0, 0); | |
2719 gtk_label_set_justify (GTK_LABEL (label62), GTK_JUSTIFY_RIGHT); | |
2720 gtk_misc_set_alignment (GTK_MISC (label62), 1, 0.5); | |
2721 | |
2722 label61 = gtk_label_new (_("Title format:")); | |
2723 gtk_table_attach (GTK_TABLE (table6), label61, 0, 1, 0, 1, | |
2724 (GtkAttachOptions) (0), | |
2725 (GtkAttachOptions) (0), 0, 0); | |
2726 gtk_label_set_justify (GTK_LABEL (label61), GTK_JUSTIFY_RIGHT); | |
2727 gtk_misc_set_alignment (GTK_MISC (label61), 1, 0.5); | |
2728 | |
2729 alignment85 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2730 gtk_box_pack_start (GTK_BOX (vbox5), alignment85, FALSE, FALSE, 0); | |
2731 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment85), 12, 12, 0, 0); | |
2732 | |
2733 label84 = gtk_label_new (_("<b>Popup Information</b>")); | |
2734 gtk_container_add (GTK_CONTAINER (alignment85), label84); | |
2735 gtk_label_set_use_markup (GTK_LABEL (label84), TRUE); | |
2736 gtk_misc_set_alignment (GTK_MISC (label84), 0, 0.5); | |
2737 | |
2738 alignment86 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2739 gtk_box_pack_start (GTK_BOX (vbox5), alignment86, FALSE, FALSE, 0); | |
2740 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment86), 0, 0, 12, 0); | |
2741 | |
2742 hbox9 = gtk_hbox_new (FALSE, 12); | |
2743 gtk_container_add (GTK_CONTAINER (alignment86), hbox9); | |
2744 | |
2745 vbox34 = gtk_vbox_new (FALSE, 0); | |
2746 gtk_box_pack_start (GTK_BOX (hbox9), vbox34, TRUE, TRUE, 0); | |
2747 | |
2748 checkbutton10 = gtk_check_button_new_with_mnemonic (_("Show popup information for playlist entries")); | |
2749 gtk_box_pack_start (GTK_BOX (vbox34), checkbutton10, TRUE, FALSE, 0); | |
2750 gtk_tooltips_set_tip (tooltips, checkbutton10, _("Toggles popup information window for the pointed entry in the playlist. The window shows title of song, name of album, genre, year of publish, track number, track length, and artwork."), NULL); | |
2751 | |
2752 filepopup_for_tuple_settings_button = gtk_button_new (); | |
2753 gtk_box_pack_start (GTK_BOX (hbox9), filepopup_for_tuple_settings_button, FALSE, FALSE, 0); | |
2754 GTK_WIDGET_UNSET_FLAGS (filepopup_for_tuple_settings_button, GTK_CAN_FOCUS); | |
2755 gtk_tooltips_set_tip (tooltips, filepopup_for_tuple_settings_button, _("Edit settings for popup information"), NULL); | |
2756 gtk_button_set_relief (GTK_BUTTON (filepopup_for_tuple_settings_button), GTK_RELIEF_HALF); | |
2757 | |
2758 image8 = gtk_image_new_from_stock ("gtk-properties", GTK_ICON_SIZE_BUTTON); | |
2759 gtk_container_add (GTK_CONTAINER (filepopup_for_tuple_settings_button), image8); | |
2760 | |
2761 playlist_label = gtk_label_new (_("Playlist")); | |
2762 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 3), playlist_label); | |
2763 | |
2764 equalizer_page_vbox = gtk_vbox_new (FALSE, 0); | |
2765 gtk_container_add (GTK_CONTAINER (category_notebook), equalizer_page_vbox); | |
2766 | |
2767 alignment28 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2768 gtk_box_pack_start (GTK_BOX (equalizer_page_vbox), alignment28, TRUE, TRUE, 0); | |
2769 | |
2770 vbox22 = gtk_vbox_new (FALSE, 0); | |
2771 gtk_container_add (GTK_CONTAINER (alignment28), vbox22); | |
2772 | |
2773 alignment30 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2774 gtk_box_pack_start (GTK_BOX (vbox22), alignment30, FALSE, FALSE, 0); | |
2775 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment30), 0, 12, 0, 0); | |
2776 | |
2777 equalizer_page_label = gtk_label_new (_("<b>Presets</b>")); | |
2778 gtk_container_add (GTK_CONTAINER (alignment30), equalizer_page_label); | |
2779 gtk_label_set_use_markup (GTK_LABEL (equalizer_page_label), TRUE); | |
2780 gtk_misc_set_alignment (GTK_MISC (equalizer_page_label), 0, 0.5); | |
2781 | |
2782 vbox23 = gtk_vbox_new (FALSE, 0); | |
2783 gtk_box_pack_start (GTK_BOX (vbox22), vbox23, TRUE, TRUE, 0); | |
2784 | |
2785 alignment33 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2786 gtk_box_pack_start (GTK_BOX (vbox23), alignment33, FALSE, FALSE, 0); | |
2787 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment33), 0, 12, 0, 0); | |
2788 | |
2789 table5 = gtk_table_new (2, 2, FALSE); | |
2790 gtk_container_add (GTK_CONTAINER (alignment33), table5); | |
2791 gtk_table_set_row_spacings (GTK_TABLE (table5), 6); | |
2792 gtk_table_set_col_spacings (GTK_TABLE (table5), 6); | |
2793 | |
2794 label58 = gtk_label_new (_("File preset extension:")); | |
2795 gtk_table_attach (GTK_TABLE (table5), label58, 0, 1, 1, 2, | |
2796 (GtkAttachOptions) (0), | |
2797 (GtkAttachOptions) (0), 0, 0); | |
2798 gtk_misc_set_alignment (GTK_MISC (label58), 0, 0.5); | |
2799 | |
2800 label57 = gtk_label_new (_("Directory preset file:")); | |
2801 gtk_table_attach (GTK_TABLE (table5), label57, 0, 1, 0, 1, | |
2802 (GtkAttachOptions) (0), | |
2803 (GtkAttachOptions) (0), 0, 0); | |
2804 gtk_misc_set_alignment (GTK_MISC (label57), 0, 0.5); | |
2805 | |
2806 eq_file_preset_entry = gtk_entry_new (); | |
2807 gtk_table_attach (GTK_TABLE (table5), eq_file_preset_entry, 1, 2, 1, 2, | |
2808 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2809 (GtkAttachOptions) (0), 0, 0); | |
2810 | |
2811 eq_dir_preset_entry = gtk_entry_new (); | |
2812 gtk_table_attach (GTK_TABLE (table5), eq_dir_preset_entry, 1, 2, 0, 1, | |
2813 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2814 (GtkAttachOptions) (0), 0, 0); | |
2815 | |
2816 equalizer_label = gtk_label_new (_("Equalizer")); | |
2817 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 4), equalizer_label); | |
2818 | |
2819 connectivity_page_vbox = gtk_vbox_new (FALSE, 0); | |
2820 gtk_container_add (GTK_CONTAINER (category_notebook), connectivity_page_vbox); | |
2821 | |
2822 vbox29 = gtk_vbox_new (FALSE, 0); | |
2823 gtk_box_pack_start (GTK_BOX (connectivity_page_vbox), vbox29, TRUE, TRUE, 0); | |
2824 | |
2825 alignment63 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2826 gtk_box_pack_start (GTK_BOX (vbox29), alignment63, FALSE, FALSE, 0); | |
2827 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment63), 0, 12, 0, 0); | |
2828 | |
2829 connectivity_page_label = gtk_label_new (_("<b>Proxy Configuration</b>")); | |
2830 gtk_container_add (GTK_CONTAINER (alignment63), connectivity_page_label); | |
2831 gtk_label_set_use_markup (GTK_LABEL (connectivity_page_label), TRUE); | |
2832 gtk_misc_set_alignment (GTK_MISC (connectivity_page_label), 0, 0.5); | |
2833 | |
2834 alignment68 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2835 gtk_box_pack_start (GTK_BOX (vbox29), alignment68, TRUE, TRUE, 0); | |
2836 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment68), 0, 0, 12, 0); | |
2837 | |
2838 vbox30 = gtk_vbox_new (FALSE, 0); | |
2839 gtk_container_add (GTK_CONTAINER (alignment68), vbox30); | |
2840 | |
2841 alignment65 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2842 gtk_box_pack_start (GTK_BOX (vbox30), alignment65, FALSE, FALSE, 0); | |
2843 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment65), 0, 12, 0, 0); | |
2844 | |
2845 proxy_use = gtk_check_button_new_with_mnemonic (_("Enable proxy usage")); | |
2846 gtk_container_add (GTK_CONTAINER (alignment65), proxy_use); | |
2847 | |
2848 table8 = gtk_table_new (2, 2, FALSE); | |
2849 gtk_box_pack_start (GTK_BOX (vbox30), table8, FALSE, FALSE, 0); | |
2850 gtk_table_set_row_spacings (GTK_TABLE (table8), 6); | |
2851 gtk_table_set_col_spacings (GTK_TABLE (table8), 6); | |
2852 | |
2853 proxy_port = gtk_entry_new (); | |
2854 gtk_table_attach (GTK_TABLE (table8), proxy_port, 1, 2, 1, 2, | |
2855 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2856 (GtkAttachOptions) (0), 0, 0); | |
2857 | |
2858 proxy_host = gtk_entry_new (); | |
2859 gtk_table_attach (GTK_TABLE (table8), proxy_host, 1, 2, 0, 1, | |
2860 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2861 (GtkAttachOptions) (0), 0, 0); | |
2862 | |
2863 label69 = gtk_label_new (_("Proxy port:")); | |
2864 gtk_table_attach (GTK_TABLE (table8), label69, 0, 1, 1, 2, | |
2865 (GtkAttachOptions) (0), | |
2866 (GtkAttachOptions) (0), 0, 0); | |
2867 gtk_misc_set_alignment (GTK_MISC (label69), 0, 0.5); | |
2868 | |
2869 label68 = gtk_label_new (_("Proxy hostname:")); | |
2870 gtk_table_attach (GTK_TABLE (table8), label68, 0, 1, 0, 1, | |
2871 (GtkAttachOptions) (0), | |
2872 (GtkAttachOptions) (0), 0, 0); | |
2873 gtk_misc_set_alignment (GTK_MISC (label68), 0, 0); | |
2874 | |
2875 alignment67 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2876 gtk_box_pack_start (GTK_BOX (vbox30), alignment67, FALSE, FALSE, 0); | |
2877 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment67), 12, 12, 0, 0); | |
2878 | |
2879 proxy_auth = gtk_check_button_new_with_mnemonic (_("Use authentication with proxy")); | |
2880 gtk_container_add (GTK_CONTAINER (alignment67), proxy_auth); | |
2881 | |
2882 table9 = gtk_table_new (2, 2, FALSE); | |
2883 gtk_box_pack_start (GTK_BOX (vbox30), table9, FALSE, FALSE, 0); | |
2884 gtk_table_set_row_spacings (GTK_TABLE (table9), 6); | |
2885 gtk_table_set_col_spacings (GTK_TABLE (table9), 6); | |
2886 | |
2887 proxy_pass = gtk_entry_new (); | |
2888 gtk_table_attach (GTK_TABLE (table9), proxy_pass, 1, 2, 1, 2, | |
2889 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2890 (GtkAttachOptions) (0), 0, 0); | |
2891 gtk_entry_set_visibility (GTK_ENTRY (proxy_pass), FALSE); | |
2892 | |
2893 proxy_user = gtk_entry_new (); | |
2894 gtk_table_attach (GTK_TABLE (table9), proxy_user, 1, 2, 0, 1, | |
2895 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2896 (GtkAttachOptions) (0), 0, 0); | |
2897 | |
2898 label71 = gtk_label_new (_("Proxy password:")); | |
2899 gtk_table_attach (GTK_TABLE (table9), label71, 0, 1, 1, 2, | |
2900 (GtkAttachOptions) (0), | |
2901 (GtkAttachOptions) (0), 0, 0); | |
2902 gtk_misc_set_alignment (GTK_MISC (label71), 0, 0.5); | |
2903 | |
2904 label70 = gtk_label_new (_("Proxy username:")); | |
2905 gtk_table_attach (GTK_TABLE (table9), label70, 0, 1, 0, 1, | |
2906 (GtkAttachOptions) (0), | |
2907 (GtkAttachOptions) (0), 0, 0); | |
2908 gtk_misc_set_alignment (GTK_MISC (label70), 0, 0); | |
2909 | |
2910 alignment72 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2911 gtk_box_pack_start (GTK_BOX (vbox30), alignment72, FALSE, FALSE, 0); | |
2912 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment72), 6, 0, 0, 0); | |
2913 | |
2914 hbox6 = gtk_hbox_new (FALSE, 0); | |
2915 gtk_container_add (GTK_CONTAINER (alignment72), hbox6); | |
2916 | |
2917 image4 = gtk_image_new_from_stock ("gtk-dialog-warning", GTK_ICON_SIZE_BUTTON); | |
2918 gtk_box_pack_start (GTK_BOX (hbox6), image4, FALSE, FALSE, 0); | |
2919 gtk_misc_set_padding (GTK_MISC (image4), 3, 0); | |
2920 | |
2921 label75 = gtk_label_new (_("<span size=\"small\">Changing these settings will require a restart of Audacious.</span>")); | |
2922 gtk_box_pack_start (GTK_BOX (hbox6), label75, FALSE, FALSE, 0); | |
2923 gtk_label_set_use_markup (GTK_LABEL (label75), TRUE); | |
2924 | |
2925 label95 = gtk_label_new (""); | |
2926 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 5), label95); | |
2927 | |
2928 empty_notebook_page = gtk_vbox_new (FALSE, 0); | |
2929 gtk_container_add (GTK_CONTAINER (category_notebook), empty_notebook_page); | |
2930 | |
2931 label96 = gtk_label_new (""); | |
2932 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 6), label96); | |
2933 | |
2934 audio_scrolled_window = gtk_scrolled_window_new (NULL, NULL); | |
2935 gtk_container_add (GTK_CONTAINER (empty_notebook_page), audio_scrolled_window); | |
2936 gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (category_notebook), audio_scrolled_window, | |
2937 TRUE, TRUE, GTK_PACK_START); | |
2938 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (audio_scrolled_window), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); | |
2939 | |
2940 audio_page_viewport = gtk_viewport_new (NULL, NULL); | |
2941 gtk_container_add (GTK_CONTAINER (audio_scrolled_window), audio_page_viewport); | |
2942 gtk_widget_set_events (audio_page_viewport, GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK); | |
2943 gtk_viewport_set_shadow_type (GTK_VIEWPORT (audio_page_viewport), GTK_SHADOW_NONE); | |
2944 | |
2945 audio_page_vbox = gtk_vbox_new (FALSE, 0); | |
2946 gtk_container_add (GTK_CONTAINER (audio_page_viewport), audio_page_vbox); | |
2947 | |
2948 alignment74 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2949 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment74, FALSE, FALSE, 0); | |
2950 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment74), 0, 12, 0, 0); | |
2951 | |
2952 label77 = gtk_label_new (_("<b>Audio System</b>")); | |
2953 gtk_container_add (GTK_CONTAINER (alignment74), label77); | |
2954 gtk_label_set_use_markup (GTK_LABEL (label77), TRUE); | |
2955 gtk_misc_set_alignment (GTK_MISC (label77), 0, 0.5); | |
2956 | |
2957 alignment73 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2958 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment73, FALSE, FALSE, 0); | |
2959 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment73), 0, 6, 12, 0); | |
2960 | |
2961 vbox33 = gtk_vbox_new (FALSE, 0); | |
2962 gtk_container_add (GTK_CONTAINER (alignment73), vbox33); | |
2963 | |
2964 table11 = gtk_table_new (3, 2, FALSE); | |
2965 gtk_box_pack_start (GTK_BOX (vbox33), table11, FALSE, FALSE, 0); | |
2966 gtk_table_set_row_spacings (GTK_TABLE (table11), 6); | |
2967 gtk_table_set_col_spacings (GTK_TABLE (table11), 6); | |
2968 | |
2969 image7 = gtk_image_new_from_stock ("gtk-info", GTK_ICON_SIZE_BUTTON); | |
2970 gtk_table_attach (GTK_TABLE (table11), image7, 0, 1, 2, 3, | |
2971 (GtkAttachOptions) (0), | |
2972 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); | |
2973 gtk_misc_set_alignment (GTK_MISC (image7), 1, 0); | |
2974 | |
2975 label79 = gtk_label_new (_("Buffer size:")); | |
2976 gtk_table_attach (GTK_TABLE (table11), label79, 0, 1, 1, 2, | |
2977 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2978 (GtkAttachOptions) (0), 0, 0); | |
2979 gtk_misc_set_alignment (GTK_MISC (label79), 1, 0.5); | |
2980 | |
2981 label82 = gtk_label_new (_("<span size=\"small\">This is the amount of time to prebuffer audio streams by, in milliseconds.\nIncrease this value if you are experiencing audio skipping.\nPlease note however, that high values will result in Audacious performing poorly.</span>")); | |
2982 gtk_table_attach (GTK_TABLE (table11), label82, 1, 2, 2, 3, | |
2983 (GtkAttachOptions) (0), | |
2984 (GtkAttachOptions) (0), 0, 0); | |
2985 gtk_label_set_use_markup (GTK_LABEL (label82), TRUE); | |
2986 gtk_label_set_line_wrap (GTK_LABEL (label82), TRUE); | |
2987 gtk_misc_set_alignment (GTK_MISC (label82), 0, 0.5); | |
2988 | |
2989 output_plugin_bufsize_adj = gtk_adjustment_new (0, 0, 600000, 100, 1000, 1000); | |
2990 output_plugin_bufsize = gtk_spin_button_new (GTK_ADJUSTMENT (output_plugin_bufsize_adj), 1, 0); | |
2991 gtk_table_attach (GTK_TABLE (table11), output_plugin_bufsize, 1, 2, 1, 2, | |
2992 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2993 (GtkAttachOptions) (0), 0, 0); | |
2994 | |
2995 output_plugin_cbox = gtk_combo_box_new_text (); | |
2996 gtk_table_attach (GTK_TABLE (table11), output_plugin_cbox, 1, 2, 0, 1, | |
2997 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2998 (GtkAttachOptions) (0), 0, 0); | |
2999 | |
3000 label78 = gtk_label_new (_("Current output plugin:")); | |
3001 gtk_table_attach (GTK_TABLE (table11), label78, 0, 1, 0, 1, | |
3002 (GtkAttachOptions) (0), | |
3003 (GtkAttachOptions) (0), 0, 0); | |
3004 gtk_misc_set_alignment (GTK_MISC (label78), 0, 0.5); | |
3005 | |
3006 alignment82 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3007 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment82, FALSE, FALSE, 0); | |
3008 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment82), 0, 0, 12, 0); | |
3009 | |
3010 output_plugin_button_box = gtk_hbutton_box_new (); | |
3011 gtk_container_add (GTK_CONTAINER (alignment82), output_plugin_button_box); | |
3012 gtk_button_box_set_layout (GTK_BUTTON_BOX (output_plugin_button_box), GTK_BUTTONBOX_START); | |
3013 gtk_box_set_spacing (GTK_BOX (output_plugin_button_box), 8); | |
3014 | |
3015 output_plugin_prefs = gtk_button_new (); | |
3016 gtk_container_add (GTK_CONTAINER (output_plugin_button_box), output_plugin_prefs); | |
3017 gtk_widget_set_sensitive (output_plugin_prefs, FALSE); | |
3018 GTK_WIDGET_SET_FLAGS (output_plugin_prefs, GTK_CAN_DEFAULT); | |
3019 | |
3020 alignment76 = gtk_alignment_new (0.5, 0.5, 0, 0); | |
3021 gtk_container_add (GTK_CONTAINER (output_plugin_prefs), alignment76); | |
3022 | |
3023 hbox7 = gtk_hbox_new (FALSE, 2); | |
3024 gtk_container_add (GTK_CONTAINER (alignment76), hbox7); | |
3025 | |
3026 image5 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_BUTTON); | |
3027 gtk_box_pack_start (GTK_BOX (hbox7), image5, FALSE, FALSE, 0); | |
3028 | |
3029 label80 = gtk_label_new_with_mnemonic (_("Output Plugin Preferences")); | |
3030 gtk_box_pack_start (GTK_BOX (hbox7), label80, FALSE, FALSE, 0); | |
3031 | |
3032 output_plugin_info = gtk_button_new (); | |
3033 gtk_container_add (GTK_CONTAINER (output_plugin_button_box), output_plugin_info); | |
3034 gtk_widget_set_sensitive (output_plugin_info, FALSE); | |
3035 GTK_WIDGET_SET_FLAGS (output_plugin_info, GTK_CAN_DEFAULT); | |
3036 | |
3037 alignment77 = gtk_alignment_new (0.5, 0.5, 0, 0); | |
3038 gtk_container_add (GTK_CONTAINER (output_plugin_info), alignment77); | |
3039 | |
3040 hbox8 = gtk_hbox_new (FALSE, 2); | |
3041 gtk_container_add (GTK_CONTAINER (alignment77), hbox8); | |
3042 | |
3043 image6 = gtk_image_new_from_stock ("gtk-about", GTK_ICON_SIZE_BUTTON); | |
3044 gtk_box_pack_start (GTK_BOX (hbox8), image6, FALSE, FALSE, 0); | |
3045 | |
3046 label81 = gtk_label_new_with_mnemonic (_("Output Plugin Information")); | |
3047 gtk_box_pack_start (GTK_BOX (hbox8), label81, FALSE, FALSE, 0); | |
3048 | |
3049 alignment78 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3050 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment78, FALSE, FALSE, 0); | |
3051 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment78), 12, 12, 0, 0); | |
3052 | |
3053 label83 = gtk_label_new (_("<b>Format Detection</b>")); | |
3054 gtk_container_add (GTK_CONTAINER (alignment78), label83); | |
3055 gtk_label_set_use_markup (GTK_LABEL (label83), TRUE); | |
3056 gtk_misc_set_alignment (GTK_MISC (label83), 0, 0.5); | |
3057 | |
3058 alignment84 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3059 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment84, FALSE, FALSE, 0); | |
3060 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment84), 0, 0, 12, 0); | |
3061 | |
3062 audio_format_det_cb = gtk_check_button_new_with_mnemonic (_("Detect file formats on demand, instead of immediately.")); | |
3063 gtk_container_add (GTK_CONTAINER (alignment84), audio_format_det_cb); | |
3064 gtk_tooltips_set_tip (tooltips, audio_format_det_cb, _("When checked, Audacious will detect file formats on demand. This can result in a messier playlist, but delivers a major speed benefit."), NULL); | |
3065 | |
3066 alignment89 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3067 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment89, FALSE, FALSE, 0); | |
3068 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment89), 0, 0, 12, 0); | |
3069 | |
3070 detect_by_extension_cb = gtk_check_button_new_with_mnemonic (_("Detect file formats by extension.")); | |
3071 gtk_container_add (GTK_CONTAINER (alignment89), detect_by_extension_cb); | |
3072 gtk_tooltips_set_tip (tooltips, detect_by_extension_cb, _("When checked, Audacious will detect file formats based by extension. Only files with extensions of supported formats will be loaded."), NULL); | |
3073 | |
3074 alignment19 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3075 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment19, FALSE, FALSE, 0); | |
3076 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment19), 12, 12, 0, 0); | |
3077 | |
3078 label40 = gtk_label_new (_("<b>Playback</b>")); | |
3079 gtk_container_add (GTK_CONTAINER (alignment19), label40); | |
3080 gtk_label_set_use_markup (GTK_LABEL (label40), TRUE); | |
3081 gtk_misc_set_alignment (GTK_MISC (label40), 0, 0.5); | |
3082 | |
3083 alignment83 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3084 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment83, FALSE, FALSE, 0); | |
3085 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment83), 0, 0, 12, 0); | |
3086 | |
3087 continue_playback_on_startup = gtk_check_button_new_with_mnemonic (_("Continue playback on startup")); | |
3088 gtk_container_add (GTK_CONTAINER (alignment83), continue_playback_on_startup); | |
3089 gtk_tooltips_set_tip (tooltips, continue_playback_on_startup, _("When Audacious starts, automatically begin playing from the point where we stopped before."), NULL); | |
3090 | |
3091 alignment79 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3092 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment79, FALSE, FALSE, 0); | |
3093 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment79), 0, 0, 12, 0); | |
3094 | |
3095 playlist_no_advance = gtk_check_button_new_with_mnemonic (_("Don't advance in the playlist")); | |
3096 gtk_container_add (GTK_CONTAINER (alignment79), playlist_no_advance); | |
3097 gtk_tooltips_set_tip (tooltips, playlist_no_advance, _("When finished playing a song, don't automatically advance to the next."), NULL); | |
3098 | |
3099 alignment80 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3100 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment80, FALSE, FALSE, 0); | |
3101 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment80), 0, 0, 12, 0); | |
3102 | |
3103 pause_between_songs = gtk_check_button_new_with_mnemonic (_("Pause between songs")); | |
3104 gtk_container_add (GTK_CONTAINER (alignment80), pause_between_songs); | |
3105 | |
3106 alignment22 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3107 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment22, FALSE, FALSE, 0); | |
3108 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment22), 0, 0, 45, 0); | |
3109 | |
3110 pause_between_songs_box = gtk_hbox_new (FALSE, 0); | |
3111 gtk_container_add (GTK_CONTAINER (alignment22), pause_between_songs_box); | |
3112 | |
3113 label41 = gtk_label_new (_("Pause for")); | |
3114 gtk_box_pack_start (GTK_BOX (pause_between_songs_box), label41, FALSE, FALSE, 0); | |
3115 gtk_misc_set_padding (GTK_MISC (label41), 4, 0); | |
3116 | |
3117 pause_between_songs_time_adj = gtk_adjustment_new (2, 0, 100, 1, 10, 10); | |
3118 pause_between_songs_time = gtk_spin_button_new (GTK_ADJUSTMENT (pause_between_songs_time_adj), 1, 0); | |
3119 gtk_box_pack_start (GTK_BOX (pause_between_songs_box), pause_between_songs_time, FALSE, FALSE, 0); | |
3120 | |
3121 label42 = gtk_label_new (_("seconds")); | |
3122 gtk_box_pack_start (GTK_BOX (pause_between_songs_box), label42, FALSE, FALSE, 0); | |
3123 gtk_misc_set_padding (GTK_MISC (label42), 4, 0); | |
3124 | |
3125 alignment90 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3126 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment90, FALSE, FALSE, 0); | |
3127 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment90), 12, 12, 0, 0); | |
3128 | |
3129 label93 = gtk_label_new (_("<b>Sampling Rate Converter</b>")); | |
3130 gtk_container_add (GTK_CONTAINER (alignment90), label93); | |
3131 gtk_label_set_use_markup (GTK_LABEL (label93), TRUE); | |
3132 gtk_misc_set_alignment (GTK_MISC (label93), 0, 0.5); | |
3133 | |
3134 alignment92 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3135 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment92, FALSE, FALSE, 0); | |
3136 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment92), 0, 0, 12, 0); | |
3137 | |
3138 enable_src = gtk_check_button_new_with_mnemonic (_("Enable Sampling Rate Converter")); | |
3139 gtk_container_add (GTK_CONTAINER (alignment92), enable_src); | |
3140 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enable_src), TRUE); | |
3141 | |
3142 alignment91 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3143 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment91, FALSE, FALSE, 0); | |
3144 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment91), 0, 6, 12, 0); | |
3145 | |
3146 vbox36 = gtk_vbox_new (FALSE, 0); | |
3147 gtk_container_add (GTK_CONTAINER (alignment91), vbox36); | |
3148 | |
3149 table13 = gtk_table_new (3, 2, FALSE); | |
3150 gtk_box_pack_start (GTK_BOX (vbox36), table13, FALSE, FALSE, 0); | |
3151 gtk_table_set_row_spacings (GTK_TABLE (table13), 6); | |
3152 gtk_table_set_col_spacings (GTK_TABLE (table13), 6); | |
3153 | |
3154 src_converter_type = gtk_combo_box_new_text (); | |
3155 gtk_table_attach (GTK_TABLE (table13), src_converter_type, 1, 2, 1, 2, | |
3156 (GtkAttachOptions) (0), | |
3157 (GtkAttachOptions) (0), 0, 0); | |
3158 gtk_combo_box_append_text (GTK_COMBO_BOX (src_converter_type), _("Best Sinc Interpolation")); | |
3159 gtk_combo_box_append_text (GTK_COMBO_BOX (src_converter_type), _("Medium Sinc Interpolation")); | |
3160 gtk_combo_box_append_text (GTK_COMBO_BOX (src_converter_type), _("Fastest Sinc Interpolation")); | |
3161 gtk_combo_box_append_text (GTK_COMBO_BOX (src_converter_type), _("ZOH Interpolation")); | |
3162 gtk_combo_box_append_text (GTK_COMBO_BOX (src_converter_type), _("Linear Interpolation")); | |
3163 | |
3164 label94 = gtk_label_new (_("Interpolation Engine:")); | |
3165 gtk_table_attach (GTK_TABLE (table13), label94, 0, 1, 1, 2, | |
3166 (GtkAttachOptions) (0), | |
3167 (GtkAttachOptions) (0), 0, 0); | |
3168 gtk_misc_set_alignment (GTK_MISC (label94), 0, 0.5); | |
3169 | |
3170 label92 = gtk_label_new (_("<span size=\"small\">All streams will be converted to this sampling rate.\nThis should be the max supported sampling rate of\nthe sound card or output plugin.</span>")); | |
3171 gtk_table_attach (GTK_TABLE (table13), label92, 1, 2, 2, 3, | |
3172 (GtkAttachOptions) (0), | |
3173 (GtkAttachOptions) (0), 0, 0); | |
3174 gtk_label_set_use_markup (GTK_LABEL (label92), TRUE); | |
3175 gtk_label_set_line_wrap (GTK_LABEL (label92), TRUE); | |
3176 gtk_misc_set_alignment (GTK_MISC (label92), 0, 0.5); | |
3177 | |
3178 image9 = gtk_image_new_from_stock ("gtk-info", GTK_ICON_SIZE_BUTTON); | |
3179 gtk_table_attach (GTK_TABLE (table13), image9, 0, 1, 2, 3, | |
3180 (GtkAttachOptions) (0), | |
3181 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); | |
3182 gtk_misc_set_alignment (GTK_MISC (image9), 1, 0); | |
3183 | |
3184 src_rate_adj = gtk_adjustment_new (96000, 1000, 768000, 1000, 1000, 1000); | |
3185 src_rate = gtk_spin_button_new (GTK_ADJUSTMENT (src_rate_adj), 1, 0); | |
3186 gtk_table_attach (GTK_TABLE (table13), src_rate, 1, 2, 0, 1, | |
3187 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
3188 (GtkAttachOptions) (0), 0, 0); | |
3189 | |
3190 label91 = gtk_label_new (_("Sampling Rate [Hz]:")); | |
3191 gtk_table_attach (GTK_TABLE (table13), label91, 0, 1, 0, 1, | |
3192 (GtkAttachOptions) (0), | |
3193 (GtkAttachOptions) (0), 0, 0); | |
3194 gtk_misc_set_alignment (GTK_MISC (label91), 0, 0.5); | |
3195 | |
3196 alignment4 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3197 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment4, FALSE, FALSE, 0); | |
3198 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment4), 12, 12, 0, 0); | |
3199 | |
3200 label2 = gtk_label_new (_("<b>Volume Control</b>")); | |
3201 gtk_container_add (GTK_CONTAINER (alignment4), label2); | |
3202 gtk_label_set_use_markup (GTK_LABEL (label2), TRUE); | |
3203 gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5); | |
3204 | |
3205 alignment7 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3206 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment7, FALSE, FALSE, 0); | |
3207 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment7), 0, 0, 12, 0); | |
3208 | |
3209 software_volume_control = gtk_check_button_new_with_mnemonic (_("Use software volume control")); | |
3210 gtk_container_add (GTK_CONTAINER (alignment7), software_volume_control); | |
3211 gtk_tooltips_set_tip (tooltips, software_volume_control, _("Use software volume control. This may be useful for situations where your audio system does not support controlling the playback volume."), NULL); | |
3212 | |
3213 empty_notebook_page = gtk_vbox_new (FALSE, 0); | |
3214 gtk_container_add (GTK_CONTAINER (category_notebook), empty_notebook_page); | |
3215 | |
3216 hseparator1 = gtk_hseparator_new (); | |
3217 gtk_box_pack_start (GTK_BOX (vbox), hseparator1, FALSE, FALSE, 6); | |
3218 | |
3219 hbox4 = gtk_hbox_new (FALSE, 0); | |
3220 gtk_box_pack_start (GTK_BOX (vbox), hbox4, FALSE, FALSE, 0); | |
3221 | |
3222 audversionlabel = gtk_label_new (""); | |
3223 gtk_box_pack_start (GTK_BOX (hbox4), audversionlabel, FALSE, FALSE, 0); | |
3224 gtk_label_set_use_markup (GTK_LABEL (audversionlabel), TRUE); | |
3225 | |
3226 prefswin_button_box = gtk_hbutton_box_new (); | |
3227 gtk_box_pack_start (GTK_BOX (hbox4), prefswin_button_box, TRUE, TRUE, 0); | |
3228 gtk_button_box_set_layout (GTK_BUTTON_BOX (prefswin_button_box), GTK_BUTTONBOX_END); | |
3229 gtk_box_set_spacing (GTK_BOX (prefswin_button_box), 6); | |
3230 | |
3231 reload_plugins = gtk_button_new (); | |
3232 gtk_container_add (GTK_CONTAINER (prefswin_button_box), reload_plugins); | |
3233 GTK_WIDGET_SET_FLAGS (reload_plugins, GTK_CAN_DEFAULT); | |
3234 | |
3235 alignment93 = gtk_alignment_new (0.5, 0.5, 0, 0); | |
3236 gtk_container_add (GTK_CONTAINER (reload_plugins), alignment93); | |
3237 | |
3238 hbox11 = gtk_hbox_new (FALSE, 2); | |
3239 gtk_container_add (GTK_CONTAINER (alignment93), hbox11); | |
3240 | |
3241 image10 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON); | |
3242 gtk_box_pack_start (GTK_BOX (hbox11), image10, FALSE, FALSE, 0); | |
3243 | |
3244 label102 = gtk_label_new_with_mnemonic (_("Reload Plugins")); | |
3245 gtk_box_pack_start (GTK_BOX (hbox11), label102, FALSE, FALSE, 0); | |
3246 | |
3247 close = gtk_button_new_from_stock ("gtk-close"); | |
3248 gtk_container_add (GTK_CONTAINER (prefswin_button_box), close); | |
3249 GTK_WIDGET_SET_FLAGS (close, GTK_CAN_DEFAULT); | |
3250 gtk_widget_add_accelerator (close, "clicked", accel_group, | |
3251 GDK_Escape, (GdkModifierType) 0, | |
3252 GTK_ACCEL_VISIBLE); | |
3253 | |
3254 | |
3255 gtk_label_set_mnemonic_widget (GTK_LABEL (input_plugin_list_label), category_notebook); | |
3256 gtk_label_set_mnemonic_widget (GTK_LABEL (label11), category_notebook); | |
3257 gtk_label_set_mnemonic_widget (GTK_LABEL (label53), category_notebook); | |
3258 gtk_label_set_mnemonic_widget (GTK_LABEL (label64), category_notebook); | |
3259 gtk_label_set_mnemonic_widget (GTK_LABEL (label103), category_notebook); | |
3260 gtk_label_set_mnemonic_widget (GTK_LABEL (label104), category_notebook); | |
3261 gtk_label_set_mnemonic_widget (GTK_LABEL (label105), fontbutton1); | |
3262 gtk_label_set_mnemonic_widget (GTK_LABEL (label106), fontbutton2); | |
3263 gtk_label_set_mnemonic_widget (GTK_LABEL (label107), category_notebook); | |
3264 | |
3265 gtk_window_add_accel_group (GTK_WINDOW (prefswin), accel_group); | |
3266 | |
3267 /* connect signals */ | |
3268 g_signal_connect(G_OBJECT(prefswin), "delete_event", | |
3269 G_CALLBACK(gtk_widget_hide_on_delete), | |
3270 NULL); | |
3271 g_signal_connect_after(G_OBJECT(input_plugin_view), "realize", | |
3272 G_CALLBACK(on_input_plugin_view_realize), | |
3273 NULL); | |
3274 g_signal_connect_after(G_OBJECT(general_plugin_view), "realize", | |
3275 G_CALLBACK(on_general_plugin_view_realize), | |
3276 NULL); | |
3277 g_signal_connect_after(G_OBJECT(vis_plugin_view), "realize", | |
3278 G_CALLBACK(on_vis_plugin_view_realize), | |
3279 NULL); | |
3280 g_signal_connect_after(G_OBJECT(effect_plugin_view), "realize", | |
3281 G_CALLBACK(on_effect_plugin_view_realize), | |
3282 NULL); | |
3283 g_signal_connect(G_OBJECT(colorspace_button), "clicked", | |
3284 G_CALLBACK(on_colorize_button_clicked), | |
3285 NULL); | |
3286 g_signal_connect_swapped(G_OBJECT(skin_refresh_button), "clicked", | |
3287 G_CALLBACK(on_skin_refresh_button_clicked), | |
3288 prefswin); | |
3289 g_signal_connect_after(G_OBJECT(skin_view), "realize", | |
3290 G_CALLBACK(on_skin_view_realize), | |
3291 NULL); | |
3292 g_signal_connect_after(G_OBJECT(fontbutton1), "realize", | |
3293 G_CALLBACK(on_mainwin_font_button_realize), | |
3294 NULL); | |
3295 g_signal_connect(G_OBJECT(fontbutton1), "font_set", | |
3296 G_CALLBACK(on_mainwin_font_button_font_set), | |
3297 NULL); | |
3298 g_signal_connect_after(G_OBJECT(fontbutton2), "realize", | |
3299 G_CALLBACK(on_playlist_font_button_realize), | |
3300 NULL); | |
3301 g_signal_connect(G_OBJECT(fontbutton2), "font_set", | |
3302 G_CALLBACK(on_playlist_font_button_font_set), | |
3303 NULL); | |
3304 g_signal_connect(G_OBJECT(checkbutton11), "toggled", | |
3305 G_CALLBACK(on_use_bitmap_fonts_toggled), | |
3306 NULL); | |
3307 g_signal_connect_after(G_OBJECT(checkbutton11), "realize", | |
3308 G_CALLBACK(on_use_bitmap_fonts_realize), | |
3309 NULL); | |
3310 g_signal_connect(G_OBJECT(playlist_show_pl_numbers), "toggled", | |
3311 G_CALLBACK(on_playlist_show_pl_numbers_toggled), | |
3312 NULL); | |
3313 g_signal_connect_after(G_OBJECT(playlist_show_pl_numbers), "realize", | |
3314 G_CALLBACK(on_playlist_show_pl_numbers_realize), | |
3315 NULL); | |
3316 g_signal_connect(G_OBJECT(playlist_show_pl_separator), "toggled", | |
3317 G_CALLBACK(on_playlist_show_pl_separator_toggled), | |
3318 NULL); | |
3319 g_signal_connect_after(G_OBJECT(playlist_show_pl_separator), "realize", | |
3320 G_CALLBACK(on_playlist_show_pl_separator_realize), | |
3321 NULL); | |
3322 g_signal_connect(G_OBJECT(checkbutton14), "toggled", | |
3323 G_CALLBACK(on_custom_cursors_toggled), | |
3324 NULL); | |
3325 g_signal_connect_after(G_OBJECT(checkbutton14), "realize", | |
3326 G_CALLBACK(on_custom_cursors_realize), | |
3327 NULL); | |
3328 g_signal_connect(G_OBJECT(show_wm_decorations), "toggled", | |
3329 G_CALLBACK(on_show_wm_decorations_toggled), | |
3330 NULL); | |
3331 g_signal_connect(G_OBJECT(show_wm_decorations), "realize", | |
3332 G_CALLBACK(on_show_wm_decorations_realize), | |
3333 NULL); | |
3334 g_signal_connect(G_OBJECT(xmms_style_fileselector_cb1), "toggled", | |
3335 G_CALLBACK(on_xmms_style_fileselector_toggled), | |
3336 NULL); | |
3337 g_signal_connect(G_OBJECT(xmms_style_fileselector_cb1), "realize", | |
3338 G_CALLBACK(on_xmms_style_fileselector_realize), | |
3339 NULL); | |
3340 g_signal_connect(G_OBJECT(checkbutton17), "toggled", | |
3341 G_CALLBACK(on_twoway_scroller_toggled), | |
3342 NULL); | |
3343 g_signal_connect(G_OBJECT(checkbutton17), "realize", | |
3344 G_CALLBACK(on_twoway_scroller_realize), | |
3345 NULL); | |
3346 g_signal_connect(G_OBJECT(mouse_wheel_volume), "value_changed", | |
3347 G_CALLBACK(on_mouse_wheel_volume_changed), | |
3348 NULL); | |
3349 g_signal_connect_after(G_OBJECT(mouse_wheel_volume), "realize", | |
3350 G_CALLBACK(on_mouse_wheel_volume_realize), | |
3351 NULL); | |
3352 g_signal_connect(G_OBJECT(mouse_wheel_scroll_pl), "value_changed", | |
3353 G_CALLBACK(on_mouse_wheel_scroll_pl_changed), | |
3354 NULL); | |
3355 g_signal_connect_after(G_OBJECT(mouse_wheel_scroll_pl), "realize", | |
3356 G_CALLBACK(on_mouse_wheel_scroll_pl_realize), | |
3357 NULL); | |
3358 g_signal_connect(G_OBJECT(playlist_convert_underscore), "toggled", | |
3359 G_CALLBACK(on_playlist_convert_underscore_toggled), | |
3360 NULL); | |
3361 g_signal_connect_after(G_OBJECT(playlist_convert_underscore), "realize", | |
3362 G_CALLBACK(on_playlist_convert_underscore_realize), | |
3363 NULL); | |
3364 g_signal_connect(G_OBJECT(playlist_convert_twenty), "toggled", | |
3365 G_CALLBACK(on_playlist_convert_twenty_toggled), | |
3366 NULL); | |
3367 g_signal_connect_after(G_OBJECT(playlist_convert_twenty), "realize", | |
3368 G_CALLBACK(on_playlist_convert_twenty_realize), | |
3369 NULL); | |
3370 g_signal_connect(G_OBJECT(playlist_convert_slash), "toggled", | |
3371 G_CALLBACK(on_playlist_convert_slash_toggled), | |
3372 NULL); | |
3373 g_signal_connect_after(G_OBJECT(playlist_convert_slash), "realize", | |
3374 G_CALLBACK(on_playlist_convert_slash_realize), | |
3375 NULL); | |
3376 g_signal_connect(G_OBJECT(playlist_metadata_on_load), "toggled", | |
3377 G_CALLBACK(on_pl_metadata_on_load_toggled), | |
3378 NULL); | |
3379 g_signal_connect_after(G_OBJECT(playlist_metadata_on_load), "realize", | |
3380 G_CALLBACK(on_pl_metadata_on_load_realize), | |
3381 NULL); | |
3382 g_signal_connect(G_OBJECT(playlist_metadata_on_display), "toggled", | |
3383 G_CALLBACK(on_pl_metadata_on_display_toggled), | |
3384 NULL); | |
3385 g_signal_connect_after(G_OBJECT(playlist_metadata_on_display), "realize", | |
3386 G_CALLBACK(on_pl_metadata_on_display_realize), | |
3387 NULL); | |
3388 g_signal_connect_after(G_OBJECT(combobox1), "realize", | |
3389 G_CALLBACK(on_chardet_detector_cbox_realize), | |
3390 NULL); | |
3391 g_signal_connect(G_OBJECT(entry1), "changed", | |
3392 G_CALLBACK(on_chardet_fallback_changed), | |
3393 NULL); | |
3394 g_signal_connect_after(G_OBJECT(entry1), "realize", | |
3395 G_CALLBACK(on_chardet_fallback_realize), | |
3396 NULL); | |
3397 g_signal_connect(G_OBJECT(refresh_file_list), "toggled", | |
3398 G_CALLBACK(on_refresh_file_list_toggled), | |
3399 NULL); | |
3400 g_signal_connect_after(G_OBJECT(refresh_file_list), "realize", | |
3401 G_CALLBACK(on_refresh_file_list_realize), | |
3402 NULL); | |
3403 g_signal_connect(G_OBJECT(titlestring_entry), "changed", | |
3404 G_CALLBACK(on_titlestring_entry_changed), | |
3405 NULL); | |
3406 g_signal_connect_after(G_OBJECT(titlestring_entry), "realize", | |
3407 G_CALLBACK(on_titlestring_entry_realize), | |
3408 NULL); | |
3409 g_signal_connect(G_OBJECT(checkbutton10), "toggled", | |
3410 G_CALLBACK(on_show_filepopup_for_tuple_toggled), | |
3411 NULL); | |
3412 g_signal_connect_after(G_OBJECT(checkbutton10), "realize", | |
3413 G_CALLBACK(on_show_filepopup_for_tuple_realize), | |
3414 NULL); | |
3415 g_signal_connect(G_OBJECT(filepopup_for_tuple_settings_button), "clicked", | |
3416 G_CALLBACK(on_filepopup_for_tuple_settings_clicked), | |
3417 NULL); | |
3418 g_signal_connect(G_OBJECT(eq_file_preset_entry), "changed", | |
3419 G_CALLBACK(on_eq_file_preset_entry_changed), | |
3420 NULL); | |
3421 g_signal_connect(G_OBJECT(eq_file_preset_entry), "realize", | |
3422 G_CALLBACK(on_eq_file_preset_entry_realize), | |
3423 NULL); | |
3424 g_signal_connect(G_OBJECT(eq_dir_preset_entry), "changed", | |
3425 G_CALLBACK(on_eq_dir_preset_entry_changed), | |
3426 NULL); | |
3427 g_signal_connect(G_OBJECT(eq_dir_preset_entry), "realize", | |
3428 G_CALLBACK(on_eq_dir_preset_entry_realize), | |
3429 NULL); | |
3430 g_signal_connect(G_OBJECT(proxy_use), "toggled", | |
4000
a0bb67450552
more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents:
3999
diff
changeset
|
3431 G_CALLBACK(on_proxy_button_toggled), |
a0bb67450552
more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents:
3999
diff
changeset
|
3432 "use_proxy"); |
3993 | 3433 g_signal_connect(G_OBJECT(proxy_use), "realize", |
4000
a0bb67450552
more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents:
3999
diff
changeset
|
3434 G_CALLBACK(on_proxy_button_realize), |
a0bb67450552
more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents:
3999
diff
changeset
|
3435 "use_proxy"); |
3993 | 3436 g_signal_connect(G_OBJECT(proxy_port), "changed", |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3437 G_CALLBACK(on_proxy_entry_changed), |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3438 "proxy_port"); |
3993 | 3439 g_signal_connect(G_OBJECT(proxy_port), "realize", |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3440 G_CALLBACK(on_proxy_entry_realize), |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3441 "proxy_port"); |
3993 | 3442 g_signal_connect(G_OBJECT(proxy_host), "changed", |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3443 G_CALLBACK(on_proxy_entry_changed), |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3444 "proxy_host"); |
3993 | 3445 g_signal_connect(G_OBJECT(proxy_host), "realize", |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3446 G_CALLBACK(on_proxy_entry_realize), |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3447 "proxy_host"); |
3993 | 3448 g_signal_connect(G_OBJECT(proxy_auth), "toggled", |
4000
a0bb67450552
more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents:
3999
diff
changeset
|
3449 G_CALLBACK(on_proxy_button_toggled), |
a0bb67450552
more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents:
3999
diff
changeset
|
3450 "proxy_use_auth"); |
3993 | 3451 g_signal_connect(G_OBJECT(proxy_auth), "realize", |
4000
a0bb67450552
more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents:
3999
diff
changeset
|
3452 G_CALLBACK(on_proxy_button_realize), |
a0bb67450552
more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents:
3999
diff
changeset
|
3453 "proxy_use_auth"); |
3993 | 3454 g_signal_connect(G_OBJECT(proxy_pass), "changed", |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3455 G_CALLBACK(on_proxy_entry_changed), |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3456 "proxy_pass"); |
3993 | 3457 g_signal_connect(G_OBJECT(proxy_pass), "realize", |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3458 G_CALLBACK(on_proxy_entry_realize), |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3459 "proxy_pass"); |
3993 | 3460 g_signal_connect(G_OBJECT(proxy_user), "changed", |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3461 G_CALLBACK(on_proxy_entry_changed), |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3462 "proxy_user"); |
3993 | 3463 g_signal_connect(G_OBJECT(proxy_user), "realize", |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3464 G_CALLBACK(on_proxy_entry_realize), |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3465 "proxy_user"); |
3993 | 3466 g_signal_connect(G_OBJECT(output_plugin_bufsize), "value_changed", |
3467 G_CALLBACK(on_output_plugin_bufsize_value_changed), | |
3468 NULL); | |
3469 g_signal_connect_after(G_OBJECT(output_plugin_bufsize), "realize", | |
3470 G_CALLBACK(on_output_plugin_bufsize_realize), | |
3471 NULL); | |
3472 g_signal_connect_after(G_OBJECT(output_plugin_cbox), "realize", | |
3473 G_CALLBACK(on_output_plugin_cbox_realize), | |
3474 NULL); | |
3475 g_signal_connect(G_OBJECT(audio_format_det_cb), "toggled", | |
3476 G_CALLBACK(on_audio_format_det_cb_toggled), | |
3477 NULL); | |
3478 g_signal_connect(G_OBJECT(audio_format_det_cb), "realize", | |
3479 G_CALLBACK(on_audio_format_det_cb_realize), | |
3480 NULL); | |
3481 g_signal_connect(G_OBJECT(detect_by_extension_cb), "toggled", | |
3482 G_CALLBACK(on_detect_by_extension_cb_toggled), | |
3483 NULL); | |
3484 g_signal_connect(G_OBJECT(detect_by_extension_cb), "realize", | |
3485 G_CALLBACK(on_detect_by_extension_cb_realize), | |
3486 NULL); | |
3487 g_signal_connect(G_OBJECT(continue_playback_on_startup), "toggled", | |
3488 G_CALLBACK(on_continue_playback_on_startup_toggled), | |
3489 NULL); | |
3490 g_signal_connect(G_OBJECT(continue_playback_on_startup), "realize", | |
3491 G_CALLBACK(on_continue_playback_on_startup_realize), | |
3492 NULL); | |
3493 g_signal_connect(G_OBJECT(playlist_no_advance), "toggled", | |
3494 G_CALLBACK(on_playlist_no_advance_toggled), | |
3495 NULL); | |
3496 g_signal_connect_after(G_OBJECT(playlist_no_advance), "realize", | |
3497 G_CALLBACK(on_playlist_no_advance_realize), | |
3498 NULL); | |
3499 g_signal_connect(G_OBJECT(pause_between_songs_time), "value_changed", | |
3500 G_CALLBACK(on_pause_between_songs_time_changed), | |
3501 NULL); | |
3502 g_signal_connect_after(G_OBJECT(pause_between_songs_time), "realize", | |
3503 G_CALLBACK(on_pause_between_songs_time_realize), | |
3504 NULL); | |
3505 g_signal_connect(G_OBJECT(enable_src), "toggled", | |
3506 G_CALLBACK(on_enable_src_toggled), | |
3507 NULL); | |
3508 g_signal_connect(G_OBJECT(enable_src), "realize", | |
3509 G_CALLBACK(on_enable_src_realize), | |
3510 NULL); | |
3511 g_signal_connect(G_OBJECT(src_converter_type), "changed", | |
3512 G_CALLBACK(on_src_converter_type_changed), | |
3513 NULL); | |
3514 g_signal_connect_after(G_OBJECT(src_converter_type), "realize", | |
3515 G_CALLBACK(on_src_converter_type_realize), | |
3516 NULL); | |
3517 g_signal_connect(G_OBJECT(src_rate), "value_changed", | |
3518 G_CALLBACK(on_src_rate_value_changed), | |
3519 NULL); | |
3520 g_signal_connect(G_OBJECT(src_rate), "realize", | |
3521 G_CALLBACK(on_src_rate_realize), | |
3522 NULL); | |
3523 g_signal_connect(G_OBJECT(software_volume_control), "toggled", | |
3524 G_CALLBACK(on_software_volume_control_toggled), | |
3525 NULL); | |
3526 g_signal_connect(G_OBJECT(software_volume_control), "realize", | |
3527 G_CALLBACK(on_software_volume_control_realize), | |
3528 NULL); | |
3529 g_signal_connect(G_OBJECT(reload_plugins), "clicked", | |
3530 G_CALLBACK(on_reload_plugins_clicked), | |
3531 NULL); | |
3532 g_signal_connect_swapped(G_OBJECT(close), "clicked", | |
3533 G_CALLBACK(gtk_widget_hide), | |
3534 GTK_OBJECT (prefswin)); | |
2313 | 3535 |
3536 /* create category view */ | |
3993 | 3537 g_signal_connect_after(G_OBJECT(category_treeview), "realize", |
3538 G_CALLBACK(on_category_treeview_realize), | |
3539 category_notebook); | |
2313 | 3540 |
3541 /* plugin->input page */ | |
3993 | 3542 g_object_set_data(G_OBJECT(input_plugin_view), "plugin_type" , GINT_TO_POINTER(PLUGIN_VIEW_TYPE_INPUT)); |
3543 g_signal_connect(G_OBJECT(input_plugin_view), "row-activated", | |
3356 | 3544 G_CALLBACK(plugin_treeview_open_prefs), |
3353
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
3545 NULL); |
3993 | 3546 g_signal_connect(G_OBJECT(input_plugin_view), "cursor-changed", |
3355
31ecb89e871c
introduce plugin_treeview_enable_prefs and plugin_treeview_enable_info
Tomasz Mon <desowin@gmail.com>
parents:
3353
diff
changeset
|
3547 G_CALLBACK(plugin_treeview_enable_prefs), |
3993 | 3548 input_plugin_prefs); |
3549 | |
3550 g_signal_connect_swapped(G_OBJECT(input_plugin_prefs), "clicked", | |
3356 | 3551 G_CALLBACK(plugin_treeview_open_prefs), |
3993 | 3552 input_plugin_view); |
3553 | |
3554 g_signal_connect(G_OBJECT(input_plugin_view), "cursor-changed", | |
3355
31ecb89e871c
introduce plugin_treeview_enable_prefs and plugin_treeview_enable_info
Tomasz Mon <desowin@gmail.com>
parents:
3353
diff
changeset
|
3555 G_CALLBACK(plugin_treeview_enable_info), |
3993 | 3556 input_plugin_info); |
3557 g_signal_connect_swapped(G_OBJECT(input_plugin_info), "clicked", | |
3357 | 3558 G_CALLBACK(plugin_treeview_open_info), |
3993 | 3559 input_plugin_view); |
2313 | 3560 |
3561 /* plugin->output page */ | |
3562 | |
3993 | 3563 g_signal_connect(G_OBJECT(output_plugin_cbox), "changed", |
2313 | 3564 G_CALLBACK(output_plugin_enable_prefs), |
3993 | 3565 output_plugin_prefs); |
3566 g_signal_connect_swapped(G_OBJECT(output_plugin_prefs), "clicked", | |
2313 | 3567 G_CALLBACK(output_plugin_open_prefs), |
3993 | 3568 output_plugin_cbox); |
3569 | |
3570 g_signal_connect(G_OBJECT(output_plugin_cbox), "changed", | |
2313 | 3571 G_CALLBACK(output_plugin_enable_info), |
3993 | 3572 output_plugin_info); |
3573 g_signal_connect_swapped(G_OBJECT(output_plugin_info), "clicked", | |
2313 | 3574 G_CALLBACK(output_plugin_open_info), |
3993 | 3575 output_plugin_cbox); |
2313 | 3576 |
3577 /* plugin->general page */ | |
3578 | |
3993 | 3579 g_object_set_data(G_OBJECT(general_plugin_view), "plugin_type" , GINT_TO_POINTER(PLUGIN_VIEW_TYPE_GENERAL)); |
3580 g_signal_connect(G_OBJECT(general_plugin_view), "row-activated", | |
3356 | 3581 G_CALLBACK(plugin_treeview_open_prefs), |
3353
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
3582 NULL); |
2313 | 3583 |
3993 | 3584 g_signal_connect(G_OBJECT(general_plugin_view), "cursor-changed", |
3355
31ecb89e871c
introduce plugin_treeview_enable_prefs and plugin_treeview_enable_info
Tomasz Mon <desowin@gmail.com>
parents:
3353
diff
changeset
|
3585 G_CALLBACK(plugin_treeview_enable_prefs), |
3993 | 3586 general_plugin_prefs); |
3587 | |
3588 g_signal_connect_swapped(G_OBJECT(general_plugin_prefs), "clicked", | |
3356 | 3589 G_CALLBACK(plugin_treeview_open_prefs), |
3993 | 3590 general_plugin_view); |
3591 | |
3592 g_signal_connect(G_OBJECT(general_plugin_view), "cursor-changed", | |
3355
31ecb89e871c
introduce plugin_treeview_enable_prefs and plugin_treeview_enable_info
Tomasz Mon <desowin@gmail.com>
parents:
3353
diff
changeset
|
3593 G_CALLBACK(plugin_treeview_enable_info), |
3993 | 3594 general_plugin_info); |
3595 g_signal_connect_swapped(G_OBJECT(general_plugin_info), "clicked", | |
3357 | 3596 G_CALLBACK(plugin_treeview_open_info), |
3993 | 3597 general_plugin_view); |
2313 | 3598 |
3599 | |
3600 /* plugin->vis page */ | |
3601 | |
3993 | 3602 g_object_set_data(G_OBJECT(vis_plugin_view), "plugin_type" , GINT_TO_POINTER(PLUGIN_VIEW_TYPE_VIS)); |
3603 g_signal_connect(G_OBJECT(vis_plugin_view), "row-activated", | |
3356 | 3604 G_CALLBACK(plugin_treeview_open_prefs), |
3353
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
3605 NULL); |
3993 | 3606 g_signal_connect_swapped(G_OBJECT(vis_plugin_prefs), "clicked", |
3356 | 3607 G_CALLBACK(plugin_treeview_open_prefs), |
3993 | 3608 vis_plugin_view); |
3609 g_signal_connect(G_OBJECT(vis_plugin_view), "cursor-changed", | |
3610 G_CALLBACK(plugin_treeview_enable_prefs), vis_plugin_prefs); | |
3611 | |
3612 g_signal_connect(G_OBJECT(vis_plugin_view), "cursor-changed", | |
3613 G_CALLBACK(plugin_treeview_enable_info), vis_plugin_info); | |
3614 g_signal_connect_swapped(G_OBJECT(vis_plugin_info), "clicked", | |
3357 | 3615 G_CALLBACK(plugin_treeview_open_info), |
3993 | 3616 vis_plugin_view); |
2313 | 3617 |
3618 | |
3619 /* plugin->effects page */ | |
3620 | |
3993 | 3621 g_object_set_data(G_OBJECT(effect_plugin_view), "plugin_type" , GINT_TO_POINTER(PLUGIN_VIEW_TYPE_EFFECT)); |
3622 g_signal_connect(G_OBJECT(effect_plugin_view), "row-activated", | |
3356 | 3623 G_CALLBACK(plugin_treeview_open_prefs), |
3353
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
3624 NULL); |
3993 | 3625 g_signal_connect_swapped(G_OBJECT(effect_plugin_prefs), "clicked", |
3356 | 3626 G_CALLBACK(plugin_treeview_open_prefs), |
3993 | 3627 effect_plugin_view); |
3628 g_signal_connect(G_OBJECT(effect_plugin_view), "cursor-changed", | |
3629 G_CALLBACK(plugin_treeview_enable_prefs), effect_plugin_prefs); | |
3630 | |
3631 g_signal_connect(G_OBJECT(effect_plugin_view), "cursor-changed", | |
3632 G_CALLBACK(plugin_treeview_enable_info), effect_plugin_info); | |
3633 g_signal_connect_swapped(G_OBJECT(effect_plugin_info), "clicked", | |
3357 | 3634 G_CALLBACK(plugin_treeview_open_info), |
3993 | 3635 effect_plugin_view); |
2313 | 3636 |
3637 /* playlist page */ | |
3638 | |
3993 | 3639 g_signal_connect_after(G_OBJECT(pause_between_songs), "realize", |
2313 | 3640 G_CALLBACK(on_pause_between_songs_realize), |
3993 | 3641 pause_between_songs_box); |
3642 g_signal_connect(G_OBJECT(pause_between_songs), "toggled", | |
2313 | 3643 G_CALLBACK(on_pause_between_songs_toggled), |
3993 | 3644 pause_between_songs_box); |
3645 | |
3646 g_signal_connect_after(G_OBJECT(playlist_use_metadata), "realize", | |
2313 | 3647 G_CALLBACK(on_use_pl_metadata_realize), |
3993 | 3648 playlist_use_metadata_box); |
3649 g_signal_connect(G_OBJECT(playlist_use_metadata), "toggled", | |
2313 | 3650 G_CALLBACK(on_use_pl_metadata_toggled), |
3993 | 3651 playlist_use_metadata_box); |
3652 | |
3653 g_signal_connect(skin_view, "drag-data-received", | |
2313 | 3654 G_CALLBACK(on_skin_view_drag_data_received), |
3655 NULL); | |
3993 | 3656 bmp_drag_dest_set(skin_view); |
2313 | 3657 |
3658 g_signal_connect(mainwin, "drag-data-received", | |
3659 G_CALLBACK(mainwin_drag_data_received), | |
3993 | 3660 skin_view); |
3661 | |
3662 g_signal_connect(skin_refresh_button, "clicked", | |
2313 | 3663 G_CALLBACK(on_skin_refresh_button_clicked), |
3664 NULL); | |
3665 | |
3666 g_signal_connect(mainwin, "drag-data-received", | |
2975 | 3667 G_CALLBACK(mainwin_drag_data_received), |
3993 | 3668 fontbutton2); |
3669 | |
3670 g_signal_connect(titlestring_cbox, "realize", | |
2313 | 3671 G_CALLBACK(on_titlestring_cbox_realize), |
3993 | 3672 titlestring_entry); |
3673 g_signal_connect(titlestring_cbox, "changed", | |
2313 | 3674 G_CALLBACK(on_titlestring_cbox_changed), |
3993 | 3675 titlestring_entry); |
2313 | 3676 |
3677 /* FIXME: move this into a function */ | |
3678 /* create tag menu */ | |
3679 titlestring_tag_menu = gtk_menu_new(); | |
3680 for(i = 0; i < n_title_field_tags; i++) { | |
3991
d6ac99c2be1d
destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents:
3990
diff
changeset
|
3681 menu_item = gtk_menu_item_new_with_label(_(title_field_tags[i].name)); |
d6ac99c2be1d
destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents:
3990
diff
changeset
|
3682 gtk_menu_shell_append(GTK_MENU_SHELL(titlestring_tag_menu), menu_item); |
2313 | 3683 g_signal_connect(menu_item, "activate", |
3684 G_CALLBACK(titlestring_tag_menu_callback), | |
3685 GINT_TO_POINTER(i)); | |
3686 }; | |
3687 gtk_widget_show_all(titlestring_tag_menu); | |
3993 | 3688 |
3689 g_signal_connect(titlestring_cbox, "changed", | |
2313 | 3690 G_CALLBACK(on_titlestring_cbox_changed), |
3993 | 3691 titlestring_help_button); |
3692 g_signal_connect(titlestring_help_button, "clicked", | |
2313 | 3693 G_CALLBACK(on_titlestring_help_button_clicked), |
3694 titlestring_tag_menu); | |
3695 | |
3696 /* audacious version label */ | |
2467 | 3697 |
2468
5206f4ef02f7
[svn] - the svn_stamp is no longer an svn revision, but a serial number
nenolod
parents:
2467
diff
changeset
|
3698 aud_version_string = g_strdup_printf("<span size='small'>%s (%s) (%s@%s)</span>", |
3991
d6ac99c2be1d
destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents:
3990
diff
changeset
|
3699 "Audacious " PACKAGE_VERSION , |
d6ac99c2be1d
destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents:
3990
diff
changeset
|
3700 svn_stamp , |
d6ac99c2be1d
destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents:
3990
diff
changeset
|
3701 g_get_user_name() , g_get_host_name() ); |
2313 | 3702 |
3993 | 3703 gtk_label_set_markup( GTK_LABEL(audversionlabel) , aud_version_string ); |
2467 | 3704 g_free(aud_version_string); |
3993 | 3705 gtk_widget_show_all(vbox); |
2313 | 3706 |
3990
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
3707 /* Create window for filepopup settings */ |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
3708 create_filepopup_settings(); |
2313 | 3709 } |
3710 | |
3711 void | |
3712 show_prefs_window(void) | |
3713 { | |
2628
85acf3f98ed0
[svn] - prevent skin list overlap when it's populated for the first time and user quickly switchs to other tabs in the prefswin
giacomo
parents:
2623
diff
changeset
|
3714 static gboolean skinlist_filled = FALSE; |
85acf3f98ed0
[svn] - prevent skin list overlap when it's populated for the first time and user quickly switchs to other tabs in the prefswin
giacomo
parents:
2623
diff
changeset
|
3715 |
2635 | 3716 gtk_window_present(GTK_WINDOW(prefswin)); /* show or raise prefs window */ |
2628
85acf3f98ed0
[svn] - prevent skin list overlap when it's populated for the first time and user quickly switchs to other tabs in the prefswin
giacomo
parents:
2623
diff
changeset
|
3717 |
85acf3f98ed0
[svn] - prevent skin list overlap when it's populated for the first time and user quickly switchs to other tabs in the prefswin
giacomo
parents:
2623
diff
changeset
|
3718 if ( !skinlist_filled ) |
85acf3f98ed0
[svn] - prevent skin list overlap when it's populated for the first time and user quickly switchs to other tabs in the prefswin
giacomo
parents:
2623
diff
changeset
|
3719 { |
3993 | 3720 skin_view_update(GTK_TREE_VIEW(skin_view), GTK_WIDGET(skin_refresh_button)); |
2628
85acf3f98ed0
[svn] - prevent skin list overlap when it's populated for the first time and user quickly switchs to other tabs in the prefswin
giacomo
parents:
2623
diff
changeset
|
3721 skinlist_filled = TRUE; |
85acf3f98ed0
[svn] - prevent skin list overlap when it's populated for the first time and user quickly switchs to other tabs in the prefswin
giacomo
parents:
2623
diff
changeset
|
3722 } |
2313 | 3723 } |
3724 | |
3917 | 3725 void |
3726 hide_prefs_window(void) | |
3727 { | |
3728 g_return_if_fail(prefswin); | |
3729 gtk_widget_hide(GTK_WIDGET(prefswin)); | |
3730 } | |
3731 | |
2313 | 3732 static void |
3733 prefswin_page_queue_new(GtkWidget *container, gchar *name, gchar *imgurl) | |
3734 { | |
3735 CategoryQueueEntry *ent = g_malloc0(sizeof(CategoryQueueEntry)); | |
3736 | |
3737 ent->container = container; | |
3738 ent->pg_name = name; | |
3739 ent->img_url = imgurl; | |
3740 | |
3741 if (category_queue) | |
3742 ent->next = category_queue; | |
3743 | |
3744 category_queue = ent; | |
3745 } | |
3746 | |
3747 static void | |
3748 prefswin_page_queue_destroy(CategoryQueueEntry *ent) | |
3749 { | |
3750 category_queue = ent->next; | |
3751 g_free(ent); | |
3752 } | |
3753 | |
3754 /* | |
3755 * Public APIs for adding new pages to the prefs window. | |
3756 * | |
3757 * Basically, the concept here is that third party components can register themselves in the root | |
3758 * preferences window. | |
3759 * | |
3760 * From a usability standpoint this makes the application look more "united", instead of cluttered | |
3761 * and malorganised. Hopefully this option will be used further in the future. | |
3762 * | |
3763 * - nenolod | |
3764 */ | |
3765 gint | |
3766 prefswin_page_new(GtkWidget *container, gchar *name, gchar *imgurl) | |
3767 { | |
3768 GtkTreeModel *model; | |
3769 GtkTreeIter iter; | |
3770 GdkPixbuf *img = NULL; | |
3771 GtkTreeView *treeview = GTK_TREE_VIEW(category_treeview); | |
3772 gint id; | |
3773 | |
3774 if (treeview == NULL || category_notebook == NULL) | |
3775 { | |
3776 prefswin_page_queue_new(container, name, imgurl); | |
3777 return -1; | |
3778 } | |
3779 | |
3780 model = gtk_tree_view_get_model(treeview); | |
3781 | |
3782 if (model == NULL) | |
3783 { | |
3784 prefswin_page_queue_new(container, name, imgurl); | |
3785 return -1; | |
3786 } | |
3787 | |
3788 /* Make sure the widgets are visible. */ | |
3789 gtk_widget_show(container); | |
3790 id = gtk_notebook_append_page(GTK_NOTEBOOK(category_notebook), container, NULL); | |
3791 | |
3792 if (id == -1) | |
3793 return -1; | |
3794 | |
3795 if (imgurl != NULL) | |
3796 img = gdk_pixbuf_new_from_file(imgurl, NULL); | |
3797 | |
3798 gtk_list_store_append(GTK_LIST_STORE(model), &iter); | |
3799 gtk_list_store_set(GTK_LIST_STORE(model), &iter, | |
3800 CATEGORY_VIEW_COL_ICON, img, | |
3801 CATEGORY_VIEW_COL_NAME, | |
3802 name, CATEGORY_VIEW_COL_ID, id, -1); | |
3803 | |
3804 if (img != NULL) | |
3805 g_object_unref(img); | |
3806 | |
3807 return id; | |
3808 } | |
3809 | |
3810 void | |
3811 prefswin_page_destroy(GtkWidget *container) | |
3812 { | |
3813 GtkTreeModel *model; | |
3814 GtkTreeIter iter; | |
3815 GtkTreeView *treeview = GTK_TREE_VIEW(category_treeview); | |
3816 gboolean ret; | |
3817 gint id; | |
3818 gint index = -1; | |
3819 | |
3820 if (category_notebook == NULL || treeview == NULL || container == NULL) | |
3821 return; | |
3822 | |
3823 id = gtk_notebook_page_num(GTK_NOTEBOOK(category_notebook), container); | |
3824 | |
3825 if (id == -1) | |
3826 return; | |
3827 | |
3828 gtk_notebook_remove_page(GTK_NOTEBOOK(category_notebook), id); | |
3829 | |
3830 model = gtk_tree_view_get_model(treeview); | |
3831 | |
3832 if (model == NULL) | |
3833 return; | |
3834 | |
3835 ret = gtk_tree_model_get_iter_first(model, &iter); | |
3836 | |
3837 while (ret == TRUE) | |
3838 { | |
3839 gtk_tree_model_get(model, &iter, CATEGORY_VIEW_COL_ID, &index, -1); | |
3840 | |
3841 if (index == id) | |
3842 { | |
3843 gtk_list_store_remove(GTK_LIST_STORE(model), &iter); | |
3844 ret = gtk_tree_model_get_iter_first(model, &iter); | |
3845 } | |
3846 | |
3847 if (index > id) | |
3848 { | |
3849 index--; | |
3850 gtk_list_store_set(GTK_LIST_STORE(model), &iter, CATEGORY_VIEW_COL_ID, index, -1); | |
3851 } | |
3852 | |
3853 ret = gtk_tree_model_iter_next(model, &iter); | |
3854 } | |
3855 } |