Mercurial > audlegacy
annotate src/audacious/ui_preferences.c @ 3999:fa3d61ea0a6e
remove some duplicated code
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Sat, 24 Nov 2007 18:56:52 +0100 |
parents | 3496674a54b5 |
children | a0bb67450552 |
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 | |
647 on_proxy_use_realize(GtkToggleButton * button, | |
648 gpointer data) | |
649 { | |
650 ConfigDb *db; | |
651 gboolean ret; | |
652 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
653 db = cfg_db_open(); |
2313 | 654 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
655 if (cfg_db_get_bool(db, NULL, "use_proxy", &ret) != FALSE) |
2313 | 656 gtk_toggle_button_set_active(button, ret); |
657 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
658 cfg_db_close(db); |
2313 | 659 } |
660 | |
661 static void | |
662 on_proxy_use_toggled(GtkToggleButton * button, | |
663 gpointer data) | |
664 { | |
665 ConfigDb *db; | |
666 gboolean ret = gtk_toggle_button_get_active(button); | |
667 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
668 db = cfg_db_open(); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
669 cfg_db_set_bool(db, NULL, "use_proxy", ret); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
670 cfg_db_close(db); |
2313 | 671 } |
672 | |
673 static void | |
674 on_proxy_auth_realize(GtkToggleButton * button, | |
675 gpointer data) | |
676 { | |
677 ConfigDb *db; | |
678 gboolean ret; | |
679 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
680 db = cfg_db_open(); |
2313 | 681 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
682 if (cfg_db_get_bool(db, NULL, "proxy_use_auth", &ret) != FALSE) |
2313 | 683 gtk_toggle_button_set_active(button, ret); |
684 | |
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 | |
688 static void | |
689 on_proxy_auth_toggled(GtkToggleButton * button, | |
690 gpointer data) | |
691 { | |
692 ConfigDb *db; | |
693 gboolean ret = gtk_toggle_button_get_active(button); | |
694 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
695 db = cfg_db_open(); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
696 cfg_db_set_bool(db, NULL, "proxy_use_auth", ret); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
697 cfg_db_close(db); |
2313 | 698 } |
699 | |
700 static void | |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
701 on_proxy_entry_changed(GtkEntry *entry, gchar *cfg) |
2313 | 702 { |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
703 g_return_if_fail(cfg != NULL); |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
704 |
2313 | 705 ConfigDb *db; |
706 gchar *ret = g_strdup(gtk_entry_get_text(entry)); | |
707 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
708 db = cfg_db_open(); |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
709 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
|
710 cfg_db_close(db); |
2313 | 711 |
712 g_free(ret); | |
713 } | |
714 | |
715 static void | |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
716 on_proxy_entry_realize(GtkEntry *entry, gchar *cfg) |
2313 | 717 { |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
718 g_return_if_fail(cfg != NULL); |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
719 |
2313 | 720 ConfigDb *db; |
721 gchar *ret; | |
722 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
723 db = cfg_db_open(); |
2313 | 724 |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
725 if (cfg_db_get_string(db, NULL, cfg, &ret) != FALSE) |
2313 | 726 gtk_entry_set_text(entry, ret); |
727 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
728 cfg_db_close(db); |
2313 | 729 } |
730 | |
731 static void | |
3356 | 732 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
|
733 { |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
734 GtkTreeSelection *selection; |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
735 GtkTreeModel *model; |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
736 GtkTreeIter iter; |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
737 Plugin *plugin = NULL; |
3353
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
738 |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
739 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
|
740 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
|
741 return; |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
742 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
|
743 |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
744 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
|
745 g_return_if_fail(plugin->configure != NULL); |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
746 |
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
747 plugin->configure(); |
3353
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
748 } |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
749 |
1cd5fb04e05b
double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
750 static void |
3357 | 751 plugin_treeview_open_info(GtkTreeView *treeview) |
752 { | |
753 GtkTreeSelection *selection; | |
754 GtkTreeModel *model; | |
755 GtkTreeIter iter; | |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
756 Plugin *plugin = NULL; |
3357 | 757 |
758 selection = gtk_tree_view_get_selection(treeview); | |
759 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
760 return; | |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
761 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_PLUGIN_PTR, &plugin, -1); |
3357 | 762 |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
763 g_return_if_fail(plugin != NULL); |
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
764 |
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
765 plugin->about(); |
3357 | 766 } |
767 | |
768 static void | |
3355
31ecb89e871c
introduce plugin_treeview_enable_prefs and plugin_treeview_enable_info
Tomasz Mon <desowin@gmail.com>
parents:
3353
diff
changeset
|
769 plugin_treeview_enable_prefs(GtkTreeView * treeview, GtkButton * button) |
2313 | 770 { |
771 GtkTreeSelection *selection; | |
772 GtkTreeModel *model; | |
773 GtkTreeIter iter; | |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
774 Plugin *plugin = NULL; |
2313 | 775 |
776 selection = gtk_tree_view_get_selection(treeview); | |
777 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
778 return; | |
779 | |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
780 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_PLUGIN_PTR, &plugin, -1); |
2313 | 781 |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
782 g_return_if_fail(plugin != NULL); |
2313 | 783 |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
784 gtk_widget_set_sensitive(GTK_WIDGET(button), plugin->configure != NULL); |
2313 | 785 } |
786 | |
787 static void | |
3355
31ecb89e871c
introduce plugin_treeview_enable_prefs and plugin_treeview_enable_info
Tomasz Mon <desowin@gmail.com>
parents:
3353
diff
changeset
|
788 plugin_treeview_enable_info(GtkTreeView * treeview, GtkButton * button) |
2313 | 789 { |
790 GtkTreeSelection *selection; | |
791 GtkTreeModel *model; | |
792 GtkTreeIter iter; | |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
793 Plugin *plugin = NULL; |
2313 | 794 |
795 selection = gtk_tree_view_get_selection(treeview); | |
796 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
797 return; | |
798 | |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
799 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_PLUGIN_PTR, &plugin, -1); |
2313 | 800 |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
801 g_return_if_fail(plugin != NULL); |
2313 | 802 |
3442
b0f4ab42dd3b
Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents:
3441
diff
changeset
|
803 gtk_widget_set_sensitive(GTK_WIDGET(button), plugin->about != NULL); |
2313 | 804 } |
805 | |
806 | |
807 static void | |
808 output_plugin_enable_info(GtkComboBox * cbox, GtkButton * button) | |
809 { | |
810 GList *plist; | |
811 | |
812 gint id = gtk_combo_box_get_active(cbox); | |
813 | |
814 plist = get_output_list(); | |
815 plist = g_list_nth(plist, id); | |
816 | |
817 gtk_widget_set_sensitive(GTK_WIDGET(button), | |
818 OUTPUT_PLUGIN(plist->data)->about != NULL); | |
819 } | |
820 | |
821 static void | |
822 output_plugin_enable_prefs(GtkComboBox * cbox, GtkButton * button) | |
823 { | |
824 GList *plist; | |
825 gint id = gtk_combo_box_get_active(cbox); | |
826 | |
827 plist = get_output_list(); | |
828 plist = g_list_nth(plist, id); | |
829 | |
830 gtk_widget_set_sensitive(GTK_WIDGET(button), | |
831 OUTPUT_PLUGIN(plist->data)->configure != NULL); | |
832 } | |
833 | |
834 static void | |
835 on_output_plugin_bufsize_realize(GtkSpinButton *button, | |
836 gpointer data) | |
837 { | |
838 gtk_spin_button_set_value(button, cfg.output_buffer_size); | |
839 } | |
840 | |
841 static void | |
842 on_output_plugin_bufsize_value_changed(GtkSpinButton *button, | |
843 gpointer data) | |
844 { | |
845 cfg.output_buffer_size = gtk_spin_button_get_value_as_int(button); | |
846 } | |
847 | |
848 static void | |
849 on_mouse_wheel_volume_realize(GtkSpinButton * button, | |
850 gpointer data) | |
851 { | |
852 gtk_spin_button_set_value(button, cfg.mouse_change); | |
853 } | |
854 | |
855 static void | |
856 on_mouse_wheel_volume_changed(GtkSpinButton * button, | |
857 gpointer data) | |
858 { | |
859 cfg.mouse_change = gtk_spin_button_get_value_as_int(button); | |
860 } | |
861 | |
862 static void | |
863 on_pause_between_songs_time_realize(GtkSpinButton * button, | |
864 gpointer data) | |
865 { | |
866 gtk_spin_button_set_value(button, cfg.pause_between_songs_time); | |
867 } | |
868 | |
869 static void | |
870 on_pause_between_songs_time_changed(GtkSpinButton * button, | |
871 gpointer data) | |
872 { | |
873 cfg.pause_between_songs_time = gtk_spin_button_get_value_as_int(button); | |
874 } | |
875 | |
876 static void | |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
877 on_enable_src_realize(GtkToggleButton * button, |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
878 gpointer data) |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
879 { |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
880 #ifdef USE_SRC |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
881 ConfigDb *db; |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
882 gboolean ret; |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
883 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
884 db = cfg_db_open(); |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
885 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
886 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
|
887 gtk_toggle_button_set_active(button, ret); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
888 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
889 cfg_db_close(db); |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
890 #else |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
891 gtk_toggle_button_set_active(button, FALSE); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
892 gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
893 #endif |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
894 } |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
895 |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
896 static void |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
897 on_enable_src_toggled(GtkToggleButton * button, |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
898 gpointer data) |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
899 { |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
900 ConfigDb *db; |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
901 gboolean ret = gtk_toggle_button_get_active(button); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
902 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
903 db = cfg_db_open(); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
904 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
|
905 cfg_db_close(db); |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
906 } |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
907 |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
908 static void |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
909 on_src_rate_realize(GtkSpinButton * button, |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
910 gpointer data) |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
911 { |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
912 #ifdef USE_SRC |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
913 ConfigDb *db; |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
914 gint value; |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
915 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
916 db = cfg_db_open(); |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
917 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
918 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
|
919 gtk_spin_button_set_value(button, (gdouble)value); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
920 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
921 cfg_db_close(db); |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
922 #else |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
923 gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
924 #endif |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
925 } |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
926 |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
927 static void |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
928 on_src_rate_value_changed(GtkSpinButton * button, |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
929 gpointer data) |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
930 { |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
931 ConfigDb *db; |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
932 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
|
933 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
934 db = cfg_db_open(); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
935 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
|
936 cfg_db_close(db); |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
937 } |
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 static void |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
940 on_src_converter_type_realize(GtkComboBox * box, |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
941 gpointer data) |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
942 { |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
943 #ifdef USE_SRC |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
944 ConfigDb *db; |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
945 gint value; |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
946 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
947 db = cfg_db_open(); |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
948 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
949 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
|
950 gtk_combo_box_set_active(box, value); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
951 else |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
952 gtk_combo_box_set_active(box, 0); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
953 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
954 cfg_db_close(db); |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
955 #else |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
956 gtk_widget_set_sensitive(GTK_WIDGET(box), FALSE); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
957 #endif |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
958 } |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
959 |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
960 static void |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
961 on_src_converter_type_changed(GtkComboBox * box, |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
962 gpointer data) |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
963 { |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
964 ConfigDb *db; |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
965 gint value = gtk_combo_box_get_active(box); |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
966 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
967 db = cfg_db_open(); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
968 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
|
969 cfg_db_close(db); |
2538
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
970 } |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
971 |
719e0898ff3c
[svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents:
2468
diff
changeset
|
972 static void |
2313 | 973 on_mouse_wheel_scroll_pl_realize(GtkSpinButton * button, |
974 gpointer data) | |
975 { | |
976 gtk_spin_button_set_value(button, cfg.scroll_pl_by); | |
977 } | |
978 | |
979 static void | |
980 on_mouse_wheel_scroll_pl_changed(GtkSpinButton * button, | |
981 gpointer data) | |
982 { | |
983 cfg.scroll_pl_by = gtk_spin_button_get_value_as_int(button); | |
984 } | |
985 | |
986 static void | |
987 on_playlist_convert_underscore_realize(GtkToggleButton * button, | |
988 gpointer data) | |
989 { | |
990 gtk_toggle_button_set_active(button, cfg.convert_underscore); | |
991 } | |
992 | |
993 static void | |
994 on_playlist_convert_underscore_toggled(GtkToggleButton * button, | |
995 gpointer data) | |
996 { | |
997 cfg.convert_underscore = gtk_toggle_button_get_active(button); | |
998 } | |
999 | |
1000 static void | |
1001 on_playlist_no_advance_realize(GtkToggleButton * button, gpointer data) | |
1002 { | |
1003 gtk_toggle_button_set_active(button, cfg.no_playlist_advance); | |
1004 } | |
1005 | |
1006 static void | |
1007 on_playlist_no_advance_toggled(GtkToggleButton * button, gpointer data) | |
1008 { | |
1009 cfg.no_playlist_advance = gtk_toggle_button_get_active(button); | |
1010 } | |
1011 | |
1012 static void | |
1013 on_continue_playback_on_startup_realize(GtkToggleButton * button, gpointer data) | |
1014 { | |
1015 gtk_toggle_button_set_active(button, cfg.resume_playback_on_startup); | |
1016 } | |
1017 | |
1018 static void | |
3544
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
1019 on_software_volume_control_toggled(GtkToggleButton * button, gpointer data) |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
1020 { |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
1021 cfg.software_volume_control = gtk_toggle_button_get_active(button); |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
1022 } |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
1023 |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
1024 static void |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
1025 on_software_volume_control_realize(GtkToggleButton * button, gpointer data) |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
1026 { |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
1027 gtk_toggle_button_set_active(button, cfg.software_volume_control); |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
1028 } |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
1029 |
e235357029ba
Add preferences option.
William Pitcock <nenolod@atheme.org>
parents:
3442
diff
changeset
|
1030 static void |
2313 | 1031 on_continue_playback_on_startup_toggled(GtkToggleButton * button, gpointer data) |
1032 { | |
1033 cfg.resume_playback_on_startup = gtk_toggle_button_get_active(button); | |
1034 } | |
1035 | |
1036 static void | |
1037 on_refresh_file_list_realize(GtkToggleButton * button, gpointer data) | |
1038 { | |
1039 gtk_toggle_button_set_active(button, cfg.refresh_file_list); | |
1040 } | |
1041 | |
1042 static void | |
1043 on_refresh_file_list_toggled(GtkToggleButton * button, gpointer data) | |
1044 { | |
1045 cfg.refresh_file_list = gtk_toggle_button_get_active(button); | |
1046 } | |
1047 | |
1048 static void | |
1049 on_playlist_convert_twenty_realize(GtkToggleButton * button, gpointer data) | |
1050 { | |
1051 gtk_toggle_button_set_active(button, cfg.convert_twenty); | |
1052 } | |
1053 | |
1054 static void | |
1055 on_playlist_convert_twenty_toggled(GtkToggleButton * button, gpointer data) | |
1056 { | |
1057 cfg.convert_twenty = gtk_toggle_button_get_active(button); | |
1058 } | |
1059 | |
1060 static void | |
1061 on_playlist_convert_slash_realize(GtkToggleButton * button, gpointer data) | |
1062 { | |
1063 gtk_toggle_button_set_active(button, cfg.convert_slash); | |
1064 } | |
1065 | |
1066 static void | |
1067 on_playlist_convert_slash_toggled(GtkToggleButton * button, gpointer data) | |
1068 { | |
1069 cfg.convert_slash = gtk_toggle_button_get_active(button); | |
1070 } | |
1071 | |
1072 static void | |
1073 on_use_pl_metadata_realize(GtkToggleButton * button, | |
1074 gpointer data) | |
1075 { | |
1076 gboolean state = cfg.use_pl_metadata; | |
1077 gtk_toggle_button_set_active(button, state); | |
1078 gtk_widget_set_sensitive(GTK_WIDGET(data), state); | |
1079 } | |
1080 | |
1081 static void | |
1082 on_use_pl_metadata_toggled(GtkToggleButton * button, | |
1083 gpointer data) | |
1084 { | |
1085 gboolean state = gtk_toggle_button_get_active(button); | |
1086 cfg.use_pl_metadata = state; | |
1087 gtk_widget_set_sensitive(GTK_WIDGET(data), state); | |
1088 } | |
1089 | |
1090 static void | |
1091 on_pause_between_songs_realize(GtkToggleButton * button, | |
1092 gpointer data) | |
1093 { | |
1094 gboolean state = cfg.pause_between_songs; | |
1095 gtk_toggle_button_set_active(button, state); | |
1096 gtk_widget_set_sensitive(GTK_WIDGET(data), state); | |
1097 } | |
1098 | |
1099 static void | |
1100 on_pause_between_songs_toggled(GtkToggleButton * button, | |
1101 gpointer data) | |
1102 { | |
1103 gboolean state = gtk_toggle_button_get_active(button); | |
1104 cfg.pause_between_songs = state; | |
1105 gtk_widget_set_sensitive(GTK_WIDGET(data), state); | |
1106 } | |
1107 | |
1108 static void | |
1109 on_pl_metadata_on_load_realize(GtkRadioButton * button, | |
1110 gpointer data) | |
1111 { | |
1112 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), | |
1113 cfg.get_info_on_load); | |
1114 } | |
1115 | |
1116 static void | |
1117 on_pl_metadata_on_display_realize(GtkRadioButton * button, | |
1118 gpointer data) | |
1119 { | |
1120 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), | |
1121 cfg.get_info_on_demand); | |
1122 } | |
1123 | |
1124 static void | |
1125 on_pl_metadata_on_load_toggled(GtkRadioButton * button, | |
1126 gpointer data) | |
1127 { | |
1128 cfg.get_info_on_load = | |
1129 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)); | |
1130 } | |
1131 | |
1132 static void | |
1133 on_pl_metadata_on_display_toggled(GtkRadioButton * button, | |
1134 gpointer data) | |
1135 { | |
1136 cfg.get_info_on_demand = | |
1137 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)); | |
1138 } | |
1139 | |
1140 static void | |
1141 on_custom_cursors_realize(GtkToggleButton * button, | |
1142 gpointer data) | |
1143 { | |
1144 gtk_toggle_button_set_active(button, cfg.custom_cursors); | |
1145 } | |
1146 | |
1147 static void | |
1148 on_custom_cursors_toggled(GtkToggleButton *togglebutton, | |
1149 gpointer data) | |
1150 { | |
1151 cfg.custom_cursors = gtk_toggle_button_get_active(togglebutton); | |
1152 skin_reload_forced(); | |
1153 } | |
1154 | |
1155 static void | |
1156 on_eq_dir_preset_entry_realize(GtkEntry * entry, | |
1157 gpointer data) | |
1158 { | |
1159 gtk_entry_set_text(entry, cfg.eqpreset_default_file); | |
1160 } | |
1161 | |
1162 static void | |
1163 on_eq_dir_preset_entry_changed(GtkEntry * entry, | |
1164 gpointer data) | |
1165 { | |
1166 g_free(cfg.eqpreset_default_file); | |
1167 cfg.eqpreset_default_file = g_strdup(gtk_entry_get_text(entry)); | |
1168 } | |
1169 | |
1170 static void | |
1171 on_eq_file_preset_entry_realize(GtkEntry * entry, | |
1172 gpointer data) | |
1173 { | |
1174 gtk_entry_set_text(entry, cfg.eqpreset_extension); | |
1175 } | |
1176 | |
1177 static void | |
1178 on_eq_file_preset_entry_changed(GtkEntry * entry, gpointer data) | |
1179 { | |
1180 const gchar *text = gtk_entry_get_text(entry); | |
1181 | |
1182 while (*text == '.') | |
1183 text++; | |
1184 | |
1185 g_free(cfg.eqpreset_extension); | |
1186 cfg.eqpreset_extension = g_strdup(text); | |
1187 } | |
1188 | |
1189 | |
1190 static void | |
1191 on_skin_refresh_button_clicked(GtkButton * button, | |
1192 gpointer data) | |
1193 { | |
1194 const mode_t mode755 = S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; | |
1195 | |
1196 del_directory(bmp_paths[BMP_PATH_SKIN_THUMB_DIR]); | |
1197 make_directory(bmp_paths[BMP_PATH_SKIN_THUMB_DIR], mode755); | |
1198 | |
3993 | 1199 skin_view_update(GTK_TREE_VIEW(skin_view), GTK_WIDGET(skin_refresh_button)); |
2313 | 1200 } |
1201 | |
1202 static gboolean | |
1203 on_skin_view_realize(GtkTreeView * treeview, | |
1204 gpointer data) | |
1205 { | |
1206 skin_view_realize(treeview); | |
1207 | |
1208 return TRUE; | |
1209 } | |
1210 | |
1211 static void | |
3993 | 1212 on_category_treeview_realize(GtkTreeView * treeview, |
2313 | 1213 GtkNotebook * notebook) |
1214 { | |
1215 GtkListStore *store; | |
1216 GtkCellRenderer *renderer; | |
1217 GtkTreeViewColumn *column; | |
1218 GtkTreeSelection *selection; | |
1219 GtkTreeIter iter; | |
1220 GdkPixbuf *img; | |
1221 CategoryQueueEntry *qlist; | |
1222 gint i; | |
1223 | |
1224 column = gtk_tree_view_column_new(); | |
1225 gtk_tree_view_column_set_title(column, _("Category")); | |
1226 gtk_tree_view_append_column(treeview, column); | |
1227 gtk_tree_view_column_set_spacing(column, 2); | |
1228 | |
1229 renderer = gtk_cell_renderer_pixbuf_new(); | |
1230 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
1231 gtk_tree_view_column_set_attributes(column, renderer, "pixbuf", 0, NULL); | |
1232 | |
1233 renderer = gtk_cell_renderer_text_new(); | |
1234 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
1235 gtk_tree_view_column_set_attributes(column, renderer, "text", 1, NULL); | |
1236 | |
1237 store = gtk_list_store_new(CATEGORY_VIEW_N_COLS, | |
1238 GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_INT); | |
1239 gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(store)); | |
1240 | |
1241 for (i = 0; i < n_categories; i++) { | |
1242 img = gdk_pixbuf_new_from_file(categories[i].icon_path, NULL); | |
1243 gtk_list_store_append(store, &iter); | |
1244 gtk_list_store_set(store, &iter, | |
1245 CATEGORY_VIEW_COL_ICON, img, | |
1246 CATEGORY_VIEW_COL_NAME, | |
1247 gettext(categories[i].name), CATEGORY_VIEW_COL_ID, | |
1248 categories[i].id, -1); | |
1249 g_object_unref(img); | |
1250 } | |
1251 | |
1252 selection = gtk_tree_view_get_selection(treeview); | |
1253 | |
1254 g_signal_connect_swapped(selection, "changed", | |
1255 G_CALLBACK(change_category), notebook); | |
1256 | |
1257 /* mark the treeview widget as available to third party plugins */ | |
1258 category_treeview = GTK_WIDGET(treeview); | |
1259 | |
1260 /* prefswin_page_queue_destroy already pops the queue forward for us. */ | |
1261 for (qlist = category_queue; qlist != NULL; qlist = category_queue) | |
1262 { | |
1263 CategoryQueueEntry *ent = (CategoryQueueEntry *) qlist; | |
1264 | |
1265 prefswin_page_new(ent->container, ent->pg_name, ent->img_url); | |
1266 prefswin_page_queue_destroy(ent); | |
1267 } | |
1268 } | |
1269 | |
1270 static void | |
1271 on_skin_view_drag_data_received(GtkWidget * widget, | |
1272 GdkDragContext * context, | |
1273 gint x, gint y, | |
1274 GtkSelectionData * selection_data, | |
1275 guint info, guint time, | |
1276 gpointer user_data) | |
1277 { | |
1278 ConfigDb *db; | |
1279 gchar *path; | |
1280 | |
1281 if (!selection_data->data) { | |
1282 g_warning("DND data string is NULL"); | |
1283 return; | |
1284 } | |
1285 | |
1286 path = (gchar *) selection_data->data; | |
1287 | |
1288 /* FIXME: use a real URL validator/parser */ | |
1289 | |
1290 if (str_has_prefix_nocase(path, "file:///")) { | |
1291 path[strlen(path) - 2] = 0; /* Why the hell a CR&LF? */ | |
1292 path += 7; | |
1293 } | |
1294 else if (str_has_prefix_nocase(path, "file:")) { | |
1295 path += 5; | |
1296 } | |
1297 | |
1298 if (file_is_archive(path)) { | |
1299 bmp_active_skin_load(path); | |
1300 skin_install_skin(path); | |
3993 | 1301 skin_view_update(GTK_TREE_VIEW(widget), GTK_WIDGET(skin_refresh_button)); |
2313 | 1302 /* 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
|
1303 db = cfg_db_open(); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1304 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
|
1305 cfg_db_close(db); |
2313 | 1306 } |
1307 | |
1308 } | |
1309 | |
1310 static void | |
1311 on_chardet_detector_cbox_changed(GtkComboBox * combobox, gpointer data) | |
1312 { | |
1313 ConfigDb *db; | |
1314 gint position = 0; | |
1315 | |
1316 position = gtk_combo_box_get_active(GTK_COMBO_BOX(combobox)); | |
1317 cfg.chardet_detector = (char *)chardet_detector_presets[position]; | |
1318 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1319 db = cfg_db_open(); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1320 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
|
1321 cfg_db_close(db); |
2313 | 1322 if (data != NULL) |
1323 gtk_widget_set_sensitive(GTK_WIDGET(data), 1); | |
1324 } | |
1325 | |
1326 static void | |
1327 on_chardet_detector_cbox_realize(GtkComboBox *combobox, gpointer data) | |
1328 { | |
1329 ConfigDb *db; | |
1330 gchar *ret=NULL; | |
1331 guint i=0,index=0; | |
1332 | |
1333 for(i=0; i<n_chardet_detector_presets; i++) { | |
1334 gtk_combo_box_append_text(combobox, chardet_detector_presets[i]); | |
1335 } | |
1336 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1337 db = cfg_db_open(); |
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1338 if(cfg_db_get_string(db, NULL, "chardet_detector", &ret) != FALSE) { |
2313 | 1339 for(i=0; i<n_chardet_detector_presets; i++) { |
1340 if(!strcmp(chardet_detector_presets[i], ret)) { | |
1341 cfg.chardet_detector = (char *)chardet_detector_presets[i]; | |
1342 index = i; | |
1343 } | |
1344 } | |
1345 } | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1346 cfg_db_close(db); |
2313 | 1347 |
1348 #ifdef USE_CHARDET | |
1349 gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), index); | |
1350 | |
1351 if (data != NULL) | |
1352 gtk_widget_set_sensitive(GTK_WIDGET(data), TRUE); | |
1353 | |
1354 g_signal_connect(combobox, "changed", | |
1355 G_CALLBACK(on_chardet_detector_cbox_changed), NULL); | |
1356 #else | |
1357 gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), -1); | |
1358 gtk_widget_set_sensitive(GTK_WIDGET(combobox), 0); | |
1359 #endif | |
1360 if(ret) | |
1361 g_free(ret); | |
1362 } | |
1363 | |
1364 static void | |
1365 on_chardet_fallback_realize(GtkEntry *entry, gpointer data) | |
1366 { | |
1367 ConfigDb *db; | |
1368 gchar *ret = NULL; | |
1369 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1370 db = cfg_db_open(); |
2313 | 1371 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1372 if (cfg_db_get_string(db, NULL, "chardet_fallback", &ret) != FALSE) { |
2313 | 1373 if(cfg.chardet_fallback) |
1374 g_free(cfg.chardet_fallback); | |
1375 | |
1376 if(ret && strncasecmp(ret, "None", sizeof("None"))) { | |
1377 cfg.chardet_fallback = ret; | |
1378 } else { | |
1379 cfg.chardet_fallback = g_strdup(""); | |
1380 } | |
1381 gtk_entry_set_text(entry, cfg.chardet_fallback); | |
1382 } | |
1383 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1384 cfg_db_close(db); |
2313 | 1385 } |
1386 | |
1387 static void | |
1388 on_chardet_fallback_changed(GtkEntry *entry, gpointer data) | |
1389 { | |
1390 ConfigDb *db; | |
1391 gchar *ret = NULL; | |
1392 | |
1393 if(cfg.chardet_fallback) | |
1394 g_free(cfg.chardet_fallback); | |
1395 | |
1396 ret = g_strdup(gtk_entry_get_text(entry)); | |
1397 | |
1398 if(ret == NULL) | |
1399 cfg.chardet_fallback = g_strdup(""); | |
1400 else | |
1401 cfg.chardet_fallback = ret; | |
1402 | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1403 db = cfg_db_open(); |
2313 | 1404 |
1405 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
|
1406 cfg_db_set_string(db, NULL, "chardet_fallback", "None"); |
2313 | 1407 else |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1408 cfg_db_set_string(db, NULL, "chardet_fallback", cfg.chardet_fallback); |
2313 | 1409 |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
1410 cfg_db_close(db); |
2313 | 1411 } |
1412 | |
1413 static void | |
1414 on_show_filepopup_for_tuple_realize(GtkToggleButton * button, gpointer data) | |
1415 { | |
1416 gtk_toggle_button_set_active(button, cfg.show_filepopup_for_tuple); | |
3993 | 1417 filepopupbutton = GTK_WIDGET(button); |
1418 | |
1419 gtk_widget_set_sensitive(filepopup_for_tuple_settings_button, cfg.show_filepopup_for_tuple); | |
2313 | 1420 } |
1421 | |
1422 static void | |
1423 on_show_filepopup_for_tuple_toggled(GtkToggleButton * button, gpointer data) | |
1424 { | |
1425 cfg.show_filepopup_for_tuple = gtk_toggle_button_get_active(button); | |
1426 | |
3993 | 1427 gtk_widget_set_sensitive(filepopup_for_tuple_settings_button, cfg.show_filepopup_for_tuple); |
2313 | 1428 } |
1429 | |
1430 static void | |
1431 on_recurse_for_cover_toggled(GtkToggleButton *button, gpointer data) | |
1432 { | |
1433 gtk_widget_set_sensitive(GTK_WIDGET(data), | |
1434 gtk_toggle_button_get_active(button)); | |
1435 } | |
1436 | |
1437 static void | |
1438 on_colorize_button_clicked(GtkButton *button, gpointer data) | |
1439 { | |
3992
50bf02b4f048
correct mf0102's commit a bit
Tomasz Mon <desowin@gmail.com>
parents:
3991
diff
changeset
|
1440 if (colorize_settings) |
50bf02b4f048
correct mf0102's commit a bit
Tomasz Mon <desowin@gmail.com>
parents:
3991
diff
changeset
|
1441 gtk_window_present(GTK_WINDOW(colorize_settings)); |
50bf02b4f048
correct mf0102's commit a bit
Tomasz Mon <desowin@gmail.com>
parents:
3991
diff
changeset
|
1442 else |
50bf02b4f048
correct mf0102's commit a bit
Tomasz Mon <desowin@gmail.com>
parents:
3991
diff
changeset
|
1443 create_colorize_settings(); |
2313 | 1444 } |
1445 | |
1446 static void | |
3856
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1447 reload_skin() |
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1448 { |
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1449 /* 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
|
1450 skin_reload_forced(); |
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1451 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
|
1452 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
|
1453 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
|
1454 } |
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1455 |
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1456 static void |
2313 | 1457 on_red_scale_value_changed(GtkHScale *scale, gpointer data) |
1458 { | |
3856
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1459 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
|
1460 reload_skin(); |
2313 | 1461 } |
1462 | |
1463 static void | |
1464 on_green_scale_value_changed(GtkHScale *scale, gpointer data) | |
1465 { | |
3856
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1466 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
|
1467 reload_skin(); |
2313 | 1468 } |
1469 | |
1470 static void | |
1471 on_blue_scale_value_changed(GtkHScale *scale, gpointer data) | |
1472 { | |
3856
de26ea4a42fc
fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents:
3712
diff
changeset
|
1473 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
|
1474 reload_skin(); |
2313 | 1475 } |
1476 | |
1477 static void | |
1478 on_colorize_close_clicked(GtkButton *button, gpointer data) | |
1479 { | |
3992
50bf02b4f048
correct mf0102's commit a bit
Tomasz Mon <desowin@gmail.com>
parents:
3991
diff
changeset
|
1480 gtk_widget_destroy(colorize_settings); |
50bf02b4f048
correct mf0102's commit a bit
Tomasz Mon <desowin@gmail.com>
parents:
3991
diff
changeset
|
1481 colorize_settings = NULL; |
2313 | 1482 } |
1483 | |
1484 static void | |
1485 on_filepopup_for_tuple_settings_clicked(GtkButton *button, gpointer data) | |
1486 { | |
3990
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1487 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
|
1488 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
|
1489 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
|
1490 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
|
1491 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
|
1492 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
|
1493 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
|
1494 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
|
1495 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1496 gtk_widget_show(filepopup_settings); |
2313 | 1497 } |
1498 | |
1499 static void | |
1500 on_filepopup_settings_ok_clicked(GtkButton *button, gpointer data) | |
1501 { | |
3990
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1502 g_free(cfg.cover_name_include); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1503 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
|
1504 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1505 g_free(cfg.cover_name_exclude); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1506 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
|
1507 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1508 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
|
1509 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
|
1510 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
|
1511 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
|
1512 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
|
1513 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1514 gtk_widget_hide(filepopup_settings); |
2313 | 1515 } |
1516 | |
1517 static void | |
1518 on_filepopup_settings_cancel_clicked(GtkButton *button, gpointer data) | |
1519 { | |
1520 gtk_widget_hide(filepopup_settings); | |
1521 } | |
1522 | |
1523 static void | |
1524 on_xmms_style_fileselector_realize(GtkToggleButton * button, | |
1525 gpointer data) | |
1526 { | |
1527 gtk_toggle_button_set_active(button, cfg.use_xmms_style_fileselector); | |
1528 } | |
1529 | |
1530 static void | |
1531 on_xmms_style_fileselector_toggled(GtkToggleButton * button, | |
1532 gpointer data) | |
1533 { | |
1534 cfg.use_xmms_style_fileselector = gtk_toggle_button_get_active(button); | |
1535 } | |
1536 | |
1537 static void | |
1538 on_show_wm_decorations_realize(GtkToggleButton * button, | |
1539 gpointer data) | |
1540 { | |
1541 gtk_toggle_button_set_active(button, cfg.show_wm_decorations); | |
1542 } | |
1543 | |
1544 static void | |
1545 on_show_wm_decorations_toggled(GtkToggleButton * button, | |
1546 gpointer data) | |
1547 { | |
1548 extern GtkWidget *equalizerwin; | |
1549 cfg.show_wm_decorations = gtk_toggle_button_get_active(button); | |
1550 gtk_window_set_decorated(GTK_WINDOW(mainwin), cfg.show_wm_decorations); | |
1551 gtk_window_set_decorated(GTK_WINDOW(playlistwin), cfg.show_wm_decorations); | |
1552 gtk_window_set_decorated(GTK_WINDOW(equalizerwin), cfg.show_wm_decorations); | |
2623 | 1553 } |
1554 | |
1555 static void | |
1556 on_reload_plugins_clicked(GtkButton * button, gpointer data) | |
1557 { | |
1558 /* TBD: should every playlist entry have to be reprobed? | |
1559 * Pointers could come back stale if new plugins are added or | |
1560 * symbol sizes change. - nenolod | |
1561 */ | |
1562 | |
2682
c3cd6e47faf6
[svn] - make the evil 'reload plugins' button behave a bit better
giacomo
parents:
2635
diff
changeset
|
1563 bmp_config_save(); |
2623 | 1564 plugin_system_cleanup(); |
2682
c3cd6e47faf6
[svn] - make the evil 'reload plugins' button behave a bit better
giacomo
parents:
2635
diff
changeset
|
1565 bmp_config_free(); |
c3cd6e47faf6
[svn] - make the evil 'reload plugins' button behave a bit better
giacomo
parents:
2635
diff
changeset
|
1566 bmp_config_load(); |
2623 | 1567 plugin_system_init(); |
2313 | 1568 } |
1569 | |
3712
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1570 static void |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1571 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
|
1572 gpointer data) |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1573 { |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1574 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
|
1575 } |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1576 |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1577 static void |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1578 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
|
1579 gpointer data) |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1580 { |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1581 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
|
1582 //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
|
1583 } |
3ac3d2d8b909
- make scroller behavior configurable via preferences dialog.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
3686
diff
changeset
|
1584 |
2313 | 1585 void |
3989
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1586 create_colorize_settings(void) |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1587 { |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1588 GtkWidget *vbox; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1589 GtkWidget *label; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1590 GtkWidget *table; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1591 GtkWidget *hbuttonbox; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1592 GtkWidget *colorize_close; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1593 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1594 GtkWidget *green_label; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1595 GtkWidget *red_label; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1596 GtkWidget *blue_label; |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1597 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1598 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
|
1599 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
|
1600 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
|
1601 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
|
1602 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
|
1603 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1604 vbox = gtk_vbox_new(FALSE, 12); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1605 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
|
1606 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1607 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
|
1608 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
|
1609 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
|
1610 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
|
1611 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1612 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
|
1613 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
|
1614 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
|
1615 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
|
1616 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1617 blue_label = gtk_label_new(_("Blue")); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1618 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
|
1619 (GtkAttachOptions) (0), |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1620 (GtkAttachOptions) (0), 0, 0); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1621 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
|
1622 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
|
1623 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1624 green_label = gtk_label_new(_("Green")); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1625 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
|
1626 (GtkAttachOptions) (0), |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1627 (GtkAttachOptions) (0), 0, 0); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1628 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
|
1629 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
|
1630 |
3990
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1631 red_label = gtk_label_new(_("Red")); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1632 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
|
1633 (GtkAttachOptions) (0), |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1634 (GtkAttachOptions) (0), 0, 0); |
3989
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1635 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
|
1636 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
|
1637 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1638 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
|
1639 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
|
1640 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1641 (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
|
1642 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
|
1643 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
|
1644 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1645 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
|
1646 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
|
1647 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1648 (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
|
1649 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
|
1650 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
|
1651 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1652 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
|
1653 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
|
1654 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1655 (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
|
1656 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
|
1657 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
|
1658 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1659 hbuttonbox = gtk_hbutton_box_new(); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1660 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
|
1661 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
|
1662 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
|
1663 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1664 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
|
1665 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
|
1666 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
|
1667 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1668 g_signal_connect((gpointer) red_scale, "value_changed", |
3993 | 1669 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
|
1670 NULL); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1671 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
|
1672 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
|
1673 NULL); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1674 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
|
1675 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
|
1676 NULL); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1677 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
|
1678 G_CALLBACK(on_colorize_close_clicked), |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1679 NULL); |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1680 |
3991
d6ac99c2be1d
destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents:
3990
diff
changeset
|
1681 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
|
1682 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
|
1683 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
|
1684 |
3989
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1685 gtk_widget_grab_default(colorize_close); |
3991
d6ac99c2be1d
destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents:
3990
diff
changeset
|
1686 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
|
1687 } |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1688 |
6faed0cdc276
colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3985
diff
changeset
|
1689 void |
3990
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1690 create_filepopup_settings(void) |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1691 { |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1692 GtkWidget *vbox; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1693 GtkWidget *table; |
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 GtkWidget *label_cover_retrieve; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1696 GtkWidget *label_cover_search; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1697 GtkWidget *label_exclude; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1698 GtkWidget *label_include; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1699 GtkWidget *label_search_depth; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1700 GtkWidget *label_misc; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1701 GtkWidget *label_delay; |
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 GtkObject *recurse_for_cover_depth_adj; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1704 GtkObject *delay_adj; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1705 GtkWidget *alignment; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1706 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1707 GtkWidget *hbox; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1708 GtkWidget *hbuttonbox; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1709 GtkWidget *btn_cancel; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1710 GtkWidget *btn_ok; |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1711 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1712 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
|
1713 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
|
1714 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
|
1715 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
|
1716 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
|
1717 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
|
1718 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
|
1719 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1720 vbox = gtk_vbox_new(FALSE, 12); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1721 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
|
1722 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1723 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
|
1724 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
|
1725 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
|
1726 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
|
1727 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1728 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
|
1729 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
|
1730 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
|
1731 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
|
1732 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
|
1733 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1734 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
|
1735 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
|
1736 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
|
1737 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
|
1738 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1739 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
|
1740 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
|
1741 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1742 (GtkAttachOptions) (0), 0, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1743 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
|
1744 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1745 label_exclude = gtk_label_new(_("Exclude:")); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1746 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
|
1747 (GtkAttachOptions) (0), |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1748 (GtkAttachOptions) (0), 0, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1749 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
|
1750 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
|
1751 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1752 label_include = gtk_label_new(_("Include:")); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1753 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
|
1754 (GtkAttachOptions) (0), |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1755 (GtkAttachOptions) (0), 0, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1756 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
|
1757 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
|
1758 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1759 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
|
1760 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
|
1761 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1762 (GtkAttachOptions) (0), 0, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1763 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
|
1764 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1765 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
|
1766 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
|
1767 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
|
1768 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1769 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
|
1770 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
|
1771 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1772 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
|
1773 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
|
1774 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
|
1775 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1776 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
|
1777 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
|
1778 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1779 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
|
1780 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
|
1781 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
|
1782 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1783 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
|
1784 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
|
1785 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
|
1786 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
|
1787 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1788 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
|
1789 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
|
1790 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
|
1791 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1792 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
|
1793 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
|
1794 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1795 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
|
1796 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
|
1797 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
|
1798 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
|
1799 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1800 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
|
1801 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
|
1802 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
|
1803 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1804 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
|
1805 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
|
1806 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1807 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
|
1808 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
|
1809 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
|
1810 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1811 hbox = gtk_hbox_new(FALSE, 0); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1812 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
|
1813 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1814 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
|
1815 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
|
1816 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
|
1817 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
|
1818 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1819 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
|
1820 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
|
1821 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
|
1822 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
|
1823 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1824 hbuttonbox = gtk_hbutton_box_new(); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1825 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
|
1826 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
|
1827 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
|
1828 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1829 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
|
1830 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
|
1831 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1832 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
|
1833 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
|
1834 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
|
1835 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1836 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
|
1837 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
|
1838 NULL); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1839 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
|
1840 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
|
1841 NULL); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1842 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
|
1843 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
|
1844 NULL); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1845 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
|
1846 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
|
1847 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
|
1848 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1849 gtk_widget_grab_default(btn_ok); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1850 gtk_widget_show_all(vbox); |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1851 } |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1852 |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
1853 void |
2313 | 1854 create_prefs_window(void) |
1855 { | |
2467 | 1856 gchar *aud_version_string; |
2313 | 1857 |
1858 GtkWidget *titlestring_tag_menu, *menu_item; | |
1859 guint i; | |
3993 | 1860 |
1861 GtkWidget *vbox; | |
1862 GtkWidget *hbox1; | |
1863 GtkWidget *scrolledwindow6; | |
1864 GtkWidget *plugin_page_vbox; | |
1865 GtkWidget *plugin_notebook; | |
1866 GtkWidget *plugin_input_vbox; | |
1867 GtkWidget *alignment43; | |
1868 GtkWidget *input_plugin_list_label; | |
1869 GtkWidget *scrolledwindow3; | |
1870 GtkWidget *input_plugin_view; | |
1871 GtkWidget *input_plugin_button_box; | |
1872 GtkWidget *input_plugin_prefs; | |
1873 GtkWidget *input_plugin_info; | |
1874 GtkWidget *plugin_input_label; | |
1875 GtkWidget *plugin_general_vbox; | |
1876 GtkWidget *alignment45; | |
1877 GtkWidget *label11; | |
1878 GtkWidget *scrolledwindow5; | |
1879 GtkWidget *general_plugin_view; | |
1880 GtkWidget *general_plugin_button_box; | |
1881 GtkWidget *general_plugin_prefs; | |
1882 GtkWidget *general_plugin_info; | |
1883 GtkWidget *plugin_general_label; | |
1884 GtkWidget *vbox21; | |
1885 GtkWidget *alignment46; | |
1886 GtkWidget *label53; | |
1887 GtkWidget *scrolledwindow7; | |
1888 GtkWidget *vis_plugin_view; | |
1889 GtkWidget *hbuttonbox6; | |
1890 GtkWidget *vis_plugin_prefs; | |
1891 GtkWidget *vis_plugin_info; | |
1892 GtkWidget *vis_label; | |
1893 GtkWidget *vbox25; | |
1894 GtkWidget *alignment58; | |
1895 GtkWidget *label64; | |
1896 GtkWidget *scrolledwindow9; | |
1897 GtkWidget *effect_plugin_view; | |
1898 GtkWidget *hbuttonbox9; | |
1899 GtkWidget *effect_plugin_prefs; | |
1900 GtkWidget *effect_plugin_info; | |
1901 GtkWidget *effects_label; | |
1902 GtkWidget *plugin_label; | |
1903 GtkWidget *appearance_page_vbox; | |
1904 GtkWidget *vbox37; | |
1905 GtkWidget *vbox38; | |
1906 GtkWidget *hbox12; | |
1907 GtkWidget *alignment94; | |
1908 GtkWidget *hbox13; | |
1909 GtkWidget *label103; | |
1910 GtkWidget *colorspace_button; | |
1911 GtkWidget *image11; | |
1912 GtkWidget *image12; | |
1913 GtkWidget *alignment95; | |
1914 GtkWidget *skin_view_scrolled_window; | |
1915 GtkWidget *vbox39; | |
1916 GtkWidget *alignment96; | |
1917 GtkWidget *label104; | |
1918 GtkWidget *table14; | |
1919 GtkWidget *alignment97; | |
1920 GtkWidget *label105; | |
1921 GtkWidget *alignment98; | |
1922 GtkWidget *label106; | |
1923 GtkWidget *fontbutton1; | |
1924 GtkWidget *fontbutton2; | |
1925 GtkWidget *alignment99; | |
1926 GtkWidget *checkbutton11; | |
1927 GtkWidget *vbox40; | |
1928 GtkWidget *alignment100; | |
1929 GtkWidget *label107; | |
1930 GtkWidget *alignment101; | |
1931 GtkWidget *playlist_show_pl_numbers; | |
1932 GtkWidget *alignment102; | |
1933 GtkWidget *playlist_show_pl_separator; | |
1934 GtkWidget *alignment103; | |
1935 GtkWidget *checkbutton14; | |
1936 GtkWidget *alignment104; | |
1937 GtkWidget *show_wm_decorations; | |
1938 GtkWidget *alignment105; | |
1939 GtkWidget *xmms_style_fileselector_cb1; | |
1940 GtkWidget *alignment106; | |
1941 GtkWidget *checkbutton17; | |
1942 GtkWidget *appearance_label; | |
1943 GtkWidget *mouse_page_vbox; | |
1944 GtkWidget *vbox20; | |
1945 GtkWidget *alignment36; | |
1946 GtkWidget *label51; | |
1947 GtkWidget *alignment34; | |
1948 GtkWidget *table4; | |
1949 GtkObject *mouse_wheel_volume_adj; | |
1950 GtkWidget *mouse_wheel_volume; | |
1951 GtkWidget *label35; | |
1952 GtkObject *mouse_wheel_scroll_pl_adj; | |
1953 GtkWidget *mouse_wheel_scroll_pl; | |
1954 GtkWidget *label34; | |
1955 GtkWidget *label33; | |
1956 GtkWidget *label32; | |
1957 GtkWidget *mouse_label; | |
1958 GtkWidget *playlist_page_vbox; | |
1959 GtkWidget *vbox5; | |
1960 GtkWidget *alignment14; | |
1961 GtkWidget *label38; | |
1962 GtkWidget *alignment12; | |
1963 GtkWidget *playlist_convert_underscore; | |
1964 GtkWidget *alignment13; | |
1965 GtkWidget *playlist_convert_twenty; | |
1966 GtkWidget *alignment88; | |
1967 GtkWidget *playlist_convert_slash; | |
1968 GtkWidget *alignment15; | |
1969 GtkWidget *label39; | |
1970 GtkWidget *alignment16; | |
1971 GtkWidget *playlist_use_metadata; | |
1972 GtkWidget *alignment18; | |
1973 GtkWidget *playlist_use_metadata_box; | |
1974 GtkWidget *playlist_metadata_on_load; | |
1975 GSList *playlist_metadata_on_load_group = NULL; | |
1976 GtkWidget *playlist_metadata_on_display; | |
1977 GtkWidget *table10; | |
1978 GtkWidget *label73; | |
1979 GtkWidget *combobox1; | |
1980 GtkWidget *entry1; | |
1981 GtkWidget *label74; | |
1982 GtkWidget *alignment19; | |
1983 GtkWidget *label40; | |
1984 GtkWidget *alignment20; | |
1985 GtkWidget *refresh_file_list; | |
1986 GtkWidget *alignment55; | |
1987 GtkWidget *label60; | |
1988 GtkWidget *alignment56; | |
1989 GtkWidget *table6; | |
1990 GtkWidget *titlestring_help_button; | |
1991 GtkWidget *image1; | |
1992 GtkWidget *titlestring_cbox; | |
1993 GtkWidget *label62; | |
1994 GtkWidget *label61; | |
1995 GtkWidget *alignment85; | |
1996 GtkWidget *label84; | |
1997 GtkWidget *alignment86; | |
1998 GtkWidget *hbox9; | |
1999 GtkWidget *vbox34; | |
2000 GtkWidget *checkbutton10; | |
2001 GtkWidget *image8; | |
2002 GtkWidget *playlist_label; | |
2003 GtkWidget *equalizer_page_vbox; | |
2004 GtkWidget *alignment28; | |
2005 GtkWidget *vbox22; | |
2006 GtkWidget *alignment30; | |
2007 GtkWidget *equalizer_page_label; | |
2008 GtkWidget *vbox23; | |
2009 GtkWidget *alignment33; | |
2010 GtkWidget *table5; | |
2011 GtkWidget *label58; | |
2012 GtkWidget *label57; | |
2013 GtkWidget *eq_file_preset_entry; | |
2014 GtkWidget *eq_dir_preset_entry; | |
2015 GtkWidget *equalizer_label; | |
2016 GtkWidget *connectivity_page_vbox; | |
2017 GtkWidget *vbox29; | |
2018 GtkWidget *alignment63; | |
2019 GtkWidget *connectivity_page_label; | |
2020 GtkWidget *alignment68; | |
2021 GtkWidget *vbox30; | |
2022 GtkWidget *alignment65; | |
2023 GtkWidget *proxy_use; | |
2024 GtkWidget *table8; | |
2025 GtkWidget *proxy_port; | |
2026 GtkWidget *proxy_host; | |
2027 GtkWidget *label69; | |
2028 GtkWidget *label68; | |
2029 GtkWidget *alignment67; | |
2030 GtkWidget *proxy_auth; | |
2031 GtkWidget *table9; | |
2032 GtkWidget *proxy_pass; | |
2033 GtkWidget *proxy_user; | |
2034 GtkWidget *label71; | |
2035 GtkWidget *label70; | |
2036 GtkWidget *alignment72; | |
2037 GtkWidget *hbox6; | |
2038 GtkWidget *image4; | |
2039 GtkWidget *label75; | |
2040 GtkWidget *label95; | |
2041 GtkWidget *empty_notebook_page; | |
2042 GtkWidget *label96; | |
2043 GtkWidget *audio_scrolled_window; | |
2044 GtkWidget *audio_page_viewport; | |
2045 GtkWidget *audio_page_vbox; | |
2046 GtkWidget *alignment74; | |
2047 GtkWidget *label77; | |
2048 GtkWidget *alignment73; | |
2049 GtkWidget *vbox33; | |
2050 GtkWidget *table11; | |
2051 GtkWidget *image7; | |
2052 GtkWidget *label79; | |
2053 GtkWidget *label82; | |
2054 GtkObject *output_plugin_bufsize_adj; | |
2055 GtkWidget *output_plugin_bufsize; | |
2056 GtkWidget *output_plugin_cbox; | |
2057 GtkWidget *label78; | |
2058 GtkWidget *alignment82; | |
2059 GtkWidget *output_plugin_button_box; | |
2060 GtkWidget *output_plugin_prefs; | |
2061 GtkWidget *alignment76; | |
2062 GtkWidget *hbox7; | |
2063 GtkWidget *image5; | |
2064 GtkWidget *label80; | |
2065 GtkWidget *output_plugin_info; | |
2066 GtkWidget *alignment77; | |
2067 GtkWidget *hbox8; | |
2068 GtkWidget *image6; | |
2069 GtkWidget *label81; | |
2070 GtkWidget *alignment78; | |
2071 GtkWidget *label83; | |
2072 GtkWidget *alignment84; | |
2073 GtkWidget *audio_format_det_cb; | |
2074 GtkWidget *alignment89; | |
2075 GtkWidget *detect_by_extension_cb; | |
2076 GtkWidget *alignment83; | |
2077 GtkWidget *continue_playback_on_startup; | |
2078 GtkWidget *alignment79; | |
2079 GtkWidget *playlist_no_advance; | |
2080 GtkWidget *alignment80; | |
2081 GtkWidget *pause_between_songs; | |
2082 GtkWidget *alignment22; | |
2083 GtkWidget *pause_between_songs_box; | |
2084 GtkWidget *label41; | |
2085 GtkObject *pause_between_songs_time_adj; | |
2086 GtkWidget *pause_between_songs_time; | |
2087 GtkWidget *label42; | |
2088 GtkWidget *alignment90; | |
2089 GtkWidget *label93; | |
2090 GtkWidget *alignment92; | |
2091 GtkWidget *enable_src; | |
2092 GtkWidget *alignment91; | |
2093 GtkWidget *vbox36; | |
2094 GtkWidget *table13; | |
2095 GtkWidget *src_converter_type; | |
2096 GtkWidget *label94; | |
2097 GtkWidget *label92; | |
2098 GtkWidget *image9; | |
2099 GtkObject *src_rate_adj; | |
2100 GtkWidget *src_rate; | |
2101 GtkWidget *label91; | |
2102 GtkWidget *alignment4; | |
2103 GtkWidget *label2; | |
2104 GtkWidget *alignment7; | |
2105 GtkWidget *software_volume_control; | |
2106 GtkWidget *hseparator1; | |
2107 GtkWidget *hbox4; | |
2108 GtkWidget *audversionlabel; | |
2109 GtkWidget *prefswin_button_box; | |
2110 GtkWidget *reload_plugins; | |
2111 GtkWidget *alignment93; | |
2112 GtkWidget *hbox11; | |
2113 GtkWidget *image10; | |
2114 GtkWidget *label102; | |
2115 GtkWidget *close; | |
2116 GtkAccelGroup *accel_group; | |
2117 GtkTooltips *tooltips; | |
2118 | |
2119 tooltips = gtk_tooltips_new (); | |
2120 | |
2121 accel_group = gtk_accel_group_new (); | |
2122 | |
2123 prefswin = gtk_window_new (GTK_WINDOW_TOPLEVEL); | |
2124 gtk_container_set_border_width (GTK_CONTAINER (prefswin), 12); | |
2125 gtk_window_set_title (GTK_WINDOW (prefswin), _("Audacious Preferences")); | |
2126 gtk_window_set_position (GTK_WINDOW (prefswin), GTK_WIN_POS_CENTER); | |
2127 gtk_window_set_default_size (GTK_WINDOW (prefswin), 680, 400); | |
2128 | |
2129 vbox = gtk_vbox_new (FALSE, 0); | |
2130 gtk_container_add (GTK_CONTAINER (prefswin), vbox); | |
2131 | |
2132 hbox1 = gtk_hbox_new (FALSE, 8); | |
2133 gtk_box_pack_start (GTK_BOX (vbox), hbox1, TRUE, TRUE, 0); | |
2134 | |
2135 scrolledwindow6 = gtk_scrolled_window_new (NULL, NULL); | |
2136 gtk_box_pack_start (GTK_BOX (hbox1), scrolledwindow6, TRUE, TRUE, 0); | |
2137 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow6), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); | |
2138 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow6), GTK_SHADOW_IN); | |
2139 | |
2140 category_treeview = gtk_tree_view_new (); | |
2141 gtk_container_add (GTK_CONTAINER (scrolledwindow6), category_treeview); | |
2142 gtk_widget_set_size_request (category_treeview, 172, -1); | |
2143 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (category_treeview), FALSE); | |
2144 | |
2145 category_notebook = gtk_notebook_new (); | |
2146 gtk_box_pack_start (GTK_BOX (hbox1), category_notebook, TRUE, TRUE, 0); | |
2147 GTK_WIDGET_UNSET_FLAGS (category_notebook, GTK_CAN_FOCUS); | |
2148 gtk_notebook_set_show_tabs (GTK_NOTEBOOK (category_notebook), FALSE); | |
2149 gtk_notebook_set_show_border (GTK_NOTEBOOK (category_notebook), FALSE); | |
2150 gtk_notebook_set_scrollable (GTK_NOTEBOOK (category_notebook), TRUE); | |
2151 | |
2152 plugin_page_vbox = gtk_vbox_new (FALSE, 0); | |
2153 gtk_container_add (GTK_CONTAINER (category_notebook), plugin_page_vbox); | |
2154 | |
2155 plugin_notebook = gtk_notebook_new (); | |
2156 gtk_box_pack_start (GTK_BOX (plugin_page_vbox), plugin_notebook, TRUE, TRUE, 0); | |
2157 gtk_notebook_set_show_border (GTK_NOTEBOOK (plugin_notebook), FALSE); | |
2158 | |
2159 plugin_input_vbox = gtk_vbox_new (FALSE, 0); | |
2160 gtk_container_add (GTK_CONTAINER (plugin_notebook), plugin_input_vbox); | |
2161 gtk_container_set_border_width (GTK_CONTAINER (plugin_input_vbox), 12); | |
2162 | |
2163 alignment43 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2164 gtk_box_pack_start (GTK_BOX (plugin_input_vbox), alignment43, FALSE, FALSE, 4); | |
2165 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment43), 0, 6, 0, 0); | |
2166 | |
2167 input_plugin_list_label = gtk_label_new_with_mnemonic (_("_Decoder list:")); | |
2168 gtk_container_add (GTK_CONTAINER (alignment43), input_plugin_list_label); | |
2169 gtk_label_set_use_markup (GTK_LABEL (input_plugin_list_label), TRUE); | |
2170 gtk_misc_set_alignment (GTK_MISC (input_plugin_list_label), 0, 0.5); | |
2171 | |
2172 scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL); | |
2173 gtk_box_pack_start (GTK_BOX (plugin_input_vbox), scrolledwindow3, TRUE, TRUE, 0); | |
2174 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); | |
2175 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_SHADOW_IN); | |
2176 | |
2177 input_plugin_view = gtk_tree_view_new (); | |
2178 gtk_container_add (GTK_CONTAINER (scrolledwindow3), input_plugin_view); | |
2179 gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (input_plugin_view), TRUE); | |
2180 gtk_tree_view_set_reorderable (GTK_TREE_VIEW (input_plugin_view), TRUE); | |
2181 | |
2182 input_plugin_button_box = gtk_hbutton_box_new (); | |
2183 gtk_box_pack_start (GTK_BOX (plugin_input_vbox), input_plugin_button_box, FALSE, FALSE, 8); | |
2184 gtk_button_box_set_layout (GTK_BUTTON_BOX (input_plugin_button_box), GTK_BUTTONBOX_START); | |
2185 gtk_box_set_spacing (GTK_BOX (input_plugin_button_box), 8); | |
2186 | |
2187 input_plugin_prefs = gtk_button_new_from_stock ("gtk-preferences"); | |
2188 gtk_container_add (GTK_CONTAINER (input_plugin_button_box), input_plugin_prefs); | |
2189 gtk_widget_set_sensitive (input_plugin_prefs, FALSE); | |
2190 GTK_WIDGET_SET_FLAGS (input_plugin_prefs, GTK_CAN_DEFAULT); | |
2191 | |
2192 input_plugin_info = gtk_button_new_from_stock ("gtk-dialog-info"); | |
2193 gtk_container_add (GTK_CONTAINER (input_plugin_button_box), input_plugin_info); | |
2194 gtk_widget_set_sensitive (input_plugin_info, FALSE); | |
2195 GTK_WIDGET_SET_FLAGS (input_plugin_info, GTK_CAN_DEFAULT); | |
2196 | |
2197 plugin_input_label = gtk_label_new (_("<span size=\"medium\"><b>Decoders</b></span>")); | |
2198 gtk_notebook_set_tab_label (GTK_NOTEBOOK (plugin_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (plugin_notebook), 0), plugin_input_label); | |
2199 gtk_label_set_use_markup (GTK_LABEL (plugin_input_label), TRUE); | |
2200 gtk_misc_set_alignment (GTK_MISC (plugin_input_label), 0, 0); | |
2201 | |
2202 plugin_general_vbox = gtk_vbox_new (FALSE, 0); | |
2203 gtk_container_add (GTK_CONTAINER (plugin_notebook), plugin_general_vbox); | |
2204 gtk_container_set_border_width (GTK_CONTAINER (plugin_general_vbox), 12); | |
2205 | |
2206 alignment45 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2207 gtk_box_pack_start (GTK_BOX (plugin_general_vbox), alignment45, FALSE, FALSE, 4); | |
2208 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment45), 0, 6, 0, 0); | |
2209 | |
2210 label11 = gtk_label_new_with_mnemonic (_("_General plugin list:")); | |
2211 gtk_container_add (GTK_CONTAINER (alignment45), label11); | |
2212 gtk_label_set_use_markup (GTK_LABEL (label11), TRUE); | |
2213 gtk_misc_set_alignment (GTK_MISC (label11), 0, 0.5); | |
2214 | |
2215 scrolledwindow5 = gtk_scrolled_window_new (NULL, NULL); | |
2216 gtk_box_pack_start (GTK_BOX (plugin_general_vbox), scrolledwindow5, TRUE, TRUE, 0); | |
2217 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); | |
2218 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_SHADOW_IN); | |
2219 | |
2220 general_plugin_view = gtk_tree_view_new (); | |
2221 gtk_container_add (GTK_CONTAINER (scrolledwindow5), general_plugin_view); | |
2222 gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (general_plugin_view), TRUE); | |
2223 gtk_tree_view_set_reorderable (GTK_TREE_VIEW (general_plugin_view), TRUE); | |
2224 | |
2225 general_plugin_button_box = gtk_hbutton_box_new (); | |
2226 gtk_box_pack_start (GTK_BOX (plugin_general_vbox), general_plugin_button_box, FALSE, FALSE, 8); | |
2227 gtk_button_box_set_layout (GTK_BUTTON_BOX (general_plugin_button_box), GTK_BUTTONBOX_START); | |
2228 gtk_box_set_spacing (GTK_BOX (general_plugin_button_box), 8); | |
2229 | |
2230 general_plugin_prefs = gtk_button_new_from_stock ("gtk-preferences"); | |
2231 gtk_container_add (GTK_CONTAINER (general_plugin_button_box), general_plugin_prefs); | |
2232 gtk_widget_set_sensitive (general_plugin_prefs, FALSE); | |
2233 GTK_WIDGET_SET_FLAGS (general_plugin_prefs, GTK_CAN_DEFAULT); | |
2234 | |
2235 general_plugin_info = gtk_button_new_from_stock ("gtk-dialog-info"); | |
2236 gtk_container_add (GTK_CONTAINER (general_plugin_button_box), general_plugin_info); | |
2237 gtk_widget_set_sensitive (general_plugin_info, FALSE); | |
2238 GTK_WIDGET_SET_FLAGS (general_plugin_info, GTK_CAN_DEFAULT); | |
2239 | |
2240 plugin_general_label = gtk_label_new (_("<span size=\"medium\"><b>General</b></span>")); | |
2241 gtk_notebook_set_tab_label (GTK_NOTEBOOK (plugin_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (plugin_notebook), 1), plugin_general_label); | |
2242 gtk_label_set_use_markup (GTK_LABEL (plugin_general_label), TRUE); | |
2243 | |
2244 vbox21 = gtk_vbox_new (FALSE, 0); | |
2245 gtk_container_add (GTK_CONTAINER (plugin_notebook), vbox21); | |
2246 gtk_container_set_border_width (GTK_CONTAINER (vbox21), 12); | |
2247 | |
2248 alignment46 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2249 gtk_box_pack_start (GTK_BOX (vbox21), alignment46, FALSE, FALSE, 4); | |
2250 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment46), 0, 6, 0, 0); | |
2251 | |
2252 label53 = gtk_label_new_with_mnemonic (_("_Visualization plugin list:")); | |
2253 gtk_container_add (GTK_CONTAINER (alignment46), label53); | |
2254 gtk_label_set_use_markup (GTK_LABEL (label53), TRUE); | |
2255 gtk_misc_set_alignment (GTK_MISC (label53), 0, 0.5); | |
2256 | |
2257 scrolledwindow7 = gtk_scrolled_window_new (NULL, NULL); | |
2258 gtk_box_pack_start (GTK_BOX (vbox21), scrolledwindow7, TRUE, TRUE, 0); | |
2259 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow7), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); | |
2260 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow7), GTK_SHADOW_IN); | |
2261 | |
2262 vis_plugin_view = gtk_tree_view_new (); | |
2263 gtk_container_add (GTK_CONTAINER (scrolledwindow7), vis_plugin_view); | |
2264 gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (vis_plugin_view), TRUE); | |
2265 gtk_tree_view_set_reorderable (GTK_TREE_VIEW (vis_plugin_view), TRUE); | |
2266 | |
2267 hbuttonbox6 = gtk_hbutton_box_new (); | |
2268 gtk_box_pack_start (GTK_BOX (vbox21), hbuttonbox6, FALSE, FALSE, 8); | |
2269 gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox6), GTK_BUTTONBOX_START); | |
2270 gtk_box_set_spacing (GTK_BOX (hbuttonbox6), 8); | |
2271 | |
2272 vis_plugin_prefs = gtk_button_new_from_stock ("gtk-preferences"); | |
2273 gtk_container_add (GTK_CONTAINER (hbuttonbox6), vis_plugin_prefs); | |
2274 gtk_widget_set_sensitive (vis_plugin_prefs, FALSE); | |
2275 GTK_WIDGET_SET_FLAGS (vis_plugin_prefs, GTK_CAN_DEFAULT); | |
2276 | |
2277 vis_plugin_info = gtk_button_new_from_stock ("gtk-dialog-info"); | |
2278 gtk_container_add (GTK_CONTAINER (hbuttonbox6), vis_plugin_info); | |
2279 gtk_widget_set_sensitive (vis_plugin_info, FALSE); | |
2280 GTK_WIDGET_SET_FLAGS (vis_plugin_info, GTK_CAN_DEFAULT); | |
2281 | |
2282 vis_label = gtk_label_new (_("<b>Visualization</b>")); | |
2283 gtk_notebook_set_tab_label (GTK_NOTEBOOK (plugin_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (plugin_notebook), 2), vis_label); | |
2284 gtk_label_set_use_markup (GTK_LABEL (vis_label), TRUE); | |
2285 | |
2286 vbox25 = gtk_vbox_new (FALSE, 0); | |
2287 gtk_container_add (GTK_CONTAINER (plugin_notebook), vbox25); | |
2288 gtk_container_set_border_width (GTK_CONTAINER (vbox25), 12); | |
2289 | |
2290 alignment58 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2291 gtk_box_pack_start (GTK_BOX (vbox25), alignment58, FALSE, FALSE, 4); | |
2292 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment58), 0, 6, 0, 0); | |
2293 | |
2294 label64 = gtk_label_new_with_mnemonic (_("_Effect plugin list:")); | |
2295 gtk_container_add (GTK_CONTAINER (alignment58), label64); | |
2296 gtk_label_set_use_markup (GTK_LABEL (label64), TRUE); | |
2297 gtk_misc_set_alignment (GTK_MISC (label64), 0, 0.5); | |
2298 | |
2299 scrolledwindow9 = gtk_scrolled_window_new (NULL, NULL); | |
2300 gtk_box_pack_start (GTK_BOX (vbox25), scrolledwindow9, TRUE, TRUE, 0); | |
2301 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow9), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); | |
2302 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow9), GTK_SHADOW_IN); | |
2303 | |
2304 effect_plugin_view = gtk_tree_view_new (); | |
2305 gtk_container_add (GTK_CONTAINER (scrolledwindow9), effect_plugin_view); | |
2306 gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (effect_plugin_view), TRUE); | |
2307 gtk_tree_view_set_reorderable (GTK_TREE_VIEW (effect_plugin_view), TRUE); | |
2308 | |
2309 hbuttonbox9 = gtk_hbutton_box_new (); | |
2310 gtk_box_pack_start (GTK_BOX (vbox25), hbuttonbox9, FALSE, FALSE, 8); | |
2311 gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox9), GTK_BUTTONBOX_START); | |
2312 gtk_box_set_spacing (GTK_BOX (hbuttonbox9), 8); | |
2313 | |
2314 effect_plugin_prefs = gtk_button_new_from_stock ("gtk-preferences"); | |
2315 gtk_container_add (GTK_CONTAINER (hbuttonbox9), effect_plugin_prefs); | |
2316 gtk_widget_set_sensitive (effect_plugin_prefs, FALSE); | |
2317 GTK_WIDGET_SET_FLAGS (effect_plugin_prefs, GTK_CAN_DEFAULT); | |
2318 | |
2319 effect_plugin_info = gtk_button_new_from_stock ("gtk-dialog-info"); | |
2320 gtk_container_add (GTK_CONTAINER (hbuttonbox9), effect_plugin_info); | |
2321 gtk_widget_set_sensitive (effect_plugin_info, FALSE); | |
2322 GTK_WIDGET_SET_FLAGS (effect_plugin_info, GTK_CAN_DEFAULT); | |
2323 | |
2324 effects_label = gtk_label_new (_("<b>Effects</b>")); | |
2325 gtk_notebook_set_tab_label (GTK_NOTEBOOK (plugin_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (plugin_notebook), 3), effects_label); | |
2326 gtk_label_set_use_markup (GTK_LABEL (effects_label), TRUE); | |
2327 | |
2328 plugin_label = gtk_label_new (_("Plugins")); | |
2329 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 0), plugin_label); | |
2330 | |
2331 appearance_page_vbox = gtk_vbox_new (FALSE, 0); | |
2332 gtk_container_add (GTK_CONTAINER (category_notebook), appearance_page_vbox); | |
2333 | |
2334 vbox37 = gtk_vbox_new (FALSE, 0); | |
2335 gtk_box_pack_start (GTK_BOX (appearance_page_vbox), vbox37, TRUE, TRUE, 0); | |
2336 | |
2337 vbox38 = gtk_vbox_new (FALSE, 0); | |
2338 gtk_box_pack_start (GTK_BOX (vbox37), vbox38, FALSE, TRUE, 0); | |
2339 | |
2340 hbox12 = gtk_hbox_new (FALSE, 0); | |
2341 gtk_box_pack_start (GTK_BOX (vbox38), hbox12, TRUE, TRUE, 0); | |
2342 | |
2343 alignment94 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2344 gtk_box_pack_start (GTK_BOX (hbox12), alignment94, TRUE, TRUE, 0); | |
2345 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment94), 0, 4, 0, 0); | |
2346 | |
2347 hbox13 = gtk_hbox_new (FALSE, 0); | |
2348 gtk_container_add (GTK_CONTAINER (alignment94), hbox13); | |
2349 | |
2350 label103 = gtk_label_new_with_mnemonic (_("<b>_Skin</b>")); | |
2351 gtk_box_pack_start (GTK_BOX (hbox13), label103, TRUE, TRUE, 0); | |
2352 gtk_label_set_use_markup (GTK_LABEL (label103), TRUE); | |
2353 gtk_misc_set_alignment (GTK_MISC (label103), 0, 0); | |
2354 | |
2355 colorspace_button = gtk_button_new (); | |
2356 gtk_box_pack_start (GTK_BOX (hbox13), colorspace_button, FALSE, FALSE, 0); | |
2357 | |
2358 image11 = gtk_image_new_from_stock ("gtk-properties", GTK_ICON_SIZE_BUTTON); | |
2359 gtk_container_add (GTK_CONTAINER (colorspace_button), image11); | |
2360 | |
2361 skin_refresh_button = gtk_button_new (); | |
2362 gtk_box_pack_start (GTK_BOX (hbox13), skin_refresh_button, FALSE, FALSE, 0); | |
2363 GTK_WIDGET_UNSET_FLAGS (skin_refresh_button, GTK_CAN_FOCUS); | |
2364 gtk_tooltips_set_tip (tooltips, skin_refresh_button, _("Refresh skin list"), NULL); | |
2365 gtk_button_set_relief (GTK_BUTTON (skin_refresh_button), GTK_RELIEF_HALF); | |
2366 gtk_button_set_focus_on_click (GTK_BUTTON (skin_refresh_button), FALSE); | |
2367 | |
2368 image12 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON); | |
2369 gtk_container_add (GTK_CONTAINER (skin_refresh_button), image12); | |
2370 | |
2371 alignment95 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2372 gtk_box_pack_start (GTK_BOX (vbox38), alignment95, TRUE, TRUE, 0); | |
2373 gtk_widget_set_size_request (alignment95, -1, 172); | |
2374 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment95), 0, 0, 12, 0); | |
2375 | |
2376 skin_view_scrolled_window = gtk_scrolled_window_new (NULL, NULL); | |
2377 gtk_container_add (GTK_CONTAINER (alignment95), skin_view_scrolled_window); | |
2378 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (skin_view_scrolled_window), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); | |
2379 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (skin_view_scrolled_window), GTK_SHADOW_IN); | |
2380 | |
2381 skin_view = gtk_tree_view_new (); | |
2382 gtk_container_add (GTK_CONTAINER (skin_view_scrolled_window), skin_view); | |
2383 gtk_widget_set_size_request (skin_view, -1, 100); | |
2384 | |
2385 vbox39 = gtk_vbox_new (FALSE, 0); | |
2386 gtk_box_pack_start (GTK_BOX (vbox37), vbox39, FALSE, TRUE, 0); | |
2387 | |
2388 alignment96 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2389 gtk_box_pack_start (GTK_BOX (vbox39), alignment96, TRUE, TRUE, 0); | |
2390 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment96), 12, 6, 0, 0); | |
2391 | |
2392 label104 = gtk_label_new_with_mnemonic (_("<b>_Fonts</b>")); | |
2393 gtk_container_add (GTK_CONTAINER (alignment96), label104); | |
2394 gtk_label_set_use_markup (GTK_LABEL (label104), TRUE); | |
2395 gtk_misc_set_alignment (GTK_MISC (label104), 0, 0.5); | |
2396 | |
2397 table14 = gtk_table_new (2, 2, FALSE); | |
2398 gtk_box_pack_start (GTK_BOX (vbox39), table14, TRUE, TRUE, 0); | |
2399 gtk_table_set_row_spacings (GTK_TABLE (table14), 8); | |
2400 gtk_table_set_col_spacings (GTK_TABLE (table14), 2); | |
2401 | |
2402 alignment97 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2403 gtk_table_attach (GTK_TABLE (table14), alignment97, 0, 1, 0, 1, | |
2404 (GtkAttachOptions) (0), | |
2405 (GtkAttachOptions) (0), 0, 0); | |
2406 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment97), 0, 0, 12, 6); | |
2407 | |
2408 label105 = gtk_label_new_with_mnemonic (_("_Player:")); | |
2409 gtk_container_add (GTK_CONTAINER (alignment97), label105); | |
2410 gtk_label_set_use_markup (GTK_LABEL (label105), TRUE); | |
2411 gtk_misc_set_alignment (GTK_MISC (label105), 1, 0.5); | |
2412 | |
2413 alignment98 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2414 gtk_table_attach (GTK_TABLE (table14), alignment98, 0, 1, 1, 2, | |
2415 (GtkAttachOptions) (0), | |
2416 (GtkAttachOptions) (0), 0, 0); | |
2417 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment98), 0, 0, 12, 6); | |
2418 | |
2419 label106 = gtk_label_new_with_mnemonic (_("_Playlist:")); | |
2420 gtk_container_add (GTK_CONTAINER (alignment98), label106); | |
2421 gtk_label_set_use_markup (GTK_LABEL (label106), TRUE); | |
2422 gtk_label_set_justify (GTK_LABEL (label106), GTK_JUSTIFY_RIGHT); | |
2423 gtk_misc_set_alignment (GTK_MISC (label106), 1, 0.5); | |
2424 | |
2425 fontbutton1 = gtk_font_button_new (); | |
2426 gtk_table_attach (GTK_TABLE (table14), fontbutton1, 1, 2, 0, 1, | |
2427 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2428 (GtkAttachOptions) (0), 0, 0); | |
2429 gtk_font_button_set_title (GTK_FONT_BUTTON (fontbutton1), _("Select main player window font:")); | |
2430 gtk_font_button_set_use_font (GTK_FONT_BUTTON (fontbutton1), TRUE); | |
2431 gtk_font_button_set_use_size (GTK_FONT_BUTTON (fontbutton1), TRUE); | |
2432 | |
2433 fontbutton2 = gtk_font_button_new (); | |
2434 gtk_table_attach (GTK_TABLE (table14), fontbutton2, 1, 2, 1, 2, | |
2435 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2436 (GtkAttachOptions) (0), 0, 0); | |
2437 gtk_font_button_set_title (GTK_FONT_BUTTON (fontbutton2), _("Select playlist font:")); | |
2438 gtk_font_button_set_use_font (GTK_FONT_BUTTON (fontbutton2), TRUE); | |
2439 gtk_font_button_set_use_size (GTK_FONT_BUTTON (fontbutton2), TRUE); | |
2440 | |
2441 alignment99 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2442 gtk_box_pack_start (GTK_BOX (vbox39), alignment99, TRUE, TRUE, 0); | |
2443 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment99), 4, 0, 12, 0); | |
2444 | |
2445 checkbutton11 = gtk_check_button_new_with_mnemonic (_("Use Bitmap fonts if available")); | |
2446 gtk_container_add (GTK_CONTAINER (alignment99), checkbutton11); | |
2447 gtk_tooltips_set_tip (tooltips, checkbutton11, _("Use bitmap fonts if they are available. Bitmap fonts do not support Unicode strings."), NULL); | |
2448 | |
2449 vbox40 = gtk_vbox_new (FALSE, 0); | |
2450 gtk_box_pack_start (GTK_BOX (vbox37), vbox40, FALSE, TRUE, 0); | |
2451 | |
2452 alignment100 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2453 gtk_box_pack_start (GTK_BOX (vbox40), alignment100, TRUE, TRUE, 0); | |
2454 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment100), 12, 6, 0, 0); | |
2455 | |
2456 label107 = gtk_label_new_with_mnemonic (_("<b>_Miscellaneous</b>")); | |
2457 gtk_container_add (GTK_CONTAINER (alignment100), label107); | |
2458 gtk_label_set_use_markup (GTK_LABEL (label107), TRUE); | |
2459 gtk_misc_set_alignment (GTK_MISC (label107), 0, 0.5); | |
2460 | |
2461 alignment101 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2462 gtk_box_pack_start (GTK_BOX (vbox40), alignment101, TRUE, TRUE, 0); | |
2463 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment101), 2, 0, 12, 0); | |
2464 | |
2465 playlist_show_pl_numbers = gtk_check_button_new_with_mnemonic (_("Show track numbers in playlist")); | |
2466 gtk_container_add (GTK_CONTAINER (alignment101), playlist_show_pl_numbers); | |
2467 | |
2468 alignment102 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2469 gtk_box_pack_start (GTK_BOX (vbox40), alignment102, TRUE, TRUE, 0); | |
2470 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment102), 0, 0, 12, 0); | |
2471 | |
2472 playlist_show_pl_separator = gtk_check_button_new_with_mnemonic (_("Show separators in playlist")); | |
2473 gtk_container_add (GTK_CONTAINER (alignment102), playlist_show_pl_separator); | |
2474 | |
2475 alignment103 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2476 gtk_box_pack_start (GTK_BOX (vbox40), alignment103, TRUE, TRUE, 0); | |
2477 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment103), 0, 0, 12, 0); | |
2478 | |
2479 checkbutton14 = gtk_check_button_new_with_mnemonic (_("Use custom cursors")); | |
2480 gtk_container_add (GTK_CONTAINER (alignment103), checkbutton14); | |
2481 | |
2482 alignment104 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2483 gtk_box_pack_start (GTK_BOX (vbox40), alignment104, TRUE, TRUE, 0); | |
2484 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment104), 0, 0, 12, 0); | |
2485 | |
2486 show_wm_decorations = gtk_check_button_new_with_mnemonic (_("Show window manager decoration")); | |
2487 gtk_container_add (GTK_CONTAINER (alignment104), show_wm_decorations); | |
2488 gtk_tooltips_set_tip (tooltips, show_wm_decorations, _("This enables the window manager to show decorations for windows."), NULL); | |
2489 | |
2490 alignment105 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2491 gtk_box_pack_start (GTK_BOX (vbox40), alignment105, TRUE, TRUE, 0); | |
2492 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment105), 0, 0, 12, 0); | |
2493 | |
2494 xmms_style_fileselector_cb1 = gtk_check_button_new_with_mnemonic (_("Use XMMS-style file selector instead of the default selector")); | |
2495 gtk_container_add (GTK_CONTAINER (alignment105), xmms_style_fileselector_cb1); | |
2496 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); | |
2497 | |
2498 alignment106 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2499 gtk_box_pack_start (GTK_BOX (vbox40), alignment106, TRUE, TRUE, 0); | |
2500 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment106), 0, 0, 12, 0); | |
2501 | |
2502 checkbutton17 = gtk_check_button_new_with_mnemonic (_("Use two-way text scroller")); | |
2503 gtk_container_add (GTK_CONTAINER (alignment106), checkbutton17); | |
2504 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); | |
2505 | |
2506 appearance_label = gtk_label_new (_("Appearance")); | |
2507 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 1), appearance_label); | |
2508 | |
2509 mouse_page_vbox = gtk_vbox_new (FALSE, 0); | |
2510 gtk_container_add (GTK_CONTAINER (category_notebook), mouse_page_vbox); | |
2511 | |
2512 vbox20 = gtk_vbox_new (FALSE, 0); | |
2513 gtk_box_pack_start (GTK_BOX (mouse_page_vbox), vbox20, TRUE, TRUE, 0); | |
2514 | |
2515 alignment36 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2516 gtk_box_pack_start (GTK_BOX (vbox20), alignment36, FALSE, FALSE, 0); | |
2517 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment36), 0, 12, 0, 0); | |
2518 | |
2519 label51 = gtk_label_new (_("<b>Mouse wheel</b>")); | |
2520 gtk_container_add (GTK_CONTAINER (alignment36), label51); | |
2521 gtk_label_set_use_markup (GTK_LABEL (label51), TRUE); | |
2522 gtk_misc_set_alignment (GTK_MISC (label51), 0, 0); | |
2523 | |
2524 alignment34 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2525 gtk_box_pack_start (GTK_BOX (vbox20), alignment34, FALSE, FALSE, 0); | |
2526 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment34), 0, 0, 12, 0); | |
2527 | |
2528 table4 = gtk_table_new (2, 3, FALSE); | |
2529 gtk_container_add (GTK_CONTAINER (alignment34), table4); | |
2530 gtk_table_set_row_spacings (GTK_TABLE (table4), 6); | |
2531 | |
2532 mouse_wheel_volume_adj = gtk_adjustment_new (5, 0, 100, 1, 10, 10); | |
2533 mouse_wheel_volume = gtk_spin_button_new (GTK_ADJUSTMENT (mouse_wheel_volume_adj), 1, 0); | |
2534 gtk_table_attach (GTK_TABLE (table4), mouse_wheel_volume, 1, 2, 0, 1, | |
2535 (GtkAttachOptions) (0), | |
2536 (GtkAttachOptions) (0), 4, 0); | |
2537 gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (mouse_wheel_volume), TRUE); | |
2538 | |
2539 label35 = gtk_label_new (_("lines")); | |
2540 gtk_table_attach (GTK_TABLE (table4), label35, 2, 3, 1, 2, | |
2541 (GtkAttachOptions) (0), | |
2542 (GtkAttachOptions) (0), 0, 0); | |
2543 gtk_misc_set_alignment (GTK_MISC (label35), 0, 0.5); | |
2544 gtk_misc_set_padding (GTK_MISC (label35), 4, 0); | |
2545 | |
2546 mouse_wheel_scroll_pl_adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10); | |
2547 mouse_wheel_scroll_pl = gtk_spin_button_new (GTK_ADJUSTMENT (mouse_wheel_scroll_pl_adj), 1, 0); | |
2548 gtk_table_attach (GTK_TABLE (table4), mouse_wheel_scroll_pl, 1, 2, 1, 2, | |
2549 (GtkAttachOptions) (0), | |
2550 (GtkAttachOptions) (0), 4, 0); | |
2551 | |
2552 label34 = gtk_label_new (_("Scrolls playlist by")); | |
2553 gtk_table_attach (GTK_TABLE (table4), label34, 0, 1, 1, 2, | |
2554 (GtkAttachOptions) (0), | |
2555 (GtkAttachOptions) (0), 0, 0); | |
2556 gtk_misc_set_alignment (GTK_MISC (label34), 0, 0.5); | |
2557 gtk_misc_set_padding (GTK_MISC (label34), 4, 0); | |
2558 | |
2559 label33 = gtk_label_new (_("percent")); | |
2560 gtk_table_attach (GTK_TABLE (table4), label33, 2, 3, 0, 1, | |
2561 (GtkAttachOptions) (0), | |
2562 (GtkAttachOptions) (0), 0, 0); | |
2563 gtk_misc_set_alignment (GTK_MISC (label33), 0, 0.5); | |
2564 gtk_misc_set_padding (GTK_MISC (label33), 4, 0); | |
2565 | |
2566 label32 = gtk_label_new (_("Changes volume by")); | |
2567 gtk_table_attach (GTK_TABLE (table4), label32, 0, 1, 0, 1, | |
2568 (GtkAttachOptions) (0), | |
2569 (GtkAttachOptions) (0), 0, 0); | |
2570 gtk_misc_set_alignment (GTK_MISC (label32), 0, 0.5); | |
2571 gtk_misc_set_padding (GTK_MISC (label32), 4, 0); | |
2572 | |
2573 mouse_label = gtk_label_new (_("Mouse")); | |
2574 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 2), mouse_label); | |
2575 | |
2576 playlist_page_vbox = gtk_vbox_new (FALSE, 0); | |
2577 gtk_container_add (GTK_CONTAINER (category_notebook), playlist_page_vbox); | |
2578 | |
2579 vbox5 = gtk_vbox_new (FALSE, 0); | |
2580 gtk_box_pack_start (GTK_BOX (playlist_page_vbox), vbox5, TRUE, TRUE, 0); | |
2581 | |
2582 alignment14 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2583 gtk_box_pack_start (GTK_BOX (vbox5), alignment14, FALSE, FALSE, 0); | |
2584 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment14), 0, 12, 0, 0); | |
2585 | |
2586 label38 = gtk_label_new (_("<b>Filename</b>")); | |
2587 gtk_container_add (GTK_CONTAINER (alignment14), label38); | |
2588 gtk_label_set_use_markup (GTK_LABEL (label38), TRUE); | |
2589 gtk_misc_set_alignment (GTK_MISC (label38), 0, 0.5); | |
2590 | |
2591 alignment12 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2592 gtk_box_pack_start (GTK_BOX (vbox5), alignment12, FALSE, FALSE, 0); | |
2593 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment12), 0, 0, 12, 0); | |
2594 | |
2595 playlist_convert_underscore = gtk_check_button_new_with_mnemonic (_("Convert underscores to blanks")); | |
2596 gtk_container_add (GTK_CONTAINER (alignment12), playlist_convert_underscore); | |
2597 | |
2598 alignment13 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2599 gtk_box_pack_start (GTK_BOX (vbox5), alignment13, FALSE, FALSE, 0); | |
2600 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment13), 0, 0, 12, 0); | |
2601 | |
2602 playlist_convert_twenty = gtk_check_button_new_with_mnemonic (_("Convert %20 to blanks")); | |
2603 gtk_container_add (GTK_CONTAINER (alignment13), playlist_convert_twenty); | |
2604 | |
2605 alignment88 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2606 gtk_box_pack_start (GTK_BOX (vbox5), alignment88, FALSE, FALSE, 0); | |
2607 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment88), 0, 0, 12, 0); | |
2608 | |
2609 playlist_convert_slash = gtk_check_button_new_with_mnemonic (_("Convert backslash '\\' to forward slash '/'")); | |
2610 gtk_container_add (GTK_CONTAINER (alignment88), playlist_convert_slash); | |
2611 | |
2612 alignment15 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2613 gtk_box_pack_start (GTK_BOX (vbox5), alignment15, FALSE, FALSE, 0); | |
2614 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment15), 12, 12, 0, 0); | |
2615 | |
2616 label39 = gtk_label_new (_("<b>Metadata</b>")); | |
2617 gtk_container_add (GTK_CONTAINER (alignment15), label39); | |
2618 gtk_label_set_use_markup (GTK_LABEL (label39), TRUE); | |
2619 gtk_misc_set_alignment (GTK_MISC (label39), 0, 0.5); | |
2620 | |
2621 alignment16 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2622 gtk_box_pack_start (GTK_BOX (vbox5), alignment16, FALSE, FALSE, 0); | |
2623 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment16), 0, 0, 12, 0); | |
2624 | |
2625 playlist_use_metadata = gtk_check_button_new_with_mnemonic (_("Load metadata from playlists and files")); | |
2626 gtk_container_add (GTK_CONTAINER (alignment16), playlist_use_metadata); | |
2627 gtk_tooltips_set_tip (tooltips, playlist_use_metadata, _("Load metadata (tag information) from music files."), NULL); | |
2628 | |
2629 alignment18 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2630 gtk_box_pack_start (GTK_BOX (vbox5), alignment18, FALSE, FALSE, 0); | |
2631 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment18), 0, 0, 24, 0); | |
2632 | |
2633 playlist_use_metadata_box = gtk_vbox_new (FALSE, 0); | |
2634 gtk_container_add (GTK_CONTAINER (alignment18), playlist_use_metadata_box); | |
2635 | |
2636 playlist_metadata_on_load = gtk_radio_button_new_with_mnemonic (NULL, _("On load")); | |
2637 gtk_box_pack_start (GTK_BOX (playlist_use_metadata_box), playlist_metadata_on_load, FALSE, FALSE, 0); | |
2638 gtk_tooltips_set_tip (tooltips, playlist_metadata_on_load, _("Load metadata when adding the file to the playlist or opening it"), NULL); | |
2639 gtk_radio_button_set_group (GTK_RADIO_BUTTON (playlist_metadata_on_load), playlist_metadata_on_load_group); | |
2640 playlist_metadata_on_load_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (playlist_metadata_on_load)); | |
2641 | |
2642 playlist_metadata_on_display = gtk_radio_button_new_with_mnemonic (NULL, _("On display")); | |
2643 gtk_box_pack_start (GTK_BOX (playlist_use_metadata_box), playlist_metadata_on_display, FALSE, FALSE, 0); | |
2644 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); | |
2645 gtk_radio_button_set_group (GTK_RADIO_BUTTON (playlist_metadata_on_display), playlist_metadata_on_load_group); | |
2646 playlist_metadata_on_load_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (playlist_metadata_on_display)); | |
2647 | |
2648 table10 = gtk_table_new (2, 2, FALSE); | |
2649 gtk_box_pack_start (GTK_BOX (playlist_use_metadata_box), table10, TRUE, TRUE, 0); | |
2650 | |
2651 label73 = gtk_label_new (_("Auto character encoding detector for:")); | |
2652 gtk_table_attach (GTK_TABLE (table10), label73, 0, 1, 0, 1, | |
2653 (GtkAttachOptions) (0), | |
2654 (GtkAttachOptions) (0), 0, 0); | |
2655 gtk_label_set_justify (GTK_LABEL (label73), GTK_JUSTIFY_RIGHT); | |
2656 gtk_misc_set_alignment (GTK_MISC (label73), 1, 0.5); | |
2657 | |
2658 combobox1 = gtk_combo_box_new_text (); | |
2659 gtk_table_attach (GTK_TABLE (table10), combobox1, 1, 2, 0, 1, | |
2660 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2661 (GtkAttachOptions) (0), 0, 0); | |
2662 | |
2663 entry1 = gtk_entry_new (); | |
2664 gtk_table_attach (GTK_TABLE (table10), entry1, 1, 2, 1, 2, | |
2665 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2666 (GtkAttachOptions) (0), 0, 0); | |
2667 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); | |
2668 | |
2669 label74 = gtk_label_new (_("Fallback character encodings:")); | |
2670 gtk_table_attach (GTK_TABLE (table10), label74, 0, 1, 1, 2, | |
2671 (GtkAttachOptions) (0), | |
2672 (GtkAttachOptions) (0), 0, 0); | |
2673 gtk_label_set_justify (GTK_LABEL (label74), GTK_JUSTIFY_RIGHT); | |
2674 gtk_misc_set_alignment (GTK_MISC (label74), 1, 0.5); | |
2675 | |
2676 alignment19 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2677 gtk_box_pack_start (GTK_BOX (vbox5), alignment19, FALSE, FALSE, 0); | |
2678 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment19), 12, 12, 0, 0); | |
2679 | |
2680 label40 = gtk_label_new (_("<b>File Dialog</b>")); | |
2681 gtk_container_add (GTK_CONTAINER (alignment19), label40); | |
2682 gtk_label_set_use_markup (GTK_LABEL (label40), TRUE); | |
2683 gtk_misc_set_alignment (GTK_MISC (label40), 0, 0.5); | |
2684 | |
2685 alignment20 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2686 gtk_box_pack_start (GTK_BOX (vbox5), alignment20, FALSE, FALSE, 0); | |
2687 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment20), 0, 0, 12, 0); | |
2688 | |
2689 refresh_file_list = gtk_check_button_new_with_mnemonic (_("Always refresh directory when opening file dialog")); | |
2690 gtk_container_add (GTK_CONTAINER (alignment20), refresh_file_list); | |
2691 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); | |
2692 | |
2693 alignment55 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2694 gtk_box_pack_start (GTK_BOX (vbox5), alignment55, FALSE, FALSE, 0); | |
2695 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment55), 12, 12, 0, 0); | |
2696 | |
2697 label60 = gtk_label_new (_("<b>Song Display</b>")); | |
2698 gtk_container_add (GTK_CONTAINER (alignment55), label60); | |
2699 gtk_label_set_use_markup (GTK_LABEL (label60), TRUE); | |
2700 gtk_misc_set_alignment (GTK_MISC (label60), 0, 0.5); | |
2701 | |
2702 alignment56 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2703 gtk_box_pack_start (GTK_BOX (vbox5), alignment56, FALSE, FALSE, 0); | |
2704 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment56), 0, 0, 12, 0); | |
2705 | |
2706 table6 = gtk_table_new (2, 3, FALSE); | |
2707 gtk_container_add (GTK_CONTAINER (alignment56), table6); | |
2708 gtk_table_set_row_spacings (GTK_TABLE (table6), 4); | |
2709 gtk_table_set_col_spacings (GTK_TABLE (table6), 12); | |
2710 | |
2711 titlestring_help_button = gtk_button_new (); | |
2712 gtk_table_attach (GTK_TABLE (table6), titlestring_help_button, 2, 3, 1, 2, | |
2713 (GtkAttachOptions) (0), | |
2714 (GtkAttachOptions) (0), 0, 0); | |
2715 GTK_WIDGET_UNSET_FLAGS (titlestring_help_button, GTK_CAN_FOCUS); | |
2716 gtk_tooltips_set_tip (tooltips, titlestring_help_button, _("Show information about titlestring format"), NULL); | |
2717 gtk_button_set_relief (GTK_BUTTON (titlestring_help_button), GTK_RELIEF_HALF); | |
2718 gtk_button_set_focus_on_click (GTK_BUTTON (titlestring_help_button), FALSE); | |
2719 | |
2720 image1 = gtk_image_new_from_stock ("gtk-index", GTK_ICON_SIZE_BUTTON); | |
2721 gtk_container_add (GTK_CONTAINER (titlestring_help_button), image1); | |
2722 | |
2723 titlestring_cbox = gtk_combo_box_new_text (); | |
2724 gtk_table_attach (GTK_TABLE (table6), titlestring_cbox, 1, 3, 0, 1, | |
2725 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2726 (GtkAttachOptions) (0), 0, 0); | |
2727 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("TITLE")); | |
2728 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("ARTIST - TITLE")); | |
2729 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("ARTIST - ALBUM - TITLE")); | |
2730 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("ARTIST - ALBUM - TRACK. TITLE")); | |
2731 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("ARTIST [ ALBUM ] - TRACK. TITLE")); | |
2732 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("ALBUM - TITLE")); | |
2733 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("Custom")); | |
2734 | |
2735 titlestring_entry = gtk_entry_new (); | |
2736 gtk_table_attach (GTK_TABLE (table6), titlestring_entry, 1, 2, 1, 2, | |
2737 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2738 (GtkAttachOptions) (0), 0, 0); | |
2739 | |
2740 label62 = gtk_label_new (_("Custom string:")); | |
2741 gtk_table_attach (GTK_TABLE (table6), label62, 0, 1, 1, 2, | |
2742 (GtkAttachOptions) (0), | |
2743 (GtkAttachOptions) (0), 0, 0); | |
2744 gtk_label_set_justify (GTK_LABEL (label62), GTK_JUSTIFY_RIGHT); | |
2745 gtk_misc_set_alignment (GTK_MISC (label62), 1, 0.5); | |
2746 | |
2747 label61 = gtk_label_new (_("Title format:")); | |
2748 gtk_table_attach (GTK_TABLE (table6), label61, 0, 1, 0, 1, | |
2749 (GtkAttachOptions) (0), | |
2750 (GtkAttachOptions) (0), 0, 0); | |
2751 gtk_label_set_justify (GTK_LABEL (label61), GTK_JUSTIFY_RIGHT); | |
2752 gtk_misc_set_alignment (GTK_MISC (label61), 1, 0.5); | |
2753 | |
2754 alignment85 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2755 gtk_box_pack_start (GTK_BOX (vbox5), alignment85, FALSE, FALSE, 0); | |
2756 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment85), 12, 12, 0, 0); | |
2757 | |
2758 label84 = gtk_label_new (_("<b>Popup Information</b>")); | |
2759 gtk_container_add (GTK_CONTAINER (alignment85), label84); | |
2760 gtk_label_set_use_markup (GTK_LABEL (label84), TRUE); | |
2761 gtk_misc_set_alignment (GTK_MISC (label84), 0, 0.5); | |
2762 | |
2763 alignment86 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2764 gtk_box_pack_start (GTK_BOX (vbox5), alignment86, FALSE, FALSE, 0); | |
2765 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment86), 0, 0, 12, 0); | |
2766 | |
2767 hbox9 = gtk_hbox_new (FALSE, 12); | |
2768 gtk_container_add (GTK_CONTAINER (alignment86), hbox9); | |
2769 | |
2770 vbox34 = gtk_vbox_new (FALSE, 0); | |
2771 gtk_box_pack_start (GTK_BOX (hbox9), vbox34, TRUE, TRUE, 0); | |
2772 | |
2773 checkbutton10 = gtk_check_button_new_with_mnemonic (_("Show popup information for playlist entries")); | |
2774 gtk_box_pack_start (GTK_BOX (vbox34), checkbutton10, TRUE, FALSE, 0); | |
2775 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); | |
2776 | |
2777 filepopup_for_tuple_settings_button = gtk_button_new (); | |
2778 gtk_box_pack_start (GTK_BOX (hbox9), filepopup_for_tuple_settings_button, FALSE, FALSE, 0); | |
2779 GTK_WIDGET_UNSET_FLAGS (filepopup_for_tuple_settings_button, GTK_CAN_FOCUS); | |
2780 gtk_tooltips_set_tip (tooltips, filepopup_for_tuple_settings_button, _("Edit settings for popup information"), NULL); | |
2781 gtk_button_set_relief (GTK_BUTTON (filepopup_for_tuple_settings_button), GTK_RELIEF_HALF); | |
2782 | |
2783 image8 = gtk_image_new_from_stock ("gtk-properties", GTK_ICON_SIZE_BUTTON); | |
2784 gtk_container_add (GTK_CONTAINER (filepopup_for_tuple_settings_button), image8); | |
2785 | |
2786 playlist_label = gtk_label_new (_("Playlist")); | |
2787 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 3), playlist_label); | |
2788 | |
2789 equalizer_page_vbox = gtk_vbox_new (FALSE, 0); | |
2790 gtk_container_add (GTK_CONTAINER (category_notebook), equalizer_page_vbox); | |
2791 | |
2792 alignment28 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2793 gtk_box_pack_start (GTK_BOX (equalizer_page_vbox), alignment28, TRUE, TRUE, 0); | |
2794 | |
2795 vbox22 = gtk_vbox_new (FALSE, 0); | |
2796 gtk_container_add (GTK_CONTAINER (alignment28), vbox22); | |
2797 | |
2798 alignment30 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2799 gtk_box_pack_start (GTK_BOX (vbox22), alignment30, FALSE, FALSE, 0); | |
2800 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment30), 0, 12, 0, 0); | |
2801 | |
2802 equalizer_page_label = gtk_label_new (_("<b>Presets</b>")); | |
2803 gtk_container_add (GTK_CONTAINER (alignment30), equalizer_page_label); | |
2804 gtk_label_set_use_markup (GTK_LABEL (equalizer_page_label), TRUE); | |
2805 gtk_misc_set_alignment (GTK_MISC (equalizer_page_label), 0, 0.5); | |
2806 | |
2807 vbox23 = gtk_vbox_new (FALSE, 0); | |
2808 gtk_box_pack_start (GTK_BOX (vbox22), vbox23, TRUE, TRUE, 0); | |
2809 | |
2810 alignment33 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2811 gtk_box_pack_start (GTK_BOX (vbox23), alignment33, FALSE, FALSE, 0); | |
2812 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment33), 0, 12, 0, 0); | |
2813 | |
2814 table5 = gtk_table_new (2, 2, FALSE); | |
2815 gtk_container_add (GTK_CONTAINER (alignment33), table5); | |
2816 gtk_table_set_row_spacings (GTK_TABLE (table5), 6); | |
2817 gtk_table_set_col_spacings (GTK_TABLE (table5), 6); | |
2818 | |
2819 label58 = gtk_label_new (_("File preset extension:")); | |
2820 gtk_table_attach (GTK_TABLE (table5), label58, 0, 1, 1, 2, | |
2821 (GtkAttachOptions) (0), | |
2822 (GtkAttachOptions) (0), 0, 0); | |
2823 gtk_misc_set_alignment (GTK_MISC (label58), 0, 0.5); | |
2824 | |
2825 label57 = gtk_label_new (_("Directory preset file:")); | |
2826 gtk_table_attach (GTK_TABLE (table5), label57, 0, 1, 0, 1, | |
2827 (GtkAttachOptions) (0), | |
2828 (GtkAttachOptions) (0), 0, 0); | |
2829 gtk_misc_set_alignment (GTK_MISC (label57), 0, 0.5); | |
2830 | |
2831 eq_file_preset_entry = gtk_entry_new (); | |
2832 gtk_table_attach (GTK_TABLE (table5), eq_file_preset_entry, 1, 2, 1, 2, | |
2833 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2834 (GtkAttachOptions) (0), 0, 0); | |
2835 | |
2836 eq_dir_preset_entry = gtk_entry_new (); | |
2837 gtk_table_attach (GTK_TABLE (table5), eq_dir_preset_entry, 1, 2, 0, 1, | |
2838 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2839 (GtkAttachOptions) (0), 0, 0); | |
2840 | |
2841 equalizer_label = gtk_label_new (_("Equalizer")); | |
2842 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 4), equalizer_label); | |
2843 | |
2844 connectivity_page_vbox = gtk_vbox_new (FALSE, 0); | |
2845 gtk_container_add (GTK_CONTAINER (category_notebook), connectivity_page_vbox); | |
2846 | |
2847 vbox29 = gtk_vbox_new (FALSE, 0); | |
2848 gtk_box_pack_start (GTK_BOX (connectivity_page_vbox), vbox29, TRUE, TRUE, 0); | |
2849 | |
2850 alignment63 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2851 gtk_box_pack_start (GTK_BOX (vbox29), alignment63, FALSE, FALSE, 0); | |
2852 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment63), 0, 12, 0, 0); | |
2853 | |
2854 connectivity_page_label = gtk_label_new (_("<b>Proxy Configuration</b>")); | |
2855 gtk_container_add (GTK_CONTAINER (alignment63), connectivity_page_label); | |
2856 gtk_label_set_use_markup (GTK_LABEL (connectivity_page_label), TRUE); | |
2857 gtk_misc_set_alignment (GTK_MISC (connectivity_page_label), 0, 0.5); | |
2858 | |
2859 alignment68 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2860 gtk_box_pack_start (GTK_BOX (vbox29), alignment68, TRUE, TRUE, 0); | |
2861 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment68), 0, 0, 12, 0); | |
2862 | |
2863 vbox30 = gtk_vbox_new (FALSE, 0); | |
2864 gtk_container_add (GTK_CONTAINER (alignment68), vbox30); | |
2865 | |
2866 alignment65 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2867 gtk_box_pack_start (GTK_BOX (vbox30), alignment65, FALSE, FALSE, 0); | |
2868 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment65), 0, 12, 0, 0); | |
2869 | |
2870 proxy_use = gtk_check_button_new_with_mnemonic (_("Enable proxy usage")); | |
2871 gtk_container_add (GTK_CONTAINER (alignment65), proxy_use); | |
2872 | |
2873 table8 = gtk_table_new (2, 2, FALSE); | |
2874 gtk_box_pack_start (GTK_BOX (vbox30), table8, FALSE, FALSE, 0); | |
2875 gtk_table_set_row_spacings (GTK_TABLE (table8), 6); | |
2876 gtk_table_set_col_spacings (GTK_TABLE (table8), 6); | |
2877 | |
2878 proxy_port = gtk_entry_new (); | |
2879 gtk_table_attach (GTK_TABLE (table8), proxy_port, 1, 2, 1, 2, | |
2880 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2881 (GtkAttachOptions) (0), 0, 0); | |
2882 | |
2883 proxy_host = gtk_entry_new (); | |
2884 gtk_table_attach (GTK_TABLE (table8), proxy_host, 1, 2, 0, 1, | |
2885 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2886 (GtkAttachOptions) (0), 0, 0); | |
2887 | |
2888 label69 = gtk_label_new (_("Proxy port:")); | |
2889 gtk_table_attach (GTK_TABLE (table8), label69, 0, 1, 1, 2, | |
2890 (GtkAttachOptions) (0), | |
2891 (GtkAttachOptions) (0), 0, 0); | |
2892 gtk_misc_set_alignment (GTK_MISC (label69), 0, 0.5); | |
2893 | |
2894 label68 = gtk_label_new (_("Proxy hostname:")); | |
2895 gtk_table_attach (GTK_TABLE (table8), label68, 0, 1, 0, 1, | |
2896 (GtkAttachOptions) (0), | |
2897 (GtkAttachOptions) (0), 0, 0); | |
2898 gtk_misc_set_alignment (GTK_MISC (label68), 0, 0); | |
2899 | |
2900 alignment67 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2901 gtk_box_pack_start (GTK_BOX (vbox30), alignment67, FALSE, FALSE, 0); | |
2902 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment67), 12, 12, 0, 0); | |
2903 | |
2904 proxy_auth = gtk_check_button_new_with_mnemonic (_("Use authentication with proxy")); | |
2905 gtk_container_add (GTK_CONTAINER (alignment67), proxy_auth); | |
2906 | |
2907 table9 = gtk_table_new (2, 2, FALSE); | |
2908 gtk_box_pack_start (GTK_BOX (vbox30), table9, FALSE, FALSE, 0); | |
2909 gtk_table_set_row_spacings (GTK_TABLE (table9), 6); | |
2910 gtk_table_set_col_spacings (GTK_TABLE (table9), 6); | |
2911 | |
2912 proxy_pass = gtk_entry_new (); | |
2913 gtk_table_attach (GTK_TABLE (table9), proxy_pass, 1, 2, 1, 2, | |
2914 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2915 (GtkAttachOptions) (0), 0, 0); | |
2916 gtk_entry_set_visibility (GTK_ENTRY (proxy_pass), FALSE); | |
2917 | |
2918 proxy_user = gtk_entry_new (); | |
2919 gtk_table_attach (GTK_TABLE (table9), proxy_user, 1, 2, 0, 1, | |
2920 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
2921 (GtkAttachOptions) (0), 0, 0); | |
2922 | |
2923 label71 = gtk_label_new (_("Proxy password:")); | |
2924 gtk_table_attach (GTK_TABLE (table9), label71, 0, 1, 1, 2, | |
2925 (GtkAttachOptions) (0), | |
2926 (GtkAttachOptions) (0), 0, 0); | |
2927 gtk_misc_set_alignment (GTK_MISC (label71), 0, 0.5); | |
2928 | |
2929 label70 = gtk_label_new (_("Proxy username:")); | |
2930 gtk_table_attach (GTK_TABLE (table9), label70, 0, 1, 0, 1, | |
2931 (GtkAttachOptions) (0), | |
2932 (GtkAttachOptions) (0), 0, 0); | |
2933 gtk_misc_set_alignment (GTK_MISC (label70), 0, 0); | |
2934 | |
2935 alignment72 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2936 gtk_box_pack_start (GTK_BOX (vbox30), alignment72, FALSE, FALSE, 0); | |
2937 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment72), 6, 0, 0, 0); | |
2938 | |
2939 hbox6 = gtk_hbox_new (FALSE, 0); | |
2940 gtk_container_add (GTK_CONTAINER (alignment72), hbox6); | |
2941 | |
2942 image4 = gtk_image_new_from_stock ("gtk-dialog-warning", GTK_ICON_SIZE_BUTTON); | |
2943 gtk_box_pack_start (GTK_BOX (hbox6), image4, FALSE, FALSE, 0); | |
2944 gtk_misc_set_padding (GTK_MISC (image4), 3, 0); | |
2945 | |
2946 label75 = gtk_label_new (_("<span size=\"small\">Changing these settings will require a restart of Audacious.</span>")); | |
2947 gtk_box_pack_start (GTK_BOX (hbox6), label75, FALSE, FALSE, 0); | |
2948 gtk_label_set_use_markup (GTK_LABEL (label75), TRUE); | |
2949 | |
2950 label95 = gtk_label_new (""); | |
2951 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 5), label95); | |
2952 | |
2953 empty_notebook_page = gtk_vbox_new (FALSE, 0); | |
2954 gtk_container_add (GTK_CONTAINER (category_notebook), empty_notebook_page); | |
2955 | |
2956 label96 = gtk_label_new (""); | |
2957 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 6), label96); | |
2958 | |
2959 audio_scrolled_window = gtk_scrolled_window_new (NULL, NULL); | |
2960 gtk_container_add (GTK_CONTAINER (empty_notebook_page), audio_scrolled_window); | |
2961 gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (category_notebook), audio_scrolled_window, | |
2962 TRUE, TRUE, GTK_PACK_START); | |
2963 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (audio_scrolled_window), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); | |
2964 | |
2965 audio_page_viewport = gtk_viewport_new (NULL, NULL); | |
2966 gtk_container_add (GTK_CONTAINER (audio_scrolled_window), audio_page_viewport); | |
2967 gtk_widget_set_events (audio_page_viewport, GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK); | |
2968 gtk_viewport_set_shadow_type (GTK_VIEWPORT (audio_page_viewport), GTK_SHADOW_NONE); | |
2969 | |
2970 audio_page_vbox = gtk_vbox_new (FALSE, 0); | |
2971 gtk_container_add (GTK_CONTAINER (audio_page_viewport), audio_page_vbox); | |
2972 | |
2973 alignment74 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2974 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment74, FALSE, FALSE, 0); | |
2975 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment74), 0, 12, 0, 0); | |
2976 | |
2977 label77 = gtk_label_new (_("<b>Audio System</b>")); | |
2978 gtk_container_add (GTK_CONTAINER (alignment74), label77); | |
2979 gtk_label_set_use_markup (GTK_LABEL (label77), TRUE); | |
2980 gtk_misc_set_alignment (GTK_MISC (label77), 0, 0.5); | |
2981 | |
2982 alignment73 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
2983 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment73, FALSE, FALSE, 0); | |
2984 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment73), 0, 6, 12, 0); | |
2985 | |
2986 vbox33 = gtk_vbox_new (FALSE, 0); | |
2987 gtk_container_add (GTK_CONTAINER (alignment73), vbox33); | |
2988 | |
2989 table11 = gtk_table_new (3, 2, FALSE); | |
2990 gtk_box_pack_start (GTK_BOX (vbox33), table11, FALSE, FALSE, 0); | |
2991 gtk_table_set_row_spacings (GTK_TABLE (table11), 6); | |
2992 gtk_table_set_col_spacings (GTK_TABLE (table11), 6); | |
2993 | |
2994 image7 = gtk_image_new_from_stock ("gtk-info", GTK_ICON_SIZE_BUTTON); | |
2995 gtk_table_attach (GTK_TABLE (table11), image7, 0, 1, 2, 3, | |
2996 (GtkAttachOptions) (0), | |
2997 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); | |
2998 gtk_misc_set_alignment (GTK_MISC (image7), 1, 0); | |
2999 | |
3000 label79 = gtk_label_new (_("Buffer size:")); | |
3001 gtk_table_attach (GTK_TABLE (table11), label79, 0, 1, 1, 2, | |
3002 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
3003 (GtkAttachOptions) (0), 0, 0); | |
3004 gtk_misc_set_alignment (GTK_MISC (label79), 1, 0.5); | |
3005 | |
3006 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>")); | |
3007 gtk_table_attach (GTK_TABLE (table11), label82, 1, 2, 2, 3, | |
3008 (GtkAttachOptions) (0), | |
3009 (GtkAttachOptions) (0), 0, 0); | |
3010 gtk_label_set_use_markup (GTK_LABEL (label82), TRUE); | |
3011 gtk_label_set_line_wrap (GTK_LABEL (label82), TRUE); | |
3012 gtk_misc_set_alignment (GTK_MISC (label82), 0, 0.5); | |
3013 | |
3014 output_plugin_bufsize_adj = gtk_adjustment_new (0, 0, 600000, 100, 1000, 1000); | |
3015 output_plugin_bufsize = gtk_spin_button_new (GTK_ADJUSTMENT (output_plugin_bufsize_adj), 1, 0); | |
3016 gtk_table_attach (GTK_TABLE (table11), output_plugin_bufsize, 1, 2, 1, 2, | |
3017 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
3018 (GtkAttachOptions) (0), 0, 0); | |
3019 | |
3020 output_plugin_cbox = gtk_combo_box_new_text (); | |
3021 gtk_table_attach (GTK_TABLE (table11), output_plugin_cbox, 1, 2, 0, 1, | |
3022 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
3023 (GtkAttachOptions) (0), 0, 0); | |
3024 | |
3025 label78 = gtk_label_new (_("Current output plugin:")); | |
3026 gtk_table_attach (GTK_TABLE (table11), label78, 0, 1, 0, 1, | |
3027 (GtkAttachOptions) (0), | |
3028 (GtkAttachOptions) (0), 0, 0); | |
3029 gtk_misc_set_alignment (GTK_MISC (label78), 0, 0.5); | |
3030 | |
3031 alignment82 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3032 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment82, FALSE, FALSE, 0); | |
3033 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment82), 0, 0, 12, 0); | |
3034 | |
3035 output_plugin_button_box = gtk_hbutton_box_new (); | |
3036 gtk_container_add (GTK_CONTAINER (alignment82), output_plugin_button_box); | |
3037 gtk_button_box_set_layout (GTK_BUTTON_BOX (output_plugin_button_box), GTK_BUTTONBOX_START); | |
3038 gtk_box_set_spacing (GTK_BOX (output_plugin_button_box), 8); | |
3039 | |
3040 output_plugin_prefs = gtk_button_new (); | |
3041 gtk_container_add (GTK_CONTAINER (output_plugin_button_box), output_plugin_prefs); | |
3042 gtk_widget_set_sensitive (output_plugin_prefs, FALSE); | |
3043 GTK_WIDGET_SET_FLAGS (output_plugin_prefs, GTK_CAN_DEFAULT); | |
3044 | |
3045 alignment76 = gtk_alignment_new (0.5, 0.5, 0, 0); | |
3046 gtk_container_add (GTK_CONTAINER (output_plugin_prefs), alignment76); | |
3047 | |
3048 hbox7 = gtk_hbox_new (FALSE, 2); | |
3049 gtk_container_add (GTK_CONTAINER (alignment76), hbox7); | |
3050 | |
3051 image5 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_BUTTON); | |
3052 gtk_box_pack_start (GTK_BOX (hbox7), image5, FALSE, FALSE, 0); | |
3053 | |
3054 label80 = gtk_label_new_with_mnemonic (_("Output Plugin Preferences")); | |
3055 gtk_box_pack_start (GTK_BOX (hbox7), label80, FALSE, FALSE, 0); | |
3056 | |
3057 output_plugin_info = gtk_button_new (); | |
3058 gtk_container_add (GTK_CONTAINER (output_plugin_button_box), output_plugin_info); | |
3059 gtk_widget_set_sensitive (output_plugin_info, FALSE); | |
3060 GTK_WIDGET_SET_FLAGS (output_plugin_info, GTK_CAN_DEFAULT); | |
3061 | |
3062 alignment77 = gtk_alignment_new (0.5, 0.5, 0, 0); | |
3063 gtk_container_add (GTK_CONTAINER (output_plugin_info), alignment77); | |
3064 | |
3065 hbox8 = gtk_hbox_new (FALSE, 2); | |
3066 gtk_container_add (GTK_CONTAINER (alignment77), hbox8); | |
3067 | |
3068 image6 = gtk_image_new_from_stock ("gtk-about", GTK_ICON_SIZE_BUTTON); | |
3069 gtk_box_pack_start (GTK_BOX (hbox8), image6, FALSE, FALSE, 0); | |
3070 | |
3071 label81 = gtk_label_new_with_mnemonic (_("Output Plugin Information")); | |
3072 gtk_box_pack_start (GTK_BOX (hbox8), label81, FALSE, FALSE, 0); | |
3073 | |
3074 alignment78 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3075 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment78, FALSE, FALSE, 0); | |
3076 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment78), 12, 12, 0, 0); | |
3077 | |
3078 label83 = gtk_label_new (_("<b>Format Detection</b>")); | |
3079 gtk_container_add (GTK_CONTAINER (alignment78), label83); | |
3080 gtk_label_set_use_markup (GTK_LABEL (label83), TRUE); | |
3081 gtk_misc_set_alignment (GTK_MISC (label83), 0, 0.5); | |
3082 | |
3083 alignment84 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3084 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment84, FALSE, FALSE, 0); | |
3085 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment84), 0, 0, 12, 0); | |
3086 | |
3087 audio_format_det_cb = gtk_check_button_new_with_mnemonic (_("Detect file formats on demand, instead of immediately.")); | |
3088 gtk_container_add (GTK_CONTAINER (alignment84), audio_format_det_cb); | |
3089 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); | |
3090 | |
3091 alignment89 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3092 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment89, FALSE, FALSE, 0); | |
3093 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment89), 0, 0, 12, 0); | |
3094 | |
3095 detect_by_extension_cb = gtk_check_button_new_with_mnemonic (_("Detect file formats by extension.")); | |
3096 gtk_container_add (GTK_CONTAINER (alignment89), detect_by_extension_cb); | |
3097 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); | |
3098 | |
3099 alignment19 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3100 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment19, FALSE, FALSE, 0); | |
3101 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment19), 12, 12, 0, 0); | |
3102 | |
3103 label40 = gtk_label_new (_("<b>Playback</b>")); | |
3104 gtk_container_add (GTK_CONTAINER (alignment19), label40); | |
3105 gtk_label_set_use_markup (GTK_LABEL (label40), TRUE); | |
3106 gtk_misc_set_alignment (GTK_MISC (label40), 0, 0.5); | |
3107 | |
3108 alignment83 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3109 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment83, FALSE, FALSE, 0); | |
3110 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment83), 0, 0, 12, 0); | |
3111 | |
3112 continue_playback_on_startup = gtk_check_button_new_with_mnemonic (_("Continue playback on startup")); | |
3113 gtk_container_add (GTK_CONTAINER (alignment83), continue_playback_on_startup); | |
3114 gtk_tooltips_set_tip (tooltips, continue_playback_on_startup, _("When Audacious starts, automatically begin playing from the point where we stopped before."), NULL); | |
3115 | |
3116 alignment79 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3117 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment79, FALSE, FALSE, 0); | |
3118 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment79), 0, 0, 12, 0); | |
3119 | |
3120 playlist_no_advance = gtk_check_button_new_with_mnemonic (_("Don't advance in the playlist")); | |
3121 gtk_container_add (GTK_CONTAINER (alignment79), playlist_no_advance); | |
3122 gtk_tooltips_set_tip (tooltips, playlist_no_advance, _("When finished playing a song, don't automatically advance to the next."), NULL); | |
3123 | |
3124 alignment80 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3125 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment80, FALSE, FALSE, 0); | |
3126 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment80), 0, 0, 12, 0); | |
3127 | |
3128 pause_between_songs = gtk_check_button_new_with_mnemonic (_("Pause between songs")); | |
3129 gtk_container_add (GTK_CONTAINER (alignment80), pause_between_songs); | |
3130 | |
3131 alignment22 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3132 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment22, FALSE, FALSE, 0); | |
3133 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment22), 0, 0, 45, 0); | |
3134 | |
3135 pause_between_songs_box = gtk_hbox_new (FALSE, 0); | |
3136 gtk_container_add (GTK_CONTAINER (alignment22), pause_between_songs_box); | |
3137 | |
3138 label41 = gtk_label_new (_("Pause for")); | |
3139 gtk_box_pack_start (GTK_BOX (pause_between_songs_box), label41, FALSE, FALSE, 0); | |
3140 gtk_misc_set_padding (GTK_MISC (label41), 4, 0); | |
3141 | |
3142 pause_between_songs_time_adj = gtk_adjustment_new (2, 0, 100, 1, 10, 10); | |
3143 pause_between_songs_time = gtk_spin_button_new (GTK_ADJUSTMENT (pause_between_songs_time_adj), 1, 0); | |
3144 gtk_box_pack_start (GTK_BOX (pause_between_songs_box), pause_between_songs_time, FALSE, FALSE, 0); | |
3145 | |
3146 label42 = gtk_label_new (_("seconds")); | |
3147 gtk_box_pack_start (GTK_BOX (pause_between_songs_box), label42, FALSE, FALSE, 0); | |
3148 gtk_misc_set_padding (GTK_MISC (label42), 4, 0); | |
3149 | |
3150 alignment90 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3151 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment90, FALSE, FALSE, 0); | |
3152 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment90), 12, 12, 0, 0); | |
3153 | |
3154 label93 = gtk_label_new (_("<b>Sampling Rate Converter</b>")); | |
3155 gtk_container_add (GTK_CONTAINER (alignment90), label93); | |
3156 gtk_label_set_use_markup (GTK_LABEL (label93), TRUE); | |
3157 gtk_misc_set_alignment (GTK_MISC (label93), 0, 0.5); | |
3158 | |
3159 alignment92 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3160 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment92, FALSE, FALSE, 0); | |
3161 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment92), 0, 0, 12, 0); | |
3162 | |
3163 enable_src = gtk_check_button_new_with_mnemonic (_("Enable Sampling Rate Converter")); | |
3164 gtk_container_add (GTK_CONTAINER (alignment92), enable_src); | |
3165 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enable_src), TRUE); | |
3166 | |
3167 alignment91 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3168 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment91, FALSE, FALSE, 0); | |
3169 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment91), 0, 6, 12, 0); | |
3170 | |
3171 vbox36 = gtk_vbox_new (FALSE, 0); | |
3172 gtk_container_add (GTK_CONTAINER (alignment91), vbox36); | |
3173 | |
3174 table13 = gtk_table_new (3, 2, FALSE); | |
3175 gtk_box_pack_start (GTK_BOX (vbox36), table13, FALSE, FALSE, 0); | |
3176 gtk_table_set_row_spacings (GTK_TABLE (table13), 6); | |
3177 gtk_table_set_col_spacings (GTK_TABLE (table13), 6); | |
3178 | |
3179 src_converter_type = gtk_combo_box_new_text (); | |
3180 gtk_table_attach (GTK_TABLE (table13), src_converter_type, 1, 2, 1, 2, | |
3181 (GtkAttachOptions) (0), | |
3182 (GtkAttachOptions) (0), 0, 0); | |
3183 gtk_combo_box_append_text (GTK_COMBO_BOX (src_converter_type), _("Best Sinc Interpolation")); | |
3184 gtk_combo_box_append_text (GTK_COMBO_BOX (src_converter_type), _("Medium Sinc Interpolation")); | |
3185 gtk_combo_box_append_text (GTK_COMBO_BOX (src_converter_type), _("Fastest Sinc Interpolation")); | |
3186 gtk_combo_box_append_text (GTK_COMBO_BOX (src_converter_type), _("ZOH Interpolation")); | |
3187 gtk_combo_box_append_text (GTK_COMBO_BOX (src_converter_type), _("Linear Interpolation")); | |
3188 | |
3189 label94 = gtk_label_new (_("Interpolation Engine:")); | |
3190 gtk_table_attach (GTK_TABLE (table13), label94, 0, 1, 1, 2, | |
3191 (GtkAttachOptions) (0), | |
3192 (GtkAttachOptions) (0), 0, 0); | |
3193 gtk_misc_set_alignment (GTK_MISC (label94), 0, 0.5); | |
3194 | |
3195 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>")); | |
3196 gtk_table_attach (GTK_TABLE (table13), label92, 1, 2, 2, 3, | |
3197 (GtkAttachOptions) (0), | |
3198 (GtkAttachOptions) (0), 0, 0); | |
3199 gtk_label_set_use_markup (GTK_LABEL (label92), TRUE); | |
3200 gtk_label_set_line_wrap (GTK_LABEL (label92), TRUE); | |
3201 gtk_misc_set_alignment (GTK_MISC (label92), 0, 0.5); | |
3202 | |
3203 image9 = gtk_image_new_from_stock ("gtk-info", GTK_ICON_SIZE_BUTTON); | |
3204 gtk_table_attach (GTK_TABLE (table13), image9, 0, 1, 2, 3, | |
3205 (GtkAttachOptions) (0), | |
3206 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); | |
3207 gtk_misc_set_alignment (GTK_MISC (image9), 1, 0); | |
3208 | |
3209 src_rate_adj = gtk_adjustment_new (96000, 1000, 768000, 1000, 1000, 1000); | |
3210 src_rate = gtk_spin_button_new (GTK_ADJUSTMENT (src_rate_adj), 1, 0); | |
3211 gtk_table_attach (GTK_TABLE (table13), src_rate, 1, 2, 0, 1, | |
3212 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
3213 (GtkAttachOptions) (0), 0, 0); | |
3214 | |
3215 label91 = gtk_label_new (_("Sampling Rate [Hz]:")); | |
3216 gtk_table_attach (GTK_TABLE (table13), label91, 0, 1, 0, 1, | |
3217 (GtkAttachOptions) (0), | |
3218 (GtkAttachOptions) (0), 0, 0); | |
3219 gtk_misc_set_alignment (GTK_MISC (label91), 0, 0.5); | |
3220 | |
3221 alignment4 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3222 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment4, FALSE, FALSE, 0); | |
3223 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment4), 12, 12, 0, 0); | |
3224 | |
3225 label2 = gtk_label_new (_("<b>Volume Control</b>")); | |
3226 gtk_container_add (GTK_CONTAINER (alignment4), label2); | |
3227 gtk_label_set_use_markup (GTK_LABEL (label2), TRUE); | |
3228 gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5); | |
3229 | |
3230 alignment7 = gtk_alignment_new (0.5, 0.5, 1, 1); | |
3231 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment7, FALSE, FALSE, 0); | |
3232 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment7), 0, 0, 12, 0); | |
3233 | |
3234 software_volume_control = gtk_check_button_new_with_mnemonic (_("Use software volume control")); | |
3235 gtk_container_add (GTK_CONTAINER (alignment7), software_volume_control); | |
3236 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); | |
3237 | |
3238 empty_notebook_page = gtk_vbox_new (FALSE, 0); | |
3239 gtk_container_add (GTK_CONTAINER (category_notebook), empty_notebook_page); | |
3240 | |
3241 hseparator1 = gtk_hseparator_new (); | |
3242 gtk_box_pack_start (GTK_BOX (vbox), hseparator1, FALSE, FALSE, 6); | |
3243 | |
3244 hbox4 = gtk_hbox_new (FALSE, 0); | |
3245 gtk_box_pack_start (GTK_BOX (vbox), hbox4, FALSE, FALSE, 0); | |
3246 | |
3247 audversionlabel = gtk_label_new (""); | |
3248 gtk_box_pack_start (GTK_BOX (hbox4), audversionlabel, FALSE, FALSE, 0); | |
3249 gtk_label_set_use_markup (GTK_LABEL (audversionlabel), TRUE); | |
3250 | |
3251 prefswin_button_box = gtk_hbutton_box_new (); | |
3252 gtk_box_pack_start (GTK_BOX (hbox4), prefswin_button_box, TRUE, TRUE, 0); | |
3253 gtk_button_box_set_layout (GTK_BUTTON_BOX (prefswin_button_box), GTK_BUTTONBOX_END); | |
3254 gtk_box_set_spacing (GTK_BOX (prefswin_button_box), 6); | |
3255 | |
3256 reload_plugins = gtk_button_new (); | |
3257 gtk_container_add (GTK_CONTAINER (prefswin_button_box), reload_plugins); | |
3258 GTK_WIDGET_SET_FLAGS (reload_plugins, GTK_CAN_DEFAULT); | |
3259 | |
3260 alignment93 = gtk_alignment_new (0.5, 0.5, 0, 0); | |
3261 gtk_container_add (GTK_CONTAINER (reload_plugins), alignment93); | |
3262 | |
3263 hbox11 = gtk_hbox_new (FALSE, 2); | |
3264 gtk_container_add (GTK_CONTAINER (alignment93), hbox11); | |
3265 | |
3266 image10 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON); | |
3267 gtk_box_pack_start (GTK_BOX (hbox11), image10, FALSE, FALSE, 0); | |
3268 | |
3269 label102 = gtk_label_new_with_mnemonic (_("Reload Plugins")); | |
3270 gtk_box_pack_start (GTK_BOX (hbox11), label102, FALSE, FALSE, 0); | |
3271 | |
3272 close = gtk_button_new_from_stock ("gtk-close"); | |
3273 gtk_container_add (GTK_CONTAINER (prefswin_button_box), close); | |
3274 GTK_WIDGET_SET_FLAGS (close, GTK_CAN_DEFAULT); | |
3275 gtk_widget_add_accelerator (close, "clicked", accel_group, | |
3276 GDK_Escape, (GdkModifierType) 0, | |
3277 GTK_ACCEL_VISIBLE); | |
3278 | |
3279 | |
3280 gtk_label_set_mnemonic_widget (GTK_LABEL (input_plugin_list_label), category_notebook); | |
3281 gtk_label_set_mnemonic_widget (GTK_LABEL (label11), category_notebook); | |
3282 gtk_label_set_mnemonic_widget (GTK_LABEL (label53), category_notebook); | |
3283 gtk_label_set_mnemonic_widget (GTK_LABEL (label64), category_notebook); | |
3284 gtk_label_set_mnemonic_widget (GTK_LABEL (label103), category_notebook); | |
3285 gtk_label_set_mnemonic_widget (GTK_LABEL (label104), category_notebook); | |
3286 gtk_label_set_mnemonic_widget (GTK_LABEL (label105), fontbutton1); | |
3287 gtk_label_set_mnemonic_widget (GTK_LABEL (label106), fontbutton2); | |
3288 gtk_label_set_mnemonic_widget (GTK_LABEL (label107), category_notebook); | |
3289 | |
3290 gtk_window_add_accel_group (GTK_WINDOW (prefswin), accel_group); | |
3291 | |
3292 /* connect signals */ | |
3293 g_signal_connect(G_OBJECT(prefswin), "delete_event", | |
3294 G_CALLBACK(gtk_widget_hide_on_delete), | |
3295 NULL); | |
3296 g_signal_connect_after(G_OBJECT(input_plugin_view), "realize", | |
3297 G_CALLBACK(on_input_plugin_view_realize), | |
3298 NULL); | |
3299 g_signal_connect_after(G_OBJECT(general_plugin_view), "realize", | |
3300 G_CALLBACK(on_general_plugin_view_realize), | |
3301 NULL); | |
3302 g_signal_connect_after(G_OBJECT(vis_plugin_view), "realize", | |
3303 G_CALLBACK(on_vis_plugin_view_realize), | |
3304 NULL); | |
3305 g_signal_connect_after(G_OBJECT(effect_plugin_view), "realize", | |
3306 G_CALLBACK(on_effect_plugin_view_realize), | |
3307 NULL); | |
3308 g_signal_connect(G_OBJECT(colorspace_button), "clicked", | |
3309 G_CALLBACK(on_colorize_button_clicked), | |
3310 NULL); | |
3311 g_signal_connect_swapped(G_OBJECT(skin_refresh_button), "clicked", | |
3312 G_CALLBACK(on_skin_refresh_button_clicked), | |
3313 prefswin); | |
3314 g_signal_connect_after(G_OBJECT(skin_view), "realize", | |
3315 G_CALLBACK(on_skin_view_realize), | |
3316 NULL); | |
3317 g_signal_connect_after(G_OBJECT(fontbutton1), "realize", | |
3318 G_CALLBACK(on_mainwin_font_button_realize), | |
3319 NULL); | |
3320 g_signal_connect(G_OBJECT(fontbutton1), "font_set", | |
3321 G_CALLBACK(on_mainwin_font_button_font_set), | |
3322 NULL); | |
3323 g_signal_connect_after(G_OBJECT(fontbutton2), "realize", | |
3324 G_CALLBACK(on_playlist_font_button_realize), | |
3325 NULL); | |
3326 g_signal_connect(G_OBJECT(fontbutton2), "font_set", | |
3327 G_CALLBACK(on_playlist_font_button_font_set), | |
3328 NULL); | |
3329 g_signal_connect(G_OBJECT(checkbutton11), "toggled", | |
3330 G_CALLBACK(on_use_bitmap_fonts_toggled), | |
3331 NULL); | |
3332 g_signal_connect_after(G_OBJECT(checkbutton11), "realize", | |
3333 G_CALLBACK(on_use_bitmap_fonts_realize), | |
3334 NULL); | |
3335 g_signal_connect(G_OBJECT(playlist_show_pl_numbers), "toggled", | |
3336 G_CALLBACK(on_playlist_show_pl_numbers_toggled), | |
3337 NULL); | |
3338 g_signal_connect_after(G_OBJECT(playlist_show_pl_numbers), "realize", | |
3339 G_CALLBACK(on_playlist_show_pl_numbers_realize), | |
3340 NULL); | |
3341 g_signal_connect(G_OBJECT(playlist_show_pl_separator), "toggled", | |
3342 G_CALLBACK(on_playlist_show_pl_separator_toggled), | |
3343 NULL); | |
3344 g_signal_connect_after(G_OBJECT(playlist_show_pl_separator), "realize", | |
3345 G_CALLBACK(on_playlist_show_pl_separator_realize), | |
3346 NULL); | |
3347 g_signal_connect(G_OBJECT(checkbutton14), "toggled", | |
3348 G_CALLBACK(on_custom_cursors_toggled), | |
3349 NULL); | |
3350 g_signal_connect_after(G_OBJECT(checkbutton14), "realize", | |
3351 G_CALLBACK(on_custom_cursors_realize), | |
3352 NULL); | |
3353 g_signal_connect(G_OBJECT(show_wm_decorations), "toggled", | |
3354 G_CALLBACK(on_show_wm_decorations_toggled), | |
3355 NULL); | |
3356 g_signal_connect(G_OBJECT(show_wm_decorations), "realize", | |
3357 G_CALLBACK(on_show_wm_decorations_realize), | |
3358 NULL); | |
3359 g_signal_connect(G_OBJECT(xmms_style_fileselector_cb1), "toggled", | |
3360 G_CALLBACK(on_xmms_style_fileselector_toggled), | |
3361 NULL); | |
3362 g_signal_connect(G_OBJECT(xmms_style_fileselector_cb1), "realize", | |
3363 G_CALLBACK(on_xmms_style_fileselector_realize), | |
3364 NULL); | |
3365 g_signal_connect(G_OBJECT(checkbutton17), "toggled", | |
3366 G_CALLBACK(on_twoway_scroller_toggled), | |
3367 NULL); | |
3368 g_signal_connect(G_OBJECT(checkbutton17), "realize", | |
3369 G_CALLBACK(on_twoway_scroller_realize), | |
3370 NULL); | |
3371 g_signal_connect(G_OBJECT(mouse_wheel_volume), "value_changed", | |
3372 G_CALLBACK(on_mouse_wheel_volume_changed), | |
3373 NULL); | |
3374 g_signal_connect_after(G_OBJECT(mouse_wheel_volume), "realize", | |
3375 G_CALLBACK(on_mouse_wheel_volume_realize), | |
3376 NULL); | |
3377 g_signal_connect(G_OBJECT(mouse_wheel_scroll_pl), "value_changed", | |
3378 G_CALLBACK(on_mouse_wheel_scroll_pl_changed), | |
3379 NULL); | |
3380 g_signal_connect_after(G_OBJECT(mouse_wheel_scroll_pl), "realize", | |
3381 G_CALLBACK(on_mouse_wheel_scroll_pl_realize), | |
3382 NULL); | |
3383 g_signal_connect(G_OBJECT(playlist_convert_underscore), "toggled", | |
3384 G_CALLBACK(on_playlist_convert_underscore_toggled), | |
3385 NULL); | |
3386 g_signal_connect_after(G_OBJECT(playlist_convert_underscore), "realize", | |
3387 G_CALLBACK(on_playlist_convert_underscore_realize), | |
3388 NULL); | |
3389 g_signal_connect(G_OBJECT(playlist_convert_twenty), "toggled", | |
3390 G_CALLBACK(on_playlist_convert_twenty_toggled), | |
3391 NULL); | |
3392 g_signal_connect_after(G_OBJECT(playlist_convert_twenty), "realize", | |
3393 G_CALLBACK(on_playlist_convert_twenty_realize), | |
3394 NULL); | |
3395 g_signal_connect(G_OBJECT(playlist_convert_slash), "toggled", | |
3396 G_CALLBACK(on_playlist_convert_slash_toggled), | |
3397 NULL); | |
3398 g_signal_connect_after(G_OBJECT(playlist_convert_slash), "realize", | |
3399 G_CALLBACK(on_playlist_convert_slash_realize), | |
3400 NULL); | |
3401 g_signal_connect(G_OBJECT(playlist_metadata_on_load), "toggled", | |
3402 G_CALLBACK(on_pl_metadata_on_load_toggled), | |
3403 NULL); | |
3404 g_signal_connect_after(G_OBJECT(playlist_metadata_on_load), "realize", | |
3405 G_CALLBACK(on_pl_metadata_on_load_realize), | |
3406 NULL); | |
3407 g_signal_connect(G_OBJECT(playlist_metadata_on_display), "toggled", | |
3408 G_CALLBACK(on_pl_metadata_on_display_toggled), | |
3409 NULL); | |
3410 g_signal_connect_after(G_OBJECT(playlist_metadata_on_display), "realize", | |
3411 G_CALLBACK(on_pl_metadata_on_display_realize), | |
3412 NULL); | |
3413 g_signal_connect_after(G_OBJECT(combobox1), "realize", | |
3414 G_CALLBACK(on_chardet_detector_cbox_realize), | |
3415 NULL); | |
3416 g_signal_connect(G_OBJECT(entry1), "changed", | |
3417 G_CALLBACK(on_chardet_fallback_changed), | |
3418 NULL); | |
3419 g_signal_connect_after(G_OBJECT(entry1), "realize", | |
3420 G_CALLBACK(on_chardet_fallback_realize), | |
3421 NULL); | |
3422 g_signal_connect(G_OBJECT(refresh_file_list), "toggled", | |
3423 G_CALLBACK(on_refresh_file_list_toggled), | |
3424 NULL); | |
3425 g_signal_connect_after(G_OBJECT(refresh_file_list), "realize", | |
3426 G_CALLBACK(on_refresh_file_list_realize), | |
3427 NULL); | |
3428 g_signal_connect(G_OBJECT(titlestring_entry), "changed", | |
3429 G_CALLBACK(on_titlestring_entry_changed), | |
3430 NULL); | |
3431 g_signal_connect_after(G_OBJECT(titlestring_entry), "realize", | |
3432 G_CALLBACK(on_titlestring_entry_realize), | |
3433 NULL); | |
3434 g_signal_connect(G_OBJECT(checkbutton10), "toggled", | |
3435 G_CALLBACK(on_show_filepopup_for_tuple_toggled), | |
3436 NULL); | |
3437 g_signal_connect_after(G_OBJECT(checkbutton10), "realize", | |
3438 G_CALLBACK(on_show_filepopup_for_tuple_realize), | |
3439 NULL); | |
3440 g_signal_connect(G_OBJECT(filepopup_for_tuple_settings_button), "clicked", | |
3441 G_CALLBACK(on_filepopup_for_tuple_settings_clicked), | |
3442 NULL); | |
3443 g_signal_connect(G_OBJECT(eq_file_preset_entry), "changed", | |
3444 G_CALLBACK(on_eq_file_preset_entry_changed), | |
3445 NULL); | |
3446 g_signal_connect(G_OBJECT(eq_file_preset_entry), "realize", | |
3447 G_CALLBACK(on_eq_file_preset_entry_realize), | |
3448 NULL); | |
3449 g_signal_connect(G_OBJECT(eq_dir_preset_entry), "changed", | |
3450 G_CALLBACK(on_eq_dir_preset_entry_changed), | |
3451 NULL); | |
3452 g_signal_connect(G_OBJECT(eq_dir_preset_entry), "realize", | |
3453 G_CALLBACK(on_eq_dir_preset_entry_realize), | |
3454 NULL); | |
3455 g_signal_connect(G_OBJECT(proxy_use), "toggled", | |
3456 G_CALLBACK(on_proxy_use_toggled), | |
3457 NULL); | |
3458 g_signal_connect(G_OBJECT(proxy_use), "realize", | |
3459 G_CALLBACK(on_proxy_use_realize), | |
3460 NULL); | |
3461 g_signal_connect(G_OBJECT(proxy_port), "changed", | |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3462 G_CALLBACK(on_proxy_entry_changed), |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3463 "proxy_port"); |
3993 | 3464 g_signal_connect(G_OBJECT(proxy_port), "realize", |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3465 G_CALLBACK(on_proxy_entry_realize), |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3466 "proxy_port"); |
3993 | 3467 g_signal_connect(G_OBJECT(proxy_host), "changed", |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3468 G_CALLBACK(on_proxy_entry_changed), |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3469 "proxy_host"); |
3993 | 3470 g_signal_connect(G_OBJECT(proxy_host), "realize", |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3471 G_CALLBACK(on_proxy_entry_realize), |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3472 "proxy_host"); |
3993 | 3473 g_signal_connect(G_OBJECT(proxy_auth), "toggled", |
3474 G_CALLBACK(on_proxy_auth_toggled), | |
3475 NULL); | |
3476 g_signal_connect(G_OBJECT(proxy_auth), "realize", | |
3477 G_CALLBACK(on_proxy_auth_realize), | |
3478 NULL); | |
3479 g_signal_connect(G_OBJECT(proxy_pass), "changed", | |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3480 G_CALLBACK(on_proxy_entry_changed), |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3481 "proxy_pass"); |
3993 | 3482 g_signal_connect(G_OBJECT(proxy_pass), "realize", |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3483 G_CALLBACK(on_proxy_entry_realize), |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3484 "proxy_pass"); |
3993 | 3485 g_signal_connect(G_OBJECT(proxy_user), "changed", |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3486 G_CALLBACK(on_proxy_entry_changed), |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3487 "proxy_user"); |
3993 | 3488 g_signal_connect(G_OBJECT(proxy_user), "realize", |
3999
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3489 G_CALLBACK(on_proxy_entry_realize), |
fa3d61ea0a6e
remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents:
3995
diff
changeset
|
3490 "proxy_user"); |
3993 | 3491 g_signal_connect(G_OBJECT(output_plugin_bufsize), "value_changed", |
3492 G_CALLBACK(on_output_plugin_bufsize_value_changed), | |
3493 NULL); | |
3494 g_signal_connect_after(G_OBJECT(output_plugin_bufsize), "realize", | |
3495 G_CALLBACK(on_output_plugin_bufsize_realize), | |
3496 NULL); | |
3497 g_signal_connect_after(G_OBJECT(output_plugin_cbox), "realize", | |
3498 G_CALLBACK(on_output_plugin_cbox_realize), | |
3499 NULL); | |
3500 g_signal_connect(G_OBJECT(audio_format_det_cb), "toggled", | |
3501 G_CALLBACK(on_audio_format_det_cb_toggled), | |
3502 NULL); | |
3503 g_signal_connect(G_OBJECT(audio_format_det_cb), "realize", | |
3504 G_CALLBACK(on_audio_format_det_cb_realize), | |
3505 NULL); | |
3506 g_signal_connect(G_OBJECT(detect_by_extension_cb), "toggled", | |
3507 G_CALLBACK(on_detect_by_extension_cb_toggled), | |
3508 NULL); | |
3509 g_signal_connect(G_OBJECT(detect_by_extension_cb), "realize", | |
3510 G_CALLBACK(on_detect_by_extension_cb_realize), | |
3511 NULL); | |
3512 g_signal_connect(G_OBJECT(continue_playback_on_startup), "toggled", | |
3513 G_CALLBACK(on_continue_playback_on_startup_toggled), | |
3514 NULL); | |
3515 g_signal_connect(G_OBJECT(continue_playback_on_startup), "realize", | |
3516 G_CALLBACK(on_continue_playback_on_startup_realize), | |
3517 NULL); | |
3518 g_signal_connect(G_OBJECT(playlist_no_advance), "toggled", | |
3519 G_CALLBACK(on_playlist_no_advance_toggled), | |
3520 NULL); | |
3521 g_signal_connect_after(G_OBJECT(playlist_no_advance), "realize", | |
3522 G_CALLBACK(on_playlist_no_advance_realize), | |
3523 NULL); | |
3524 g_signal_connect(G_OBJECT(pause_between_songs_time), "value_changed", | |
3525 G_CALLBACK(on_pause_between_songs_time_changed), | |
3526 NULL); | |
3527 g_signal_connect_after(G_OBJECT(pause_between_songs_time), "realize", | |
3528 G_CALLBACK(on_pause_between_songs_time_realize), | |
3529 NULL); | |
3530 g_signal_connect(G_OBJECT(enable_src), "toggled", | |
3531 G_CALLBACK(on_enable_src_toggled), | |
3532 NULL); | |
3533 g_signal_connect(G_OBJECT(enable_src), "realize", | |
3534 G_CALLBACK(on_enable_src_realize), | |
3535 NULL); | |
3536 g_signal_connect(G_OBJECT(src_converter_type), "changed", | |
3537 G_CALLBACK(on_src_converter_type_changed), | |
3538 NULL); | |
3539 g_signal_connect_after(G_OBJECT(src_converter_type), "realize", | |
3540 G_CALLBACK(on_src_converter_type_realize), | |
3541 NULL); | |
3542 g_signal_connect(G_OBJECT(src_rate), "value_changed", | |
3543 G_CALLBACK(on_src_rate_value_changed), | |
3544 NULL); | |
3545 g_signal_connect(G_OBJECT(src_rate), "realize", | |
3546 G_CALLBACK(on_src_rate_realize), | |
3547 NULL); | |
3548 g_signal_connect(G_OBJECT(software_volume_control), "toggled", | |
3549 G_CALLBACK(on_software_volume_control_toggled), | |
3550 NULL); | |
3551 g_signal_connect(G_OBJECT(software_volume_control), "realize", | |
3552 G_CALLBACK(on_software_volume_control_realize), | |
3553 NULL); | |
3554 g_signal_connect(G_OBJECT(reload_plugins), "clicked", | |
3555 G_CALLBACK(on_reload_plugins_clicked), | |
3556 NULL); | |
3557 g_signal_connect_swapped(G_OBJECT(close), "clicked", | |
3558 G_CALLBACK(gtk_widget_hide), | |
3559 GTK_OBJECT (prefswin)); | |
2313 | 3560 |
3561 /* create category view */ | |
3993 | 3562 g_signal_connect_after(G_OBJECT(category_treeview), "realize", |
3563 G_CALLBACK(on_category_treeview_realize), | |
3564 category_notebook); | |
2313 | 3565 |
3566 /* plugin->input page */ | |
3993 | 3567 g_object_set_data(G_OBJECT(input_plugin_view), "plugin_type" , GINT_TO_POINTER(PLUGIN_VIEW_TYPE_INPUT)); |
3568 g_signal_connect(G_OBJECT(input_plugin_view), "row-activated", | |
3356 | 3569 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
|
3570 NULL); |
3993 | 3571 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
|
3572 G_CALLBACK(plugin_treeview_enable_prefs), |
3993 | 3573 input_plugin_prefs); |
3574 | |
3575 g_signal_connect_swapped(G_OBJECT(input_plugin_prefs), "clicked", | |
3356 | 3576 G_CALLBACK(plugin_treeview_open_prefs), |
3993 | 3577 input_plugin_view); |
3578 | |
3579 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
|
3580 G_CALLBACK(plugin_treeview_enable_info), |
3993 | 3581 input_plugin_info); |
3582 g_signal_connect_swapped(G_OBJECT(input_plugin_info), "clicked", | |
3357 | 3583 G_CALLBACK(plugin_treeview_open_info), |
3993 | 3584 input_plugin_view); |
2313 | 3585 |
3586 /* plugin->output page */ | |
3587 | |
3993 | 3588 g_signal_connect(G_OBJECT(output_plugin_cbox), "changed", |
2313 | 3589 G_CALLBACK(output_plugin_enable_prefs), |
3993 | 3590 output_plugin_prefs); |
3591 g_signal_connect_swapped(G_OBJECT(output_plugin_prefs), "clicked", | |
2313 | 3592 G_CALLBACK(output_plugin_open_prefs), |
3993 | 3593 output_plugin_cbox); |
3594 | |
3595 g_signal_connect(G_OBJECT(output_plugin_cbox), "changed", | |
2313 | 3596 G_CALLBACK(output_plugin_enable_info), |
3993 | 3597 output_plugin_info); |
3598 g_signal_connect_swapped(G_OBJECT(output_plugin_info), "clicked", | |
2313 | 3599 G_CALLBACK(output_plugin_open_info), |
3993 | 3600 output_plugin_cbox); |
2313 | 3601 |
3602 /* plugin->general page */ | |
3603 | |
3993 | 3604 g_object_set_data(G_OBJECT(general_plugin_view), "plugin_type" , GINT_TO_POINTER(PLUGIN_VIEW_TYPE_GENERAL)); |
3605 g_signal_connect(G_OBJECT(general_plugin_view), "row-activated", | |
3356 | 3606 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
|
3607 NULL); |
2313 | 3608 |
3993 | 3609 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
|
3610 G_CALLBACK(plugin_treeview_enable_prefs), |
3993 | 3611 general_plugin_prefs); |
3612 | |
3613 g_signal_connect_swapped(G_OBJECT(general_plugin_prefs), "clicked", | |
3356 | 3614 G_CALLBACK(plugin_treeview_open_prefs), |
3993 | 3615 general_plugin_view); |
3616 | |
3617 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
|
3618 G_CALLBACK(plugin_treeview_enable_info), |
3993 | 3619 general_plugin_info); |
3620 g_signal_connect_swapped(G_OBJECT(general_plugin_info), "clicked", | |
3357 | 3621 G_CALLBACK(plugin_treeview_open_info), |
3993 | 3622 general_plugin_view); |
2313 | 3623 |
3624 | |
3625 /* plugin->vis page */ | |
3626 | |
3993 | 3627 g_object_set_data(G_OBJECT(vis_plugin_view), "plugin_type" , GINT_TO_POINTER(PLUGIN_VIEW_TYPE_VIS)); |
3628 g_signal_connect(G_OBJECT(vis_plugin_view), "row-activated", | |
3356 | 3629 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
|
3630 NULL); |
3993 | 3631 g_signal_connect_swapped(G_OBJECT(vis_plugin_prefs), "clicked", |
3356 | 3632 G_CALLBACK(plugin_treeview_open_prefs), |
3993 | 3633 vis_plugin_view); |
3634 g_signal_connect(G_OBJECT(vis_plugin_view), "cursor-changed", | |
3635 G_CALLBACK(plugin_treeview_enable_prefs), vis_plugin_prefs); | |
3636 | |
3637 g_signal_connect(G_OBJECT(vis_plugin_view), "cursor-changed", | |
3638 G_CALLBACK(plugin_treeview_enable_info), vis_plugin_info); | |
3639 g_signal_connect_swapped(G_OBJECT(vis_plugin_info), "clicked", | |
3357 | 3640 G_CALLBACK(plugin_treeview_open_info), |
3993 | 3641 vis_plugin_view); |
2313 | 3642 |
3643 | |
3644 /* plugin->effects page */ | |
3645 | |
3993 | 3646 g_object_set_data(G_OBJECT(effect_plugin_view), "plugin_type" , GINT_TO_POINTER(PLUGIN_VIEW_TYPE_EFFECT)); |
3647 g_signal_connect(G_OBJECT(effect_plugin_view), "row-activated", | |
3356 | 3648 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
|
3649 NULL); |
3993 | 3650 g_signal_connect_swapped(G_OBJECT(effect_plugin_prefs), "clicked", |
3356 | 3651 G_CALLBACK(plugin_treeview_open_prefs), |
3993 | 3652 effect_plugin_view); |
3653 g_signal_connect(G_OBJECT(effect_plugin_view), "cursor-changed", | |
3654 G_CALLBACK(plugin_treeview_enable_prefs), effect_plugin_prefs); | |
3655 | |
3656 g_signal_connect(G_OBJECT(effect_plugin_view), "cursor-changed", | |
3657 G_CALLBACK(plugin_treeview_enable_info), effect_plugin_info); | |
3658 g_signal_connect_swapped(G_OBJECT(effect_plugin_info), "clicked", | |
3357 | 3659 G_CALLBACK(plugin_treeview_open_info), |
3993 | 3660 effect_plugin_view); |
2313 | 3661 |
3662 /* playlist page */ | |
3663 | |
3993 | 3664 g_signal_connect_after(G_OBJECT(pause_between_songs), "realize", |
2313 | 3665 G_CALLBACK(on_pause_between_songs_realize), |
3993 | 3666 pause_between_songs_box); |
3667 g_signal_connect(G_OBJECT(pause_between_songs), "toggled", | |
2313 | 3668 G_CALLBACK(on_pause_between_songs_toggled), |
3993 | 3669 pause_between_songs_box); |
3670 | |
3671 g_signal_connect_after(G_OBJECT(playlist_use_metadata), "realize", | |
2313 | 3672 G_CALLBACK(on_use_pl_metadata_realize), |
3993 | 3673 playlist_use_metadata_box); |
3674 g_signal_connect(G_OBJECT(playlist_use_metadata), "toggled", | |
2313 | 3675 G_CALLBACK(on_use_pl_metadata_toggled), |
3993 | 3676 playlist_use_metadata_box); |
3677 | |
3678 g_signal_connect(skin_view, "drag-data-received", | |
2313 | 3679 G_CALLBACK(on_skin_view_drag_data_received), |
3680 NULL); | |
3993 | 3681 bmp_drag_dest_set(skin_view); |
2313 | 3682 |
3683 g_signal_connect(mainwin, "drag-data-received", | |
3684 G_CALLBACK(mainwin_drag_data_received), | |
3993 | 3685 skin_view); |
3686 | |
3687 g_signal_connect(skin_refresh_button, "clicked", | |
2313 | 3688 G_CALLBACK(on_skin_refresh_button_clicked), |
3689 NULL); | |
3690 | |
3691 g_signal_connect(mainwin, "drag-data-received", | |
2975 | 3692 G_CALLBACK(mainwin_drag_data_received), |
3993 | 3693 fontbutton2); |
3694 | |
3695 g_signal_connect(titlestring_cbox, "realize", | |
2313 | 3696 G_CALLBACK(on_titlestring_cbox_realize), |
3993 | 3697 titlestring_entry); |
3698 g_signal_connect(titlestring_cbox, "changed", | |
2313 | 3699 G_CALLBACK(on_titlestring_cbox_changed), |
3993 | 3700 titlestring_entry); |
2313 | 3701 |
3702 /* FIXME: move this into a function */ | |
3703 /* create tag menu */ | |
3704 titlestring_tag_menu = gtk_menu_new(); | |
3705 for(i = 0; i < n_title_field_tags; i++) { | |
3991
d6ac99c2be1d
destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents:
3990
diff
changeset
|
3706 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
|
3707 gtk_menu_shell_append(GTK_MENU_SHELL(titlestring_tag_menu), menu_item); |
2313 | 3708 g_signal_connect(menu_item, "activate", |
3709 G_CALLBACK(titlestring_tag_menu_callback), | |
3710 GINT_TO_POINTER(i)); | |
3711 }; | |
3712 gtk_widget_show_all(titlestring_tag_menu); | |
3993 | 3713 |
3714 g_signal_connect(titlestring_cbox, "changed", | |
2313 | 3715 G_CALLBACK(on_titlestring_cbox_changed), |
3993 | 3716 titlestring_help_button); |
3717 g_signal_connect(titlestring_help_button, "clicked", | |
2313 | 3718 G_CALLBACK(on_titlestring_help_button_clicked), |
3719 titlestring_tag_menu); | |
3720 | |
3721 /* audacious version label */ | |
2467 | 3722 |
2468
5206f4ef02f7
[svn] - the svn_stamp is no longer an svn revision, but a serial number
nenolod
parents:
2467
diff
changeset
|
3723 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
|
3724 "Audacious " PACKAGE_VERSION , |
d6ac99c2be1d
destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents:
3990
diff
changeset
|
3725 svn_stamp , |
d6ac99c2be1d
destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents:
3990
diff
changeset
|
3726 g_get_user_name() , g_get_host_name() ); |
2313 | 3727 |
3993 | 3728 gtk_label_set_markup( GTK_LABEL(audversionlabel) , aud_version_string ); |
2467 | 3729 g_free(aud_version_string); |
3993 | 3730 gtk_widget_show_all(vbox); |
2313 | 3731 |
3990
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
3732 /* Create window for filepopup settings */ |
14c2d0729563
filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents:
3989
diff
changeset
|
3733 create_filepopup_settings(); |
2313 | 3734 } |
3735 | |
3736 void | |
3737 show_prefs_window(void) | |
3738 { | |
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
|
3739 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
|
3740 |
2635 | 3741 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
|
3742 |
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
|
3743 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
|
3744 { |
3993 | 3745 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
|
3746 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
|
3747 } |
2313 | 3748 } |
3749 | |
3917 | 3750 void |
3751 hide_prefs_window(void) | |
3752 { | |
3753 g_return_if_fail(prefswin); | |
3754 gtk_widget_hide(GTK_WIDGET(prefswin)); | |
3755 } | |
3756 | |
2313 | 3757 static void |
3758 prefswin_page_queue_new(GtkWidget *container, gchar *name, gchar *imgurl) | |
3759 { | |
3760 CategoryQueueEntry *ent = g_malloc0(sizeof(CategoryQueueEntry)); | |
3761 | |
3762 ent->container = container; | |
3763 ent->pg_name = name; | |
3764 ent->img_url = imgurl; | |
3765 | |
3766 if (category_queue) | |
3767 ent->next = category_queue; | |
3768 | |
3769 category_queue = ent; | |
3770 } | |
3771 | |
3772 static void | |
3773 prefswin_page_queue_destroy(CategoryQueueEntry *ent) | |
3774 { | |
3775 category_queue = ent->next; | |
3776 g_free(ent); | |
3777 } | |
3778 | |
3779 /* | |
3780 * Public APIs for adding new pages to the prefs window. | |
3781 * | |
3782 * Basically, the concept here is that third party components can register themselves in the root | |
3783 * preferences window. | |
3784 * | |
3785 * From a usability standpoint this makes the application look more "united", instead of cluttered | |
3786 * and malorganised. Hopefully this option will be used further in the future. | |
3787 * | |
3788 * - nenolod | |
3789 */ | |
3790 gint | |
3791 prefswin_page_new(GtkWidget *container, gchar *name, gchar *imgurl) | |
3792 { | |
3793 GtkTreeModel *model; | |
3794 GtkTreeIter iter; | |
3795 GdkPixbuf *img = NULL; | |
3796 GtkTreeView *treeview = GTK_TREE_VIEW(category_treeview); | |
3797 gint id; | |
3798 | |
3799 if (treeview == NULL || category_notebook == NULL) | |
3800 { | |
3801 prefswin_page_queue_new(container, name, imgurl); | |
3802 return -1; | |
3803 } | |
3804 | |
3805 model = gtk_tree_view_get_model(treeview); | |
3806 | |
3807 if (model == NULL) | |
3808 { | |
3809 prefswin_page_queue_new(container, name, imgurl); | |
3810 return -1; | |
3811 } | |
3812 | |
3813 /* Make sure the widgets are visible. */ | |
3814 gtk_widget_show(container); | |
3815 id = gtk_notebook_append_page(GTK_NOTEBOOK(category_notebook), container, NULL); | |
3816 | |
3817 if (id == -1) | |
3818 return -1; | |
3819 | |
3820 if (imgurl != NULL) | |
3821 img = gdk_pixbuf_new_from_file(imgurl, NULL); | |
3822 | |
3823 gtk_list_store_append(GTK_LIST_STORE(model), &iter); | |
3824 gtk_list_store_set(GTK_LIST_STORE(model), &iter, | |
3825 CATEGORY_VIEW_COL_ICON, img, | |
3826 CATEGORY_VIEW_COL_NAME, | |
3827 name, CATEGORY_VIEW_COL_ID, id, -1); | |
3828 | |
3829 if (img != NULL) | |
3830 g_object_unref(img); | |
3831 | |
3832 return id; | |
3833 } | |
3834 | |
3835 void | |
3836 prefswin_page_destroy(GtkWidget *container) | |
3837 { | |
3838 GtkTreeModel *model; | |
3839 GtkTreeIter iter; | |
3840 GtkTreeView *treeview = GTK_TREE_VIEW(category_treeview); | |
3841 gboolean ret; | |
3842 gint id; | |
3843 gint index = -1; | |
3844 | |
3845 if (category_notebook == NULL || treeview == NULL || container == NULL) | |
3846 return; | |
3847 | |
3848 id = gtk_notebook_page_num(GTK_NOTEBOOK(category_notebook), container); | |
3849 | |
3850 if (id == -1) | |
3851 return; | |
3852 | |
3853 gtk_notebook_remove_page(GTK_NOTEBOOK(category_notebook), id); | |
3854 | |
3855 model = gtk_tree_view_get_model(treeview); | |
3856 | |
3857 if (model == NULL) | |
3858 return; | |
3859 | |
3860 ret = gtk_tree_model_get_iter_first(model, &iter); | |
3861 | |
3862 while (ret == TRUE) | |
3863 { | |
3864 gtk_tree_model_get(model, &iter, CATEGORY_VIEW_COL_ID, &index, -1); | |
3865 | |
3866 if (index == id) | |
3867 { | |
3868 gtk_list_store_remove(GTK_LIST_STORE(model), &iter); | |
3869 ret = gtk_tree_model_get_iter_first(model, &iter); | |
3870 } | |
3871 | |
3872 if (index > id) | |
3873 { | |
3874 index--; | |
3875 gtk_list_store_set(GTK_LIST_STORE(model), &iter, CATEGORY_VIEW_COL_ID, index, -1); | |
3876 } | |
3877 | |
3878 ret = gtk_tree_model_iter_next(model, &iter); | |
3879 } | |
3880 } |