Mercurial > audlegacy
annotate audacious/prefswin.c @ 2001:97e5147a6812 trunk
[svn] - remove vfs_stdio.c
author | nenolod |
---|---|
date | Thu, 23 Nov 2006 20:21:49 -0800 |
parents | 9fd04055d6cc |
children | d3a62e1075e2 |
rev | line source |
---|---|
1073 | 1 /* Audacious - Cross-platform multimedia player |
2 * Copyright (C) 2005-2006 Audacious development team. | |
3 * | |
4 * BMP - Cross-platform multimedia player | |
0 | 5 * Copyright (C) 2003-2004 BMP development team. |
6 * | |
7 * This program is free software; you can redistribute it and/or modify | |
1460 | 8 * it under the terms of the GNU General Public License as published by |
0 | 9 * the Free Software Foundation; either version 2 of the License, or |
10 * (at your option) any later version. | |
11 * | |
12 * This program is distributed in the hope that it will be useful, | |
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 * GNU General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU General Public License | |
18 * along with this program; if not, write to the Free Software | |
1459 | 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
0 | 20 */ |
21 | |
22 #ifdef HAVE_CONFIG_H | |
23 # include "config.h" | |
24 #endif | |
25 | |
26 #include <glib.h> | |
27 #include <glib/gi18n.h> | |
28 #include <gtk/gtk.h> | |
29 #include <glade/glade.h> | |
30 #include <string.h> | |
887 | 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> | |
0 | 39 |
40 #include "glade.h" | |
41 | |
42 #include "plugin.h" | |
43 #include "pluginenum.h" | |
44 #include "input.h" | |
45 #include "effect.h" | |
46 #include "general.h" | |
47 #include "output.h" | |
48 #include "visualization.h" | |
49 | |
50 #include "main.h" | |
1547 | 51 #include "widgets/widgetcore.h" |
0 | 52 #include "urldecode.h" |
53 #include "util.h" | |
54 #include "dnd.h" | |
55 #include "libaudacious/configdb.h" | |
56 | |
57 #include "mainwin.h" | |
383 | 58 #include "ui_playlist.h" |
0 | 59 #include "skinwin.h" |
816
8073d8300502
[svn] display audacious version and revision in the prefs window
giacomo
parents:
625
diff
changeset
|
60 #include "build_stamp.h" |
1184
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
61 #include "prefswin.h" |
0 | 62 |
63 enum CategoryViewCols { | |
64 CATEGORY_VIEW_COL_ICON, | |
65 CATEGORY_VIEW_COL_NAME, | |
66 CATEGORY_VIEW_COL_ID, | |
67 CATEGORY_VIEW_N_COLS | |
68 }; | |
69 | |
70 enum PluginViewCols { | |
71 PLUGIN_VIEW_COL_ACTIVE, | |
72 PLUGIN_VIEW_COL_DESC, | |
73 PLUGIN_VIEW_COL_FILENAME, | |
74 PLUGIN_VIEW_COL_ID, | |
75 PLUGIN_VIEW_N_COLS | |
76 }; | |
77 | |
78 | |
79 typedef struct { | |
80 const gchar *icon_path; | |
81 const gchar *name; | |
82 gint id; | |
83 } Category; | |
84 | |
85 typedef struct { | |
86 const gchar *name; | |
87 const gchar *tag; | |
88 } | |
89 TitleFieldTag; | |
90 | |
91 static GtkWidget *prefswin = NULL; | |
1413 | 92 static GtkWidget *filepopup_settings = NULL; |
1175 | 93 static GtkWidget *category_treeview = NULL; |
94 static GtkWidget *category_notebook = NULL; | |
1388
b8e521f642e4
[svn] - when the playlist page of the preferences window is shown, the checkbox for filepopup follows the popup menu now.
yaz
parents:
1384
diff
changeset
|
95 GtkWidget *filepopupbutton = NULL; |
0 | 96 |
97 static Category categories[] = { | |
98 {DATA_DIR "/images/appearance.png", N_("Appearance"), 1}, | |
1143 | 99 {DATA_DIR "/images/audio.png", N_("Audio"), 6}, |
1074 | 100 {DATA_DIR "/images/connectivity.png", N_("Connectivity"), 5}, |
0 | 101 {DATA_DIR "/images/eq.png", N_("Equalizer"), 4}, |
102 {DATA_DIR "/images/mouse.png", N_("Mouse"), 2}, | |
103 {DATA_DIR "/images/playlist.png", N_("Playlist"), 3}, | |
104 {DATA_DIR "/images/plugins.png", N_("Plugins"), 0}, | |
105 }; | |
106 | |
107 static gint n_categories = G_N_ELEMENTS(categories); | |
108 | |
109 static TitleFieldTag title_field_tags[] = { | |
110 { N_("Artist") , "%p" }, | |
111 { N_("Album") , "%a" }, | |
112 { N_("Title") , "%t" }, | |
113 { N_("Tracknumber"), "%n" }, | |
114 { N_("Genre") , "%g" }, | |
115 { N_("Filename") , "%f" }, | |
116 { N_("Filepath") , "%F" }, | |
117 { N_("Date") , "%d" }, | |
118 { N_("Year") , "%y" }, | |
119 { N_("Comment") , "%c" } | |
120 }; | |
121 | |
1184
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
122 typedef struct { |
1352
8b249765fdd1
[svn] - GList cannot handle circular queues, so I integrated one into CategoryQueueEntry. No fuss, no muss.
nenolod
parents:
1188
diff
changeset
|
123 void *next; |
1184
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
124 GtkWidget *container; |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
125 char *pg_name; |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
126 char *img_url; |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
127 } CategoryQueueEntry; |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
128 |
1352
8b249765fdd1
[svn] - GList cannot handle circular queues, so I integrated one into CategoryQueueEntry. No fuss, no muss.
nenolod
parents:
1188
diff
changeset
|
129 CategoryQueueEntry *category_queue = NULL; |
1184
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
130 |
0 | 131 static const guint n_title_field_tags = G_N_ELEMENTS(title_field_tags); |
132 | |
963
e42ce60c308f
[svn] - GLib 2.6 compatibility wrapper, per bug #469
nenolod
parents:
962
diff
changeset
|
133 /* GLib 2.6 compatibility */ |
e42ce60c308f
[svn] - GLib 2.6 compatibility wrapper, per bug #469
nenolod
parents:
962
diff
changeset
|
134 #if (! ((GLIB_MAJOR_VERSION > 2) || ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION >= 8)))) |
e42ce60c308f
[svn] - GLib 2.6 compatibility wrapper, per bug #469
nenolod
parents:
962
diff
changeset
|
135 static const char * |
e42ce60c308f
[svn] - GLib 2.6 compatibility wrapper, per bug #469
nenolod
parents:
962
diff
changeset
|
136 g_get_host_name (void) |
e42ce60c308f
[svn] - GLib 2.6 compatibility wrapper, per bug #469
nenolod
parents:
962
diff
changeset
|
137 { |
e42ce60c308f
[svn] - GLib 2.6 compatibility wrapper, per bug #469
nenolod
parents:
962
diff
changeset
|
138 static char hostname [HOST_NAME_MAX + 1]; |
e42ce60c308f
[svn] - GLib 2.6 compatibility wrapper, per bug #469
nenolod
parents:
962
diff
changeset
|
139 if (gethostname (hostname, HOST_NAME_MAX) == -1) { |
e42ce60c308f
[svn] - GLib 2.6 compatibility wrapper, per bug #469
nenolod
parents:
962
diff
changeset
|
140 return _("localhost"); |
e42ce60c308f
[svn] - GLib 2.6 compatibility wrapper, per bug #469
nenolod
parents:
962
diff
changeset
|
141 } |
e42ce60c308f
[svn] - GLib 2.6 compatibility wrapper, per bug #469
nenolod
parents:
962
diff
changeset
|
142 return hostname; |
e42ce60c308f
[svn] - GLib 2.6 compatibility wrapper, per bug #469
nenolod
parents:
962
diff
changeset
|
143 } |
e42ce60c308f
[svn] - GLib 2.6 compatibility wrapper, per bug #469
nenolod
parents:
962
diff
changeset
|
144 #endif |
0 | 145 |
1184
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
146 static void prefswin_page_queue_destroy(CategoryQueueEntry *ent); |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
147 |
0 | 148 static GladeXML * |
149 prefswin_get_xml(void) | |
150 { | |
151 return GLADE_XML(g_object_get_data(G_OBJECT(prefswin), "glade-xml")); | |
152 } | |
153 | |
154 static void | |
155 change_category(GtkNotebook * notebook, | |
156 GtkTreeSelection * selection) | |
157 { | |
158 GtkTreeModel *model; | |
159 GtkTreeIter iter; | |
160 gint index; | |
161 | |
162 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
163 return; | |
164 | |
165 gtk_tree_model_get(model, &iter, CATEGORY_VIEW_COL_ID, &index, -1); | |
166 gtk_notebook_set_current_page(notebook, index); | |
167 } | |
168 | |
169 void | |
170 prefswin_set_category(gint index) | |
171 { | |
172 GladeXML *xml; | |
173 GtkWidget *notebook; | |
174 | |
175 g_return_if_fail(index >= 0 && index < n_categories); | |
176 | |
177 xml = prefswin_get_xml(); | |
178 notebook = glade_xml_get_widget(xml, "category_view"); | |
179 gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), index); | |
180 } | |
181 | |
182 | |
183 static void | |
184 input_plugin_open_prefs(GtkTreeView * treeview, | |
185 gpointer data) | |
186 { | |
187 GtkTreeSelection *selection; | |
188 GtkTreeModel *model; | |
189 GtkTreeIter iter; | |
190 gint id; | |
191 | |
192 selection = gtk_tree_view_get_selection(treeview); | |
193 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
194 return; | |
195 | |
196 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); | |
197 input_configure(id); | |
198 } | |
199 | |
200 static void | |
201 input_plugin_open_info(GtkTreeView * treeview, | |
202 gpointer data) | |
203 { | |
204 GtkTreeSelection *selection; | |
205 GtkTreeModel *model; | |
206 GtkTreeIter iter; | |
207 gint id; | |
208 | |
209 selection = gtk_tree_view_get_selection(treeview); | |
210 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
211 return; | |
212 | |
213 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); | |
214 input_about(id); | |
215 } | |
216 | |
217 static void | |
218 output_plugin_open_prefs(GtkComboBox * cbox, | |
219 gpointer data) | |
220 { | |
221 output_configure(gtk_combo_box_get_active(cbox)); | |
222 } | |
223 | |
224 static void | |
225 output_plugin_open_info(GtkComboBox * cbox, | |
226 gpointer data) | |
227 { | |
228 output_about(gtk_combo_box_get_active(cbox)); | |
229 } | |
230 | |
231 static void | |
232 general_plugin_open_prefs(GtkTreeView * treeview, | |
233 gpointer data) | |
234 { | |
235 GtkTreeSelection *selection; | |
236 GtkTreeModel *model; | |
237 GtkTreeIter iter; | |
238 gint id; | |
239 | |
240 selection = gtk_tree_view_get_selection(treeview); | |
241 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
242 return; | |
243 | |
244 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); | |
245 general_configure(id); | |
246 } | |
247 | |
248 static void | |
249 general_plugin_open_info(GtkTreeView * treeview, | |
250 gpointer data) | |
251 { | |
252 GtkTreeSelection *selection; | |
253 GtkTreeModel *model; | |
254 GtkTreeIter iter; | |
255 gint id; | |
256 | |
257 selection = gtk_tree_view_get_selection(treeview); | |
258 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
259 return; | |
260 | |
261 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); | |
262 general_about(id); | |
263 } | |
264 | |
265 static void | |
266 input_plugin_toggle(GtkCellRendererToggle * cell, | |
267 const gchar * path_str, | |
268 gpointer data) | |
269 { | |
270 GtkTreeModel *model = GTK_TREE_MODEL(data); | |
271 GtkTreeIter iter; | |
272 GtkTreePath *path = gtk_tree_path_new_from_string(path_str); | |
273 gboolean fixed; | |
274 gint pluginnr; | |
275 gchar *filename, *basename; | |
276 /*GList *diplist, *tmplist; */ | |
277 | |
278 /* get toggled iter */ | |
279 gtk_tree_model_get_iter(model, &iter, path); | |
280 gtk_tree_model_get(model, &iter, | |
281 PLUGIN_VIEW_COL_ACTIVE, &fixed, | |
282 PLUGIN_VIEW_COL_ID, &pluginnr, | |
283 PLUGIN_VIEW_COL_FILENAME, &filename, | |
284 -1); | |
285 | |
286 basename = g_path_get_basename(filename); | |
287 g_free(filename); | |
288 | |
289 /* do something with the value */ | |
290 fixed ^= 1; | |
291 | |
292 g_hash_table_replace(plugin_matrix, basename, GINT_TO_POINTER(fixed)); | |
293 /* g_hash_table_foreach(pluginmatrix, (GHFunc) disp_matrix, NULL); */ | |
294 | |
295 /* set new value */ | |
296 gtk_list_store_set(GTK_LIST_STORE(model), &iter, | |
297 PLUGIN_VIEW_COL_ACTIVE, fixed, -1); | |
298 | |
299 /* clean up */ | |
300 gtk_tree_path_free(path); | |
301 } | |
302 | |
303 | |
304 static void | |
305 vis_plugin_toggle(GtkCellRendererToggle * cell, | |
306 const gchar * path_str, | |
307 gpointer data) | |
308 { | |
309 GtkTreeModel *model = GTK_TREE_MODEL(data); | |
310 GtkTreeIter iter; | |
311 GtkTreePath *path = gtk_tree_path_new_from_string(path_str); | |
312 gboolean fixed; | |
313 gint pluginnr; | |
314 | |
315 /* get toggled iter */ | |
316 gtk_tree_model_get_iter(model, &iter, path); | |
317 gtk_tree_model_get(model, &iter, | |
318 PLUGIN_VIEW_COL_ACTIVE, &fixed, | |
319 PLUGIN_VIEW_COL_ID, &pluginnr, -1); | |
320 | |
321 /* do something with the value */ | |
322 fixed ^= 1; | |
323 | |
324 enable_vis_plugin(pluginnr, fixed); | |
325 | |
326 /* set new value */ | |
327 gtk_list_store_set(GTK_LIST_STORE(model), &iter, | |
328 PLUGIN_VIEW_COL_ACTIVE, fixed, -1); | |
329 | |
330 /* clean up */ | |
331 gtk_tree_path_free(path); | |
332 } | |
333 | |
334 static void | |
335 effect_plugin_toggle(GtkCellRendererToggle * cell, | |
336 const gchar * path_str, | |
337 gpointer data) | |
338 { | |
339 GtkTreeModel *model = GTK_TREE_MODEL(data); | |
340 GtkTreeIter iter; | |
341 GtkTreePath *path = gtk_tree_path_new_from_string(path_str); | |
342 gboolean fixed; | |
343 gint pluginnr; | |
344 | |
345 /* get toggled iter */ | |
346 gtk_tree_model_get_iter(model, &iter, path); | |
347 gtk_tree_model_get(model, &iter, | |
348 PLUGIN_VIEW_COL_ACTIVE, &fixed, | |
349 PLUGIN_VIEW_COL_ID, &pluginnr, -1); | |
350 | |
351 /* do something with the value */ | |
352 fixed ^= 1; | |
353 | |
354 enable_effect_plugin(pluginnr, fixed); | |
355 | |
356 /* set new value */ | |
357 gtk_list_store_set(GTK_LIST_STORE(model), &iter, | |
358 PLUGIN_VIEW_COL_ACTIVE, fixed, -1); | |
359 | |
360 /* clean up */ | |
361 gtk_tree_path_free(path); | |
362 } | |
363 static void | |
364 general_plugin_toggle(GtkCellRendererToggle * cell, | |
365 const gchar * path_str, | |
366 gpointer data) | |
367 { | |
368 GtkTreeModel *model = GTK_TREE_MODEL(data); | |
369 GtkTreeIter iter; | |
370 GtkTreePath *path = gtk_tree_path_new_from_string(path_str); | |
371 gboolean fixed; | |
372 gint pluginnr; | |
373 | |
374 /* get toggled iter */ | |
375 gtk_tree_model_get_iter(model, &iter, path); | |
376 gtk_tree_model_get(model, &iter, | |
377 PLUGIN_VIEW_COL_ACTIVE, &fixed, | |
378 PLUGIN_VIEW_COL_ID, &pluginnr, -1); | |
379 | |
380 /* do something with the value */ | |
381 fixed ^= 1; | |
382 | |
383 enable_general_plugin(pluginnr, fixed); | |
384 | |
385 /* set new value */ | |
386 gtk_list_store_set(GTK_LIST_STORE(model), &iter, | |
387 PLUGIN_VIEW_COL_ACTIVE, fixed, -1); | |
388 | |
389 /* clean up */ | |
390 gtk_tree_path_free(path); | |
391 } | |
392 | |
393 static void | |
394 on_output_plugin_cbox_changed(GtkComboBox * combobox, | |
395 gpointer data) | |
396 { | |
397 gint selected; | |
398 selected = gtk_combo_box_get_active(combobox); | |
399 | |
400 /* Force playback to stop. There is NO way to change the output | |
401 plugin in the middle of a playback, and NO way to know when the | |
402 user closes the output plugin settings dialog. */ | |
403 mainwin_stop_pushed(); | |
404 set_current_output_plugin(selected); | |
405 } | |
406 | |
407 static void | |
408 on_output_plugin_cbox_realize(GtkComboBox * cbox, | |
409 gpointer data) | |
410 { | |
411 GList *olist = get_output_list(); | |
412 OutputPlugin *op, *cp = get_current_output_plugin(); | |
413 gint i = 0, selected = 0; | |
414 | |
415 if (!olist) { | |
416 gtk_widget_set_sensitive(GTK_WIDGET(cbox), FALSE); | |
417 return; | |
418 } | |
419 | |
420 for (i = 0; olist; i++, olist = g_list_next(olist)) { | |
421 op = OUTPUT_PLUGIN(olist->data); | |
422 | |
423 if (olist->data == cp) | |
424 selected = i; | |
425 | |
426 gtk_combo_box_append_text(cbox, op->description); | |
427 } | |
428 | |
429 gtk_combo_box_set_active(cbox, selected); | |
430 g_signal_connect(cbox, "changed", | |
431 G_CALLBACK(on_output_plugin_cbox_changed), NULL); | |
432 } | |
433 | |
434 | |
435 static void | |
436 on_input_plugin_view_realize(GtkTreeView * treeview, | |
437 gpointer data) | |
438 { | |
439 GtkListStore *store; | |
440 GtkTreeIter iter; | |
441 | |
442 GtkCellRenderer *renderer; | |
443 GtkTreeViewColumn *column; | |
444 | |
445 GList *ilist; | |
446 gchar *description[2]; | |
447 InputPlugin *ip; | |
448 gint id = 0; | |
449 | |
450 gboolean enabled; | |
451 | |
452 store = gtk_list_store_new(PLUGIN_VIEW_N_COLS, | |
453 G_TYPE_BOOLEAN, G_TYPE_STRING, | |
454 G_TYPE_STRING, G_TYPE_INT); | |
455 | |
456 column = gtk_tree_view_column_new(); | |
457 gtk_tree_view_column_set_title(column, _("Enabled")); | |
458 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); | |
459 gtk_tree_view_column_set_spacing(column, 4); | |
460 gtk_tree_view_column_set_resizable(column, FALSE); | |
461 gtk_tree_view_column_set_fixed_width(column, 50); | |
462 | |
463 renderer = gtk_cell_renderer_toggle_new(); | |
464 g_signal_connect(renderer, "toggled", | |
465 G_CALLBACK(input_plugin_toggle), store); | |
466 gtk_tree_view_column_pack_start(column, renderer, TRUE); | |
467 gtk_tree_view_column_set_attributes(column, renderer, "active", | |
468 PLUGIN_VIEW_COL_ACTIVE, NULL); | |
469 | |
470 gtk_tree_view_append_column(treeview, column); | |
471 | |
472 column = gtk_tree_view_column_new(); | |
473 gtk_tree_view_column_set_title(column, _("Description")); | |
474 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); | |
475 gtk_tree_view_column_set_spacing(column, 4); | |
476 gtk_tree_view_column_set_resizable(column, TRUE); | |
477 | |
478 | |
479 renderer = gtk_cell_renderer_text_new(); | |
480 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
481 gtk_tree_view_column_set_attributes(column, renderer, | |
482 "text", PLUGIN_VIEW_COL_DESC, NULL); | |
483 gtk_tree_view_append_column(treeview, column); | |
484 | |
485 column = gtk_tree_view_column_new(); | |
486 | |
487 gtk_tree_view_column_set_title(column, _("Filename")); | |
488 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); | |
489 gtk_tree_view_column_set_spacing(column, 4); | |
490 gtk_tree_view_column_set_resizable(column, TRUE); | |
491 | |
492 renderer = gtk_cell_renderer_text_new(); | |
493 gtk_tree_view_column_pack_start(column, renderer, TRUE); | |
494 gtk_tree_view_column_set_attributes(column, renderer, "text", | |
495 PLUGIN_VIEW_COL_FILENAME, NULL); | |
496 | |
497 gtk_tree_view_append_column(treeview, column); | |
498 | |
499 for (ilist = get_input_list(); ilist; ilist = g_list_next(ilist)) { | |
500 ip = INPUT_PLUGIN(ilist->data); | |
501 | |
502 description[0] = g_strdup(ip->description); | |
503 description[1] = g_strdup(ip->filename); | |
504 | |
505 enabled = input_is_enabled(description[1]); | |
506 | |
507 gtk_list_store_append(store, &iter); | |
508 gtk_list_store_set(store, &iter, | |
509 PLUGIN_VIEW_COL_ACTIVE, enabled, | |
510 PLUGIN_VIEW_COL_DESC, description[0], | |
511 PLUGIN_VIEW_COL_FILENAME, description[1], | |
512 PLUGIN_VIEW_COL_ID, id++, -1); | |
513 | |
514 g_free(description[1]); | |
515 g_free(description[0]); | |
516 } | |
517 | |
518 gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(store)); | |
519 } | |
520 | |
521 | |
522 static void | |
523 on_general_plugin_view_realize(GtkTreeView * treeview, | |
524 gpointer data) | |
525 { | |
526 GtkListStore *store; | |
527 GtkTreeIter iter; | |
528 | |
529 GtkCellRenderer *renderer; | |
530 GtkTreeViewColumn *column; | |
531 | |
532 GList *ilist /*, *diplist */ ; | |
533 gchar *description[2]; | |
534 GeneralPlugin *gp; | |
535 gint id = 0; | |
536 | |
537 gboolean enabled; | |
538 | |
539 store = gtk_list_store_new(PLUGIN_VIEW_N_COLS, | |
540 G_TYPE_BOOLEAN, G_TYPE_STRING, | |
541 G_TYPE_STRING, G_TYPE_INT); | |
542 | |
543 column = gtk_tree_view_column_new(); | |
544 gtk_tree_view_column_set_title(column, _("Enabled")); | |
545 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); | |
546 gtk_tree_view_column_set_spacing(column, 4); | |
547 gtk_tree_view_column_set_resizable(column, FALSE); | |
548 gtk_tree_view_column_set_fixed_width(column, 50); | |
549 | |
550 renderer = gtk_cell_renderer_toggle_new(); | |
551 g_signal_connect(renderer, "toggled", | |
552 G_CALLBACK(general_plugin_toggle), store); | |
553 gtk_tree_view_column_pack_start(column, renderer, TRUE); | |
554 gtk_tree_view_column_set_attributes(column, renderer, "active", | |
555 PLUGIN_VIEW_COL_ACTIVE, NULL); | |
556 | |
557 gtk_tree_view_append_column(treeview, column); | |
558 | |
559 column = gtk_tree_view_column_new(); | |
560 gtk_tree_view_column_set_title(column, _("Description")); | |
561 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); | |
562 gtk_tree_view_column_set_spacing(column, 4); | |
563 gtk_tree_view_column_set_resizable(column, TRUE); | |
564 | |
565 | |
566 renderer = gtk_cell_renderer_text_new(); | |
567 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
568 gtk_tree_view_column_set_attributes(column, renderer, | |
569 "text", PLUGIN_VIEW_COL_DESC, NULL); | |
570 | |
571 gtk_tree_view_append_column(treeview, column); | |
572 | |
573 | |
574 column = gtk_tree_view_column_new(); | |
575 gtk_tree_view_column_set_title(column, _("Filename")); | |
576 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); | |
577 gtk_tree_view_column_set_spacing(column, 4); | |
578 gtk_tree_view_column_set_resizable(column, TRUE); | |
579 | |
580 renderer = gtk_cell_renderer_text_new(); | |
581 gtk_tree_view_column_pack_start(column, renderer, TRUE); | |
582 gtk_tree_view_column_set_attributes(column, renderer, "text", | |
583 PLUGIN_VIEW_COL_FILENAME, NULL); | |
584 | |
585 gtk_tree_view_append_column(treeview, column); | |
586 | |
587 for (ilist = get_general_list(); ilist; ilist = g_list_next(ilist)) { | |
588 gp = GENERAL_PLUGIN(ilist->data); | |
589 | |
590 description[0] = g_strdup(gp->description); | |
591 description[1] = g_strdup(gp->filename); | |
592 | |
593 enabled = general_enabled(id); | |
594 | |
595 gtk_list_store_append(store, &iter); | |
596 gtk_list_store_set(store, &iter, | |
597 PLUGIN_VIEW_COL_ACTIVE, enabled, | |
598 PLUGIN_VIEW_COL_DESC, description[0], | |
599 PLUGIN_VIEW_COL_FILENAME, description[1], | |
600 PLUGIN_VIEW_COL_ID, id++, -1); | |
601 | |
602 g_free(description[1]); | |
603 g_free(description[0]); | |
604 } | |
605 | |
606 gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(store)); | |
607 } | |
608 | |
609 | |
610 static void | |
611 on_vis_plugin_view_realize(GtkTreeView * treeview, | |
612 gpointer data) | |
613 { | |
614 GtkListStore *store; | |
615 GtkTreeIter iter; | |
616 | |
617 GtkCellRenderer *renderer; | |
618 GtkTreeViewColumn *column; | |
619 | |
620 GList *vlist; | |
621 gchar *description[2]; | |
622 VisPlugin *vp; | |
623 gint id = 0; | |
624 | |
625 gboolean enabled; | |
626 | |
627 | |
628 store = gtk_list_store_new(PLUGIN_VIEW_N_COLS, | |
629 G_TYPE_BOOLEAN, G_TYPE_STRING, | |
630 G_TYPE_STRING, G_TYPE_INT); | |
631 | |
632 column = gtk_tree_view_column_new(); | |
633 gtk_tree_view_column_set_title(column, _("Enabled")); | |
634 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); | |
635 gtk_tree_view_column_set_spacing(column, 4); | |
636 gtk_tree_view_column_set_resizable(column, FALSE); | |
637 gtk_tree_view_column_set_fixed_width(column, 50); | |
638 | |
639 renderer = gtk_cell_renderer_toggle_new(); | |
640 g_signal_connect(renderer, "toggled", | |
641 G_CALLBACK(vis_plugin_toggle), store); | |
642 gtk_tree_view_column_pack_start(column, renderer, TRUE); | |
643 gtk_tree_view_column_set_attributes(column, renderer, "active", | |
644 PLUGIN_VIEW_COL_ACTIVE, NULL); | |
645 | |
646 gtk_tree_view_append_column(treeview, column); | |
647 | |
648 column = gtk_tree_view_column_new(); | |
649 gtk_tree_view_column_set_title(column, _("Description")); | |
650 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); | |
651 gtk_tree_view_column_set_spacing(column, 4); | |
652 gtk_tree_view_column_set_resizable(column, TRUE); | |
653 | |
654 | |
655 renderer = gtk_cell_renderer_text_new(); | |
656 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
657 gtk_tree_view_column_set_attributes(column, renderer, | |
658 "text", PLUGIN_VIEW_COL_DESC, NULL); | |
659 | |
660 gtk_tree_view_append_column(treeview, column); | |
661 | |
662 | |
663 column = gtk_tree_view_column_new(); | |
664 gtk_tree_view_column_set_title(column, _("Filename")); | |
665 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); | |
666 gtk_tree_view_column_set_spacing(column, 4); | |
667 gtk_tree_view_column_set_resizable(column, TRUE); | |
668 | |
669 renderer = gtk_cell_renderer_text_new(); | |
670 gtk_tree_view_column_pack_start(column, renderer, TRUE); | |
671 gtk_tree_view_column_set_attributes(column, renderer, "text", | |
672 PLUGIN_VIEW_COL_FILENAME, NULL); | |
673 | |
674 gtk_tree_view_append_column(treeview, column); | |
675 | |
676 for (vlist = get_vis_list(); vlist; vlist = g_list_next(vlist)) { | |
677 vp = VIS_PLUGIN(vlist->data); | |
678 | |
679 description[0] = g_strdup(vp->description); | |
680 description[1] = g_strdup(vp->filename); | |
681 | |
682 enabled = vis_enabled(id); | |
683 | |
684 gtk_list_store_append(store, &iter); | |
685 gtk_list_store_set(store, &iter, | |
686 PLUGIN_VIEW_COL_ACTIVE, enabled, | |
687 PLUGIN_VIEW_COL_DESC, description[0], | |
688 PLUGIN_VIEW_COL_FILENAME, description[1], | |
689 PLUGIN_VIEW_COL_ID, id++, -1); | |
690 | |
691 g_free(description[1]); | |
692 g_free(description[0]); | |
693 } | |
694 | |
695 gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(store)); | |
696 } | |
697 | |
698 static void | |
699 editable_insert_text(GtkEditable * editable, | |
700 const gchar * text, | |
701 gint * pos) | |
702 { | |
703 gtk_editable_insert_text(editable, text, strlen(text), pos); | |
704 } | |
705 | |
706 | |
707 static void | |
708 on_effect_plugin_view_realize(GtkTreeView * treeview, | |
709 gpointer data) | |
710 { | |
711 GtkListStore *store; | |
712 GtkTreeIter iter; | |
713 | |
714 GtkCellRenderer *renderer; | |
715 GtkTreeViewColumn *column; | |
716 | |
717 GList *elist; | |
718 gchar *description[2]; | |
719 gint id = 0; | |
720 | |
721 gboolean enabled; | |
722 | |
723 | |
724 store = gtk_list_store_new(PLUGIN_VIEW_N_COLS, | |
725 G_TYPE_BOOLEAN, G_TYPE_STRING, | |
726 G_TYPE_STRING, G_TYPE_INT); | |
727 | |
728 column = gtk_tree_view_column_new(); | |
729 gtk_tree_view_column_set_title(column, _("Enabled")); | |
730 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED); | |
731 gtk_tree_view_column_set_spacing(column, 4); | |
732 gtk_tree_view_column_set_resizable(column, FALSE); | |
733 gtk_tree_view_column_set_fixed_width(column, 50); | |
734 | |
735 renderer = gtk_cell_renderer_toggle_new(); | |
736 g_signal_connect(renderer, "toggled", | |
737 G_CALLBACK(effect_plugin_toggle), store); | |
738 gtk_tree_view_column_pack_start(column, renderer, TRUE); | |
739 gtk_tree_view_column_set_attributes(column, renderer, "active", | |
740 PLUGIN_VIEW_COL_ACTIVE, NULL); | |
741 | |
742 gtk_tree_view_append_column(treeview, column); | |
743 | |
744 column = gtk_tree_view_column_new(); | |
745 gtk_tree_view_column_set_title(column, _("Description")); | |
746 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); | |
747 gtk_tree_view_column_set_spacing(column, 4); | |
748 gtk_tree_view_column_set_resizable(column, TRUE); | |
749 | |
750 | |
751 renderer = gtk_cell_renderer_text_new(); | |
752 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
753 gtk_tree_view_column_set_attributes(column, renderer, | |
754 "text", PLUGIN_VIEW_COL_DESC, NULL); | |
755 | |
756 gtk_tree_view_append_column(treeview, column); | |
757 | |
758 | |
759 column = gtk_tree_view_column_new(); | |
760 gtk_tree_view_column_set_title(column, _("Filename")); | |
761 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); | |
762 gtk_tree_view_column_set_spacing(column, 4); | |
763 gtk_tree_view_column_set_resizable(column, TRUE); | |
764 | |
765 renderer = gtk_cell_renderer_text_new(); | |
766 gtk_tree_view_column_pack_start(column, renderer, TRUE); | |
767 gtk_tree_view_column_set_attributes(column, renderer, "text", | |
768 PLUGIN_VIEW_COL_FILENAME, NULL); | |
769 | |
770 gtk_tree_view_append_column(treeview, column); | |
771 | |
772 for (elist = get_effect_list(); elist; elist = g_list_next(elist)) { | |
773 EffectPlugin *ep = EFFECT_PLUGIN(elist->data); | |
774 | |
775 description[0] = g_strdup(ep->description); | |
776 description[1] = g_strdup(ep->filename); | |
777 | |
778 enabled = effect_enabled(id); | |
779 | |
780 gtk_list_store_append(store, &iter); | |
781 gtk_list_store_set(store, &iter, | |
782 PLUGIN_VIEW_COL_ACTIVE, enabled, | |
783 PLUGIN_VIEW_COL_DESC, description[0], | |
784 PLUGIN_VIEW_COL_FILENAME, description[1], | |
785 PLUGIN_VIEW_COL_ID, id++, -1); | |
786 | |
787 g_free(description[1]); | |
788 g_free(description[0]); | |
789 } | |
790 | |
791 gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(store)); | |
792 } | |
793 | |
794 static void | |
795 titlestring_tag_menu_callback(GtkMenuItem * menuitem, | |
796 gpointer data) | |
797 { | |
798 const gchar *separator = " - "; | |
799 GladeXML *xml; | |
800 GtkWidget *entry; | |
801 gint item = GPOINTER_TO_INT(data); | |
802 gint pos; | |
803 | |
804 xml = prefswin_get_xml(); | |
805 entry = glade_xml_get_widget(xml, "titlestring_entry"); | |
806 | |
807 pos = gtk_editable_get_position(GTK_EDITABLE(entry)); | |
808 | |
809 /* insert separator as needed */ | |
810 if (g_utf8_strlen(gtk_entry_get_text(GTK_ENTRY(entry)), -1) > 0) | |
811 editable_insert_text(GTK_EDITABLE(entry), separator, &pos); | |
812 | |
813 editable_insert_text(GTK_EDITABLE(entry), _(title_field_tags[item].tag), | |
814 &pos); | |
815 | |
816 gtk_editable_set_position(GTK_EDITABLE(entry), pos); | |
817 } | |
818 | |
819 static void | |
820 on_titlestring_help_button_clicked(GtkButton * button, | |
821 gpointer data) | |
822 { | |
823 | |
824 GtkMenu *menu; | |
825 MenuPos *pos = g_new0(MenuPos, 1); | |
826 GdkWindow *parent; | |
827 | |
828 gint x_ro, y_ro; | |
829 gint x_widget, y_widget; | |
830 gint x_size, y_size; | |
831 | |
832 g_return_if_fail (button != NULL); | |
833 g_return_if_fail (GTK_IS_MENU (data)); | |
834 | |
835 parent = gtk_widget_get_parent_window(GTK_WIDGET(button)); | |
836 | |
837 gdk_drawable_get_size(parent, &x_size, &y_size); | |
838 gdk_window_get_root_origin(GTK_WIDGET(button)->window, &x_ro, &y_ro); | |
839 gdk_window_get_position(GTK_WIDGET(button)->window, &x_widget, &y_widget); | |
840 | |
841 pos->x = x_size + x_ro; | |
842 pos->y = y_size + y_ro - 100; | |
843 | |
844 menu = GTK_MENU(data); | |
845 gtk_menu_popup (menu, NULL, NULL, util_menu_position, pos, | |
846 0, GDK_CURRENT_TIME); | |
847 } | |
848 | |
849 | |
850 static void | |
851 on_titlestring_entry_realize(GtkWidget * entry, | |
852 gpointer data) | |
853 { | |
854 gtk_entry_set_text(GTK_ENTRY(entry), cfg.gentitle_format); | |
855 } | |
856 | |
857 static void | |
858 on_titlestring_entry_changed(GtkWidget * entry, | |
859 gpointer data) | |
860 { | |
861 g_free(cfg.gentitle_format); | |
862 cfg.gentitle_format = g_strdup(gtk_entry_get_text(GTK_ENTRY(entry))); | |
863 } | |
864 | |
865 static void | |
866 on_titlestring_cbox_realize(GtkWidget * cbox, | |
867 gpointer data) | |
868 { | |
869 gtk_combo_box_set_active(GTK_COMBO_BOX(cbox), cfg.titlestring_preset); | |
870 gtk_widget_set_sensitive(GTK_WIDGET(data), | |
625
0a73d1faeb4e
[svn] GCC 4.1 warning fixes by Diego 'Flameeyes' Petteno from Gentoo.
chainsaw
parents:
383
diff
changeset
|
871 (cfg.titlestring_preset == (gint)n_titlestring_presets)); |
0 | 872 } |
873 | |
874 static void | |
875 on_titlestring_cbox_changed(GtkWidget * cbox, | |
876 gpointer data) | |
877 { | |
878 gint position = gtk_combo_box_get_active(GTK_COMBO_BOX(cbox)); | |
879 | |
880 cfg.titlestring_preset = position; | |
946
8cfe13fcd0c7
[svn] - Forgot a few things regarding titlestrings!
nhjm449
parents:
893
diff
changeset
|
881 gtk_widget_set_sensitive(GTK_WIDGET(data), (position == 6)); |
0 | 882 } |
883 | |
884 static void | |
885 on_mainwin_font_button_font_set(GtkFontButton * button, | |
886 gpointer data) | |
887 { | |
888 g_free(cfg.mainwin_font); | |
889 cfg.mainwin_font = g_strdup(gtk_font_button_get_font_name(button)); | |
890 | |
124
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
891 textbox_set_xfont(mainwin_info, cfg.mainwin_use_xfont, cfg.mainwin_font); |
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
892 mainwin_set_info_text(); |
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
893 draw_main_window(TRUE); |
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
894 } |
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
895 |
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
896 static void |
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
897 on_use_bitmap_fonts_realize(GtkToggleButton * button, |
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
898 gpointer data) |
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
899 { |
126
2d3d921a44e2
[svn] Fix realize function for the bitmap fonts option.
nenolod
parents:
124
diff
changeset
|
900 gtk_toggle_button_set_active(button, |
2d3d921a44e2
[svn] Fix realize function for the bitmap fonts option.
nenolod
parents:
124
diff
changeset
|
901 cfg.mainwin_use_xfont != FALSE ? FALSE : TRUE); |
124
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
902 } |
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
903 |
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
904 static void |
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
905 on_use_bitmap_fonts_toggled(GtkToggleButton * button, |
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
906 gpointer data) |
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
907 { |
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
908 gboolean useit = gtk_toggle_button_get_active(button); |
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
909 cfg.mainwin_use_xfont = useit != FALSE ? FALSE : TRUE; |
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
910 textbox_set_xfont(mainwin_info, cfg.mainwin_use_xfont, cfg.mainwin_font); |
1844
425214f1d86f
[svn] - Update shaded playlist font when toggling bitmap fonts.
nhjm449
parents:
1832
diff
changeset
|
911 playlistwin_set_sinfo_font(cfg.playlist_font); |
425214f1d86f
[svn] - Update shaded playlist font when toggling bitmap fonts.
nhjm449
parents:
1832
diff
changeset
|
912 |
0 | 913 mainwin_set_info_text(); |
914 draw_main_window(TRUE); | |
1846
cc910a778b5f
[svn] - Make sure to redraw shaded playlistwin when toggling bitmap fonts.
nhjm449
parents:
1844
diff
changeset
|
915 if (cfg.playlist_shaded) { |
cc910a778b5f
[svn] - Make sure to redraw shaded playlistwin when toggling bitmap fonts.
nhjm449
parents:
1844
diff
changeset
|
916 playlistwin_update_list(); |
cc910a778b5f
[svn] - Make sure to redraw shaded playlistwin when toggling bitmap fonts.
nhjm449
parents:
1844
diff
changeset
|
917 draw_playlist_window(TRUE); |
cc910a778b5f
[svn] - Make sure to redraw shaded playlistwin when toggling bitmap fonts.
nhjm449
parents:
1844
diff
changeset
|
918 } |
0 | 919 } |
920 | |
921 static void | |
922 on_mainwin_font_button_realize(GtkFontButton * button, | |
923 gpointer data) | |
924 { | |
925 gtk_font_button_set_font_name(button, cfg.mainwin_font); | |
926 } | |
927 | |
928 static void | |
929 on_playlist_font_button_font_set(GtkFontButton * button, | |
930 gpointer data) | |
931 { | |
932 g_free(cfg.playlist_font); | |
933 cfg.playlist_font = g_strdup(gtk_font_button_get_font_name(button)); | |
934 | |
935 playlist_list_set_font(cfg.playlist_font); | |
1775 | 936 playlistwin_set_sinfo_font(cfg.playlist_font); /* propagate font setting to playlistwin_sinfo */ |
0 | 937 playlistwin_update_list(); |
938 draw_playlist_window(TRUE); | |
939 } | |
940 | |
941 static void | |
942 on_playlist_font_button_realize(GtkFontButton * button, | |
943 gpointer data) | |
944 { | |
945 gtk_font_button_set_font_name(button, cfg.playlist_font); | |
946 } | |
947 | |
948 static void | |
949 on_playlist_show_pl_numbers_realize(GtkToggleButton * button, | |
950 gpointer data) | |
951 { | |
952 gtk_toggle_button_set_active(button, cfg.show_numbers_in_pl); | |
953 } | |
954 | |
955 static void | |
956 on_playlist_show_pl_numbers_toggled(GtkToggleButton * button, | |
957 gpointer data) | |
958 { | |
959 cfg.show_numbers_in_pl = gtk_toggle_button_get_active(button); | |
960 playlistwin_update_list(); | |
961 draw_playlist_window(TRUE); | |
962 } | |
963 | |
964 static void | |
1081 | 965 on_playlist_transparent_realize(GtkToggleButton * button, |
966 gpointer data) | |
967 { | |
968 gtk_toggle_button_set_active(button, cfg.playlist_transparent); | |
969 } | |
970 | |
971 static void | |
972 on_playlist_transparent_toggled(GtkToggleButton * button, | |
973 gpointer data) | |
974 { | |
975 cfg.playlist_transparent = gtk_toggle_button_get_active(button); | |
976 playlistwin_update_list(); | |
977 draw_playlist_window(TRUE); | |
978 } | |
979 | |
980 static void | |
1056
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
963
diff
changeset
|
981 on_playlist_show_pl_separator_realize(GtkToggleButton * button, |
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
963
diff
changeset
|
982 gpointer data) |
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
963
diff
changeset
|
983 { |
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
963
diff
changeset
|
984 gtk_toggle_button_set_active(button, cfg.show_separator_in_pl); |
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
963
diff
changeset
|
985 } |
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
963
diff
changeset
|
986 |
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
963
diff
changeset
|
987 static void |
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
963
diff
changeset
|
988 on_playlist_show_pl_separator_toggled(GtkToggleButton * button, |
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
963
diff
changeset
|
989 gpointer data) |
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
963
diff
changeset
|
990 { |
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
963
diff
changeset
|
991 cfg.show_separator_in_pl = gtk_toggle_button_get_active(button); |
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
963
diff
changeset
|
992 playlistwin_update_list(); |
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
963
diff
changeset
|
993 draw_playlist_window(TRUE); |
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
963
diff
changeset
|
994 } |
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
963
diff
changeset
|
995 |
1163
ff71f891265b
[svn] - Allow to do format detection on demand; instead of immediately on add
nenolod
parents:
1147
diff
changeset
|
996 /* format detection */ |
ff71f891265b
[svn] - Allow to do format detection on demand; instead of immediately on add
nenolod
parents:
1147
diff
changeset
|
997 static void |
ff71f891265b
[svn] - Allow to do format detection on demand; instead of immediately on add
nenolod
parents:
1147
diff
changeset
|
998 on_audio_format_det_cb_toggled(GtkToggleButton * button, |
ff71f891265b
[svn] - Allow to do format detection on demand; instead of immediately on add
nenolod
parents:
1147
diff
changeset
|
999 gpointer data) |
ff71f891265b
[svn] - Allow to do format detection on demand; instead of immediately on add
nenolod
parents:
1147
diff
changeset
|
1000 { |
ff71f891265b
[svn] - Allow to do format detection on demand; instead of immediately on add
nenolod
parents:
1147
diff
changeset
|
1001 cfg.playlist_detect = gtk_toggle_button_get_active(button); |
ff71f891265b
[svn] - Allow to do format detection on demand; instead of immediately on add
nenolod
parents:
1147
diff
changeset
|
1002 } |
ff71f891265b
[svn] - Allow to do format detection on demand; instead of immediately on add
nenolod
parents:
1147
diff
changeset
|
1003 |
ff71f891265b
[svn] - Allow to do format detection on demand; instead of immediately on add
nenolod
parents:
1147
diff
changeset
|
1004 static void |
ff71f891265b
[svn] - Allow to do format detection on demand; instead of immediately on add
nenolod
parents:
1147
diff
changeset
|
1005 on_audio_format_det_cb_realize(GtkToggleButton * button, |
ff71f891265b
[svn] - Allow to do format detection on demand; instead of immediately on add
nenolod
parents:
1147
diff
changeset
|
1006 gpointer data) |
ff71f891265b
[svn] - Allow to do format detection on demand; instead of immediately on add
nenolod
parents:
1147
diff
changeset
|
1007 { |
ff71f891265b
[svn] - Allow to do format detection on demand; instead of immediately on add
nenolod
parents:
1147
diff
changeset
|
1008 gtk_toggle_button_set_active(button, cfg.playlist_detect); |
ff71f891265b
[svn] - Allow to do format detection on demand; instead of immediately on add
nenolod
parents:
1147
diff
changeset
|
1009 } |
ff71f891265b
[svn] - Allow to do format detection on demand; instead of immediately on add
nenolod
parents:
1147
diff
changeset
|
1010 |
1070 | 1011 /* proxy */ |
1012 static void | |
1013 on_proxy_use_realize(GtkToggleButton * button, | |
1014 gpointer data) | |
1015 { | |
1016 ConfigDb *db; | |
1017 gboolean ret; | |
1018 | |
1019 db = bmp_cfg_db_open(); | |
1073 | 1020 |
1021 if (bmp_cfg_db_get_bool(db, NULL, "use_proxy", &ret) != FALSE) | |
1022 gtk_toggle_button_set_active(button, ret); | |
1023 | |
1070 | 1024 bmp_cfg_db_close(db); |
1025 } | |
1026 | |
1027 static void | |
1028 on_proxy_use_toggled(GtkToggleButton * button, | |
1029 gpointer data) | |
1030 { | |
1031 ConfigDb *db; | |
1032 gboolean ret = gtk_toggle_button_get_active(button); | |
1033 | |
1034 db = bmp_cfg_db_open(); | |
1035 bmp_cfg_db_set_bool(db, NULL, "use_proxy", ret); | |
1036 bmp_cfg_db_close(db); | |
1037 } | |
1038 | |
1039 static void | |
1040 on_proxy_auth_realize(GtkToggleButton * button, | |
1041 gpointer data) | |
1042 { | |
1043 ConfigDb *db; | |
1044 gboolean ret; | |
1045 | |
1046 db = bmp_cfg_db_open(); | |
1073 | 1047 |
1048 if (bmp_cfg_db_get_bool(db, NULL, "proxy_use_auth", &ret) != FALSE) | |
1049 gtk_toggle_button_set_active(button, ret); | |
1050 | |
1070 | 1051 bmp_cfg_db_close(db); |
1052 } | |
1053 | |
1054 static void | |
1055 on_proxy_auth_toggled(GtkToggleButton * button, | |
1056 gpointer data) | |
1057 { | |
1058 ConfigDb *db; | |
1059 gboolean ret = gtk_toggle_button_get_active(button); | |
1060 | |
1061 db = bmp_cfg_db_open(); | |
1062 bmp_cfg_db_set_bool(db, NULL, "proxy_use_auth", ret); | |
1063 bmp_cfg_db_close(db); | |
1064 } | |
1065 | |
1066 static void | |
1067 on_proxy_host_realize(GtkEntry * entry, | |
1068 gpointer data) | |
1069 { | |
1070 ConfigDb *db; | |
1071 gchar *ret; | |
1072 | |
1073 db = bmp_cfg_db_open(); | |
1074 | |
1073 | 1075 if (bmp_cfg_db_get_string(db, NULL, "proxy_host", &ret) != FALSE) |
1070 | 1076 gtk_entry_set_text(entry, ret); |
1073 | 1077 |
1078 bmp_cfg_db_close(db); | |
1070 | 1079 } |
1080 | |
1081 static void | |
1082 on_proxy_host_changed(GtkEntry * entry, | |
1083 gpointer data) | |
1084 { | |
1085 ConfigDb *db; | |
1086 gchar *ret = g_strdup(gtk_entry_get_text(entry)); | |
1087 | |
1088 db = bmp_cfg_db_open(); | |
1089 bmp_cfg_db_set_string(db, NULL, "proxy_host", ret); | |
1090 bmp_cfg_db_close(db); | |
1091 | |
1092 g_free(ret); | |
1093 } | |
1094 | |
1095 static void | |
1096 on_proxy_port_realize(GtkEntry * entry, | |
1097 gpointer data) | |
1098 { | |
1099 ConfigDb *db; | |
1100 gchar *ret; | |
1101 | |
1102 db = bmp_cfg_db_open(); | |
1103 | |
1073 | 1104 if (bmp_cfg_db_get_string(db, NULL, "proxy_port", &ret) != FALSE) |
1070 | 1105 gtk_entry_set_text(entry, ret); |
1073 | 1106 |
1107 bmp_cfg_db_close(db); | |
1070 | 1108 } |
1109 | |
1110 static void | |
1111 on_proxy_port_changed(GtkEntry * entry, | |
1112 gpointer data) | |
1113 { | |
1114 ConfigDb *db; | |
1115 gchar *ret = g_strdup(gtk_entry_get_text(entry)); | |
1116 | |
1117 db = bmp_cfg_db_open(); | |
1118 bmp_cfg_db_set_string(db, NULL, "proxy_port", ret); | |
1119 bmp_cfg_db_close(db); | |
1120 | |
1121 g_free(ret); | |
1122 } | |
1123 | |
1124 static void | |
1125 on_proxy_user_realize(GtkEntry * entry, | |
1126 gpointer data) | |
1127 { | |
1128 ConfigDb *db; | |
1129 gchar *ret; | |
1130 | |
1131 db = bmp_cfg_db_open(); | |
1132 | |
1073 | 1133 if (bmp_cfg_db_get_string(db, NULL, "proxy_user", &ret) != FALSE) |
1070 | 1134 gtk_entry_set_text(entry, ret); |
1073 | 1135 |
1136 bmp_cfg_db_close(db); | |
1070 | 1137 } |
1138 | |
1139 static void | |
1140 on_proxy_user_changed(GtkEntry * entry, | |
1141 gpointer data) | |
1142 { | |
1143 ConfigDb *db; | |
1144 gchar *ret = g_strdup(gtk_entry_get_text(entry)); | |
1145 | |
1146 db = bmp_cfg_db_open(); | |
1147 bmp_cfg_db_set_string(db, NULL, "proxy_user", ret); | |
1148 bmp_cfg_db_close(db); | |
1149 | |
1150 g_free(ret); | |
1151 } | |
1152 | |
1153 static void | |
1154 on_proxy_pass_realize(GtkEntry * entry, | |
1155 gpointer data) | |
1156 { | |
1157 ConfigDb *db; | |
1158 gchar *ret; | |
1159 | |
1160 db = bmp_cfg_db_open(); | |
1161 | |
1073 | 1162 if (bmp_cfg_db_get_string(db, NULL, "proxy_pass", &ret) != FALSE) |
1070 | 1163 gtk_entry_set_text(entry, ret); |
1073 | 1164 |
1165 bmp_cfg_db_close(db); | |
1070 | 1166 } |
1167 | |
1168 static void | |
1169 on_proxy_pass_changed(GtkEntry * entry, | |
1170 gpointer data) | |
1171 { | |
1172 ConfigDb *db; | |
1173 gchar *ret = g_strdup(gtk_entry_get_text(entry)); | |
1174 | |
1175 db = bmp_cfg_db_open(); | |
1176 bmp_cfg_db_set_string(db, NULL, "proxy_pass", ret); | |
1177 bmp_cfg_db_close(db); | |
1178 | |
1179 g_free(ret); | |
1180 } | |
1181 | |
1056
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
963
diff
changeset
|
1182 static void |
0 | 1183 input_plugin_enable_prefs(GtkTreeView * treeview, |
1184 GtkButton * button) | |
1185 { | |
1186 GtkTreeSelection *selection; | |
1187 GtkTreeModel *model; | |
1188 GtkTreeIter iter; | |
1189 | |
1190 GList *plist; | |
1191 gint id; | |
1192 | |
1193 selection = gtk_tree_view_get_selection(treeview); | |
1194 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
1195 return; | |
1196 | |
1197 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); | |
1198 | |
1199 plist = get_input_list(); | |
1200 plist = g_list_nth(plist, id); | |
1201 | |
1202 gtk_widget_set_sensitive(GTK_WIDGET(button), | |
1203 INPUT_PLUGIN(plist->data)->configure != NULL); | |
1204 } | |
1205 | |
1206 static void | |
1207 input_plugin_enable_info(GtkTreeView * treeview, | |
1208 GtkButton * button) | |
1209 { | |
1210 GtkTreeSelection *selection; | |
1211 GtkTreeModel *model; | |
1212 GtkTreeIter iter; | |
1213 GList *plist; | |
1214 gint id; | |
1215 | |
1216 selection = gtk_tree_view_get_selection(treeview); | |
1217 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
1218 return; | |
1219 | |
1220 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); | |
1221 | |
1222 plist = get_input_list(); | |
1223 plist = g_list_nth(plist, id); | |
1224 | |
1225 gtk_widget_set_sensitive(GTK_WIDGET(button), | |
1226 INPUT_PLUGIN(plist->data)->about != NULL); | |
1227 } | |
1228 | |
1229 | |
1230 static void | |
1231 output_plugin_enable_info(GtkComboBox * cbox, GtkButton * button) | |
1232 { | |
1233 GList *plist; | |
1234 | |
1235 gint id = gtk_combo_box_get_active(cbox); | |
1236 | |
1237 plist = get_output_list(); | |
1238 plist = g_list_nth(plist, id); | |
1239 | |
1240 gtk_widget_set_sensitive(GTK_WIDGET(button), | |
1241 OUTPUT_PLUGIN(plist->data)->about != NULL); | |
1242 } | |
1243 | |
1244 static void | |
1245 output_plugin_enable_prefs(GtkComboBox * cbox, GtkButton * button) | |
1246 { | |
1247 GList *plist; | |
1248 gint id = gtk_combo_box_get_active(cbox); | |
1249 | |
1250 plist = get_output_list(); | |
1251 plist = g_list_nth(plist, id); | |
1252 | |
1253 gtk_widget_set_sensitive(GTK_WIDGET(button), | |
1254 OUTPUT_PLUGIN(plist->data)->configure != NULL); | |
1255 } | |
1256 | |
1257 | |
1258 static void | |
1259 general_plugin_enable_info(GtkTreeView * treeview, | |
1260 GtkButton * button) | |
1261 { | |
1262 GtkTreeSelection *selection; | |
1263 GtkTreeModel *model; | |
1264 GtkTreeIter iter; | |
1265 GList *plist; | |
1266 gint id; | |
1267 | |
1268 selection = gtk_tree_view_get_selection(treeview); | |
1269 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
1270 return; | |
1271 | |
1272 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); | |
1273 | |
1274 plist = get_general_list(); | |
1275 plist = g_list_nth(plist, id); | |
1276 | |
1277 gtk_widget_set_sensitive(GTK_WIDGET(button), | |
1278 GENERAL_PLUGIN(plist->data)->about != NULL); | |
1279 } | |
1280 | |
1281 static void | |
1282 general_plugin_enable_prefs(GtkTreeView * treeview, | |
1283 GtkButton * button) | |
1284 { | |
1285 GtkTreeSelection *selection; | |
1286 GtkTreeModel *model; | |
1287 GtkTreeIter iter; | |
1288 GList *plist; | |
1289 gint id; | |
1290 | |
1291 selection = gtk_tree_view_get_selection(treeview); | |
1292 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
1293 return; | |
1294 | |
1295 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); | |
1296 | |
1297 plist = get_general_list(); | |
1298 plist = g_list_nth(plist, id); | |
1299 | |
1300 gtk_widget_set_sensitive(GTK_WIDGET(button), | |
1301 GENERAL_PLUGIN(plist->data)->configure != NULL); | |
1302 } | |
1303 | |
1304 | |
1305 | |
1306 static void | |
1307 vis_plugin_enable_prefs(GtkTreeView * treeview, | |
1308 GtkButton * button) | |
1309 { | |
1310 GtkTreeSelection *selection; | |
1311 GtkTreeModel *model; | |
1312 GtkTreeIter iter; | |
1313 GList *plist; | |
1314 gint id; | |
1315 | |
1316 selection = gtk_tree_view_get_selection(treeview); | |
1317 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
1318 return; | |
1319 | |
1320 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); | |
1321 | |
1322 plist = get_vis_list(); | |
1323 plist = g_list_nth(plist, id); | |
1324 | |
1325 gtk_widget_set_sensitive(GTK_WIDGET(button), | |
1326 VIS_PLUGIN(plist->data)->configure != NULL); | |
1327 } | |
1328 | |
1329 static void | |
1330 vis_plugin_enable_info(GtkTreeView * treeview, | |
1331 GtkButton * button) | |
1332 { | |
1333 GtkTreeSelection *selection; | |
1334 GtkTreeModel *model; | |
1335 GtkTreeIter iter; | |
1336 GList *plist; | |
1337 gint id; | |
1338 | |
1339 selection = gtk_tree_view_get_selection(treeview); | |
1340 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
1341 return; | |
1342 | |
1343 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); | |
1344 | |
1345 plist = get_vis_list(); | |
1346 plist = g_list_nth(plist, id); | |
1347 | |
1348 gtk_widget_set_sensitive(GTK_WIDGET(button), | |
1349 VIS_PLUGIN(plist->data)->about != NULL); | |
1350 } | |
1351 | |
1352 static void | |
1353 vis_plugin_open_prefs(GtkTreeView * treeview, | |
1354 gpointer data) | |
1355 { | |
1356 GtkTreeSelection *selection; | |
1357 GtkTreeModel *model; | |
1358 GtkTreeIter iter; | |
1359 gint id; | |
1360 | |
1361 selection = gtk_tree_view_get_selection(treeview); | |
1362 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
1363 return; | |
1364 | |
1365 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); | |
1366 vis_configure(id); | |
1367 } | |
1368 | |
1369 | |
1370 static void | |
1371 vis_plugin_open_info(GtkTreeView * treeview, | |
1372 gpointer data) | |
1373 { | |
1374 GtkTreeSelection *selection; | |
1375 GtkTreeModel *model; | |
1376 GtkTreeIter iter; | |
1377 gint id; | |
1378 | |
1379 selection = gtk_tree_view_get_selection(treeview); | |
1380 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
1381 return; | |
1382 | |
1383 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); | |
1384 vis_about(id); | |
1385 } | |
1386 | |
1387 | |
1388 | |
1389 | |
1390 | |
1391 | |
1392 static void | |
1393 effect_plugin_enable_prefs(GtkTreeView * treeview, | |
1394 GtkButton * button) | |
1395 { | |
1396 GtkTreeSelection *selection; | |
1397 GtkTreeModel *model; | |
1398 GtkTreeIter iter; | |
1399 GList *plist; | |
1400 gint id; | |
1401 | |
1402 selection = gtk_tree_view_get_selection(treeview); | |
1403 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
1404 return; | |
1405 | |
1406 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); | |
1407 | |
1408 plist = get_effect_list(); | |
1409 plist = g_list_nth(plist, id); | |
1410 | |
1411 gtk_widget_set_sensitive(GTK_WIDGET(button), | |
1412 EFFECT_PLUGIN(plist->data)->configure != NULL); | |
1413 } | |
1414 | |
1415 static void | |
1416 effect_plugin_enable_info(GtkTreeView * treeview, | |
1417 GtkButton * button) | |
1418 { | |
1419 GtkTreeSelection *selection; | |
1420 GtkTreeModel *model; | |
1421 GtkTreeIter iter; | |
1422 GList *plist; | |
1423 gint id; | |
1424 | |
1425 selection = gtk_tree_view_get_selection(treeview); | |
1426 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
1427 return; | |
1428 | |
1429 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); | |
1430 | |
1431 plist = get_effect_list(); | |
1432 plist = g_list_nth(plist, id); | |
1433 | |
1434 gtk_widget_set_sensitive(GTK_WIDGET(button), | |
1435 EFFECT_PLUGIN(plist->data)->about != NULL); | |
1436 } | |
1437 | |
1438 static void | |
1439 effect_plugin_open_prefs(GtkTreeView * treeview, | |
1440 gpointer data) | |
1441 { | |
1442 GtkTreeSelection *selection; | |
1443 GtkTreeModel *model; | |
1444 GtkTreeIter iter; | |
1445 gint id; | |
1446 | |
1447 selection = gtk_tree_view_get_selection(treeview); | |
1448 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
1449 return; | |
1450 | |
1451 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); | |
1452 effect_configure(id); | |
1453 } | |
1454 | |
1455 | |
1456 static void | |
1457 effect_plugin_open_info(GtkTreeView * treeview, | |
1458 gpointer data) | |
1459 { | |
1460 GtkTreeSelection *selection; | |
1461 GtkTreeModel *model; | |
1462 GtkTreeIter iter; | |
1463 gint id; | |
1464 | |
1465 selection = gtk_tree_view_get_selection(treeview); | |
1466 if (!gtk_tree_selection_get_selected(selection, &model, &iter)) | |
1467 return; | |
1468 | |
1469 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_ID, &id, -1); | |
1470 effect_about(id); | |
1471 } | |
1472 | |
1147 | 1473 static void |
1474 on_output_plugin_bufsize_realize(GtkSpinButton *button, | |
1475 gpointer data) | |
1476 { | |
1477 gtk_spin_button_set_value(button, cfg.output_buffer_size); | |
1478 } | |
0 | 1479 |
1147 | 1480 static void |
1481 on_output_plugin_bufsize_value_changed(GtkSpinButton *button, | |
1482 gpointer data) | |
1483 { | |
1484 cfg.output_buffer_size = gtk_spin_button_get_value_as_int(button); | |
1485 } | |
0 | 1486 |
1487 static void | |
1488 on_mouse_wheel_volume_realize(GtkSpinButton * button, | |
1489 gpointer data) | |
1490 { | |
1491 gtk_spin_button_set_value(button, cfg.mouse_change); | |
1492 } | |
1493 | |
1494 static void | |
1495 on_mouse_wheel_volume_changed(GtkSpinButton * button, | |
1496 gpointer data) | |
1497 { | |
1498 cfg.mouse_change = gtk_spin_button_get_value_as_int(button); | |
1499 } | |
1500 | |
1501 static void | |
1502 on_pause_between_songs_time_realize(GtkSpinButton * button, | |
1503 gpointer data) | |
1504 { | |
1505 gtk_spin_button_set_value(button, cfg.pause_between_songs_time); | |
1506 } | |
1507 | |
1508 static void | |
1509 on_pause_between_songs_time_changed(GtkSpinButton * button, | |
1510 gpointer data) | |
1511 { | |
1512 cfg.pause_between_songs_time = gtk_spin_button_get_value_as_int(button); | |
1513 } | |
1514 | |
1515 static void | |
1516 on_mouse_wheel_scroll_pl_realize(GtkSpinButton * button, | |
1517 gpointer data) | |
1518 { | |
1519 gtk_spin_button_set_value(button, cfg.scroll_pl_by); | |
1520 } | |
1521 | |
1522 static void | |
1523 on_mouse_wheel_scroll_pl_changed(GtkSpinButton * button, | |
1524 gpointer data) | |
1525 { | |
1526 cfg.scroll_pl_by = gtk_spin_button_get_value_as_int(button); | |
1527 } | |
1528 | |
1529 static void | |
1530 on_playlist_convert_underscore_realize(GtkToggleButton * button, | |
1531 gpointer data) | |
1532 { | |
1533 gtk_toggle_button_set_active(button, cfg.convert_underscore); | |
1534 } | |
1535 | |
1536 static void | |
1537 on_playlist_convert_underscore_toggled(GtkToggleButton * button, | |
1538 gpointer data) | |
1539 { | |
1540 cfg.convert_underscore = gtk_toggle_button_get_active(button); | |
1541 } | |
1542 | |
1543 static void | |
1544 on_playlist_no_advance_realize(GtkToggleButton * button, gpointer data) | |
1545 { | |
1546 gtk_toggle_button_set_active(button, cfg.no_playlist_advance); | |
1547 } | |
1548 | |
1549 static void | |
1550 on_playlist_no_advance_toggled(GtkToggleButton * button, gpointer data) | |
1551 { | |
1552 cfg.no_playlist_advance = gtk_toggle_button_get_active(button); | |
1553 } | |
1554 | |
1555 static void | |
1382 | 1556 on_continue_playback_on_startup_realize(GtkToggleButton * button, gpointer data) |
1557 { | |
1558 gtk_toggle_button_set_active(button, cfg.resume_playback_on_startup); | |
1559 } | |
1560 | |
1561 static void | |
1562 on_continue_playback_on_startup_toggled(GtkToggleButton * button, gpointer data) | |
1563 { | |
1564 cfg.resume_playback_on_startup = gtk_toggle_button_get_active(button); | |
1565 } | |
1566 | |
1567 static void | |
893
6afdd0d7e1e1
[svn] Make refreshing optional, default to disabled if Gnome VFS available.
nemo
parents:
887
diff
changeset
|
1568 on_refresh_file_list_realize(GtkToggleButton * button, gpointer data) |
6afdd0d7e1e1
[svn] Make refreshing optional, default to disabled if Gnome VFS available.
nemo
parents:
887
diff
changeset
|
1569 { |
6afdd0d7e1e1
[svn] Make refreshing optional, default to disabled if Gnome VFS available.
nemo
parents:
887
diff
changeset
|
1570 gtk_toggle_button_set_active(button, cfg.refresh_file_list); |
6afdd0d7e1e1
[svn] Make refreshing optional, default to disabled if Gnome VFS available.
nemo
parents:
887
diff
changeset
|
1571 } |
6afdd0d7e1e1
[svn] Make refreshing optional, default to disabled if Gnome VFS available.
nemo
parents:
887
diff
changeset
|
1572 |
6afdd0d7e1e1
[svn] Make refreshing optional, default to disabled if Gnome VFS available.
nemo
parents:
887
diff
changeset
|
1573 static void |
6afdd0d7e1e1
[svn] Make refreshing optional, default to disabled if Gnome VFS available.
nemo
parents:
887
diff
changeset
|
1574 on_refresh_file_list_toggled(GtkToggleButton * button, gpointer data) |
6afdd0d7e1e1
[svn] Make refreshing optional, default to disabled if Gnome VFS available.
nemo
parents:
887
diff
changeset
|
1575 { |
6afdd0d7e1e1
[svn] Make refreshing optional, default to disabled if Gnome VFS available.
nemo
parents:
887
diff
changeset
|
1576 cfg.refresh_file_list = gtk_toggle_button_get_active(button); |
6afdd0d7e1e1
[svn] Make refreshing optional, default to disabled if Gnome VFS available.
nemo
parents:
887
diff
changeset
|
1577 } |
6afdd0d7e1e1
[svn] Make refreshing optional, default to disabled if Gnome VFS available.
nemo
parents:
887
diff
changeset
|
1578 |
6afdd0d7e1e1
[svn] Make refreshing optional, default to disabled if Gnome VFS available.
nemo
parents:
887
diff
changeset
|
1579 static void |
0 | 1580 on_playlist_convert_twenty_realize(GtkToggleButton * button, gpointer data) |
1581 { | |
1582 gtk_toggle_button_set_active(button, cfg.convert_twenty); | |
1583 } | |
1584 | |
1585 static void | |
1586 on_playlist_convert_twenty_toggled(GtkToggleButton * button, gpointer data) | |
1587 { | |
1588 cfg.convert_twenty = gtk_toggle_button_get_active(button); | |
1589 } | |
1590 | |
1591 #if 0 | |
1592 static void | |
1593 on_playlist_update_clicked(GtkButton * button, | |
1594 gpointer data) | |
1595 { | |
1596 playlistwin_update_list(); | |
1597 draw_playlist_window(TRUE); | |
1598 } | |
1599 #endif | |
1600 | |
1601 static void | |
1602 on_use_pl_metadata_realize(GtkToggleButton * button, | |
1603 gpointer data) | |
1604 { | |
1605 gboolean state = cfg.use_pl_metadata; | |
1606 gtk_toggle_button_set_active(button, state); | |
1607 gtk_widget_set_sensitive(GTK_WIDGET(data), state); | |
1608 } | |
1609 | |
1610 static void | |
1611 on_use_pl_metadata_toggled(GtkToggleButton * button, | |
1612 gpointer data) | |
1613 { | |
1614 gboolean state = gtk_toggle_button_get_active(button); | |
1615 cfg.use_pl_metadata = state; | |
1616 gtk_widget_set_sensitive(GTK_WIDGET(data), state); | |
1617 } | |
1618 | |
1619 static void | |
1620 on_pause_between_songs_realize(GtkToggleButton * button, | |
1621 gpointer data) | |
1622 { | |
1623 gboolean state = cfg.pause_between_songs; | |
1624 gtk_toggle_button_set_active(button, state); | |
1625 gtk_widget_set_sensitive(GTK_WIDGET(data), state); | |
1626 } | |
1627 | |
1628 static void | |
1629 on_pause_between_songs_toggled(GtkToggleButton * button, | |
1630 gpointer data) | |
1631 { | |
1632 gboolean state = gtk_toggle_button_get_active(button); | |
1633 cfg.pause_between_songs = state; | |
1634 gtk_widget_set_sensitive(GTK_WIDGET(data), state); | |
1635 } | |
1636 | |
1637 static void | |
1638 on_pl_metadata_on_load_realize(GtkRadioButton * button, | |
1639 gpointer data) | |
1640 { | |
1641 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), | |
1642 cfg.get_info_on_load); | |
1643 } | |
1644 | |
1645 static void | |
1646 on_pl_metadata_on_display_realize(GtkRadioButton * button, | |
1647 gpointer data) | |
1648 { | |
1649 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), | |
1650 cfg.get_info_on_demand); | |
1651 } | |
1652 | |
1653 static void | |
1654 on_pl_metadata_on_load_toggled(GtkRadioButton * button, | |
1655 gpointer data) | |
1656 { | |
1657 cfg.get_info_on_load = | |
1658 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)); | |
1659 } | |
1660 | |
1661 static void | |
1662 on_pl_metadata_on_display_toggled(GtkRadioButton * button, | |
1663 gpointer data) | |
1664 { | |
1665 cfg.get_info_on_demand = | |
1666 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)); | |
1667 } | |
1668 | |
1669 static void | |
1670 on_custom_cursors_realize(GtkToggleButton * button, | |
1671 gpointer data) | |
1672 { | |
1673 gtk_toggle_button_set_active(button, cfg.custom_cursors); | |
1674 } | |
1675 | |
1676 static void | |
1677 on_custom_cursors_toggled(GtkToggleButton *togglebutton, | |
1678 gpointer data) | |
1679 { | |
1680 cfg.custom_cursors = gtk_toggle_button_get_active(togglebutton); | |
1681 skin_reload_forced(); | |
1682 } | |
1683 | |
1684 static void | |
1685 on_eq_dir_preset_entry_realize(GtkEntry * entry, | |
1686 gpointer data) | |
1687 { | |
1688 gtk_entry_set_text(entry, cfg.eqpreset_default_file); | |
1689 } | |
1690 | |
1691 static void | |
1692 on_eq_dir_preset_entry_changed(GtkEntry * entry, | |
1693 gpointer data) | |
1694 { | |
1695 g_free(cfg.eqpreset_default_file); | |
1696 cfg.eqpreset_default_file = g_strdup(gtk_entry_get_text(entry)); | |
1697 } | |
1698 | |
1699 static void | |
1700 on_eq_file_preset_entry_realize(GtkEntry * entry, | |
1701 gpointer data) | |
1702 { | |
1703 gtk_entry_set_text(entry, cfg.eqpreset_extension); | |
1704 } | |
1705 | |
1706 static void | |
1707 on_eq_file_preset_entry_changed(GtkEntry * entry, gpointer data) | |
1708 { | |
1709 const gchar *text = gtk_entry_get_text(entry); | |
1710 | |
1711 while (*text == '.') | |
1712 text++; | |
1713 | |
1714 g_free(cfg.eqpreset_extension); | |
1715 cfg.eqpreset_extension = g_strdup(text); | |
1716 } | |
1717 | |
1718 | |
1719 /* FIXME: implement these */ | |
1720 | |
1721 static void | |
1722 on_eq_preset_view_realize(GtkTreeView * treeview, | |
1723 gpointer data) | |
1724 {} | |
1725 | |
1726 static void | |
1727 on_eq_preset_add_clicked(GtkButton * button, | |
1728 gpointer data) | |
1729 {} | |
1730 | |
1731 static void | |
1732 on_eq_preset_remove_clicked(GtkButton * button, | |
1733 gpointer data) | |
1734 {} | |
1735 | |
887 | 1736 static void |
1737 on_skin_refresh_button_clicked(GtkButton * button, | |
1738 gpointer data) | |
1739 { | |
1740 GladeXML *xml; | |
962
a341792533a6
[svn] - Let's not let the user press the skin refresh button while already refreshing ;)
nhjm449
parents:
954
diff
changeset
|
1741 GtkWidget *widget, *widget2; |
887 | 1742 |
1743 const mode_t mode755 = S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; | |
1744 | |
1745 del_directory(bmp_paths[BMP_PATH_SKIN_THUMB_DIR]); | |
1746 make_directory(bmp_paths[BMP_PATH_SKIN_THUMB_DIR], mode755); | |
1747 | |
1748 xml = prefswin_get_xml(); | |
1749 | |
1750 widget = glade_xml_get_widget(xml, "skin_view"); | |
962
a341792533a6
[svn] - Let's not let the user press the skin refresh button while already refreshing ;)
nhjm449
parents:
954
diff
changeset
|
1751 widget2 = glade_xml_get_widget(xml, "skin_refresh_button"); |
a341792533a6
[svn] - Let's not let the user press the skin refresh button while already refreshing ;)
nhjm449
parents:
954
diff
changeset
|
1752 skin_view_update(GTK_TREE_VIEW(widget), GTK_WIDGET(widget2)); |
887 | 1753 } |
0 | 1754 |
1755 static gboolean | |
1832 | 1756 on_skin_view_realize(GtkTreeView * treeview, |
1757 gpointer data) | |
0 | 1758 { |
962
a341792533a6
[svn] - Let's not let the user press the skin refresh button while already refreshing ;)
nhjm449
parents:
954
diff
changeset
|
1759 GladeXML *xml; |
a341792533a6
[svn] - Let's not let the user press the skin refresh button while already refreshing ;)
nhjm449
parents:
954
diff
changeset
|
1760 GtkWidget *widget; |
a341792533a6
[svn] - Let's not let the user press the skin refresh button while already refreshing ;)
nhjm449
parents:
954
diff
changeset
|
1761 |
a341792533a6
[svn] - Let's not let the user press the skin refresh button while already refreshing ;)
nhjm449
parents:
954
diff
changeset
|
1762 xml = prefswin_get_xml(); |
a341792533a6
[svn] - Let's not let the user press the skin refresh button while already refreshing ;)
nhjm449
parents:
954
diff
changeset
|
1763 widget = glade_xml_get_widget(xml, "skin_refresh_button"); |
1832 | 1764 skin_view_realize(treeview); |
962
a341792533a6
[svn] - Let's not let the user press the skin refresh button while already refreshing ;)
nhjm449
parents:
954
diff
changeset
|
1765 skin_view_update(treeview, GTK_WIDGET(widget)); |
0 | 1766 |
1767 return TRUE; | |
1768 } | |
1769 | |
1770 static void | |
1771 on_category_view_realize(GtkTreeView * treeview, | |
1772 GtkNotebook * notebook) | |
1773 { | |
1774 GtkListStore *store; | |
1775 GtkCellRenderer *renderer; | |
1776 GtkTreeViewColumn *column; | |
1777 GtkTreeSelection *selection; | |
1778 GtkTreeIter iter; | |
1779 GdkPixbuf *img; | |
1352
8b249765fdd1
[svn] - GList cannot handle circular queues, so I integrated one into CategoryQueueEntry. No fuss, no muss.
nenolod
parents:
1188
diff
changeset
|
1780 CategoryQueueEntry *qlist; |
0 | 1781 gint i; |
1782 | |
1783 column = gtk_tree_view_column_new(); | |
1784 gtk_tree_view_column_set_title(column, _("Category")); | |
1785 gtk_tree_view_append_column(treeview, column); | |
1786 gtk_tree_view_column_set_spacing(column, 2); | |
1787 | |
1788 renderer = gtk_cell_renderer_pixbuf_new(); | |
1789 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
1790 gtk_tree_view_column_set_attributes(column, renderer, "pixbuf", 0, NULL); | |
1791 | |
1792 renderer = gtk_cell_renderer_text_new(); | |
1793 gtk_tree_view_column_pack_start(column, renderer, FALSE); | |
1794 gtk_tree_view_column_set_attributes(column, renderer, "text", 1, NULL); | |
1795 | |
1796 store = gtk_list_store_new(CATEGORY_VIEW_N_COLS, | |
1797 GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_INT); | |
1798 gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(store)); | |
1799 | |
1800 for (i = 0; i < n_categories; i++) { | |
1801 img = gdk_pixbuf_new_from_file(categories[i].icon_path, NULL); | |
1802 gtk_list_store_append(store, &iter); | |
1803 gtk_list_store_set(store, &iter, | |
1804 CATEGORY_VIEW_COL_ICON, img, | |
1805 CATEGORY_VIEW_COL_NAME, | |
1806 gettext(categories[i].name), CATEGORY_VIEW_COL_ID, | |
1807 categories[i].id, -1); | |
1808 g_object_unref(img); | |
1809 } | |
1810 | |
1811 selection = gtk_tree_view_get_selection(treeview); | |
1812 | |
1813 g_signal_connect_swapped(selection, "changed", | |
1814 G_CALLBACK(change_category), notebook); | |
1175 | 1815 |
1816 /* mark the treeview widget as available to third party plugins */ | |
1817 category_treeview = GTK_WIDGET(treeview); | |
1184
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
1818 |
1352
8b249765fdd1
[svn] - GList cannot handle circular queues, so I integrated one into CategoryQueueEntry. No fuss, no muss.
nenolod
parents:
1188
diff
changeset
|
1819 /* prefswin_page_queue_destroy already pops the queue forward for us. */ |
8b249765fdd1
[svn] - GList cannot handle circular queues, so I integrated one into CategoryQueueEntry. No fuss, no muss.
nenolod
parents:
1188
diff
changeset
|
1820 for (qlist = category_queue; qlist != NULL; qlist = category_queue) |
1184
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
1821 { |
1352
8b249765fdd1
[svn] - GList cannot handle circular queues, so I integrated one into CategoryQueueEntry. No fuss, no muss.
nenolod
parents:
1188
diff
changeset
|
1822 CategoryQueueEntry *ent = (CategoryQueueEntry *) qlist; |
1184
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
1823 |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
1824 prefswin_page_new(ent->container, ent->pg_name, ent->img_url); |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
1825 prefswin_page_queue_destroy(ent); |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
1826 } |
0 | 1827 } |
1828 | |
1829 static void | |
1830 mainwin_drag_data_received1(GtkWidget * widget, | |
1831 GdkDragContext * context, | |
1832 gint x, gint y, | |
1833 GtkSelectionData * selection_data, | |
1834 guint info, guint time, | |
1835 gpointer user_data) | |
1836 { | |
1837 gchar *path, *decoded; | |
1838 | |
1839 if (!selection_data->data) { | |
1840 g_warning("DND data string is NULL"); | |
1841 return; | |
1842 } | |
1843 | |
1844 path = (gchar *) selection_data->data; | |
1845 | |
1846 /* FIXME: use a real URL validator/parser */ | |
1847 | |
1848 if (!str_has_prefix_nocase(path, "fonts:///")) | |
1849 return; | |
1850 | |
1851 path[strlen(path) - 2] = 0; /* Why the hell a CR&LF? */ | |
1852 path += 8; | |
1853 | |
1854 /* plain, since we already stripped the first URI part */ | |
1855 decoded = xmms_urldecode_plain(path); | |
1856 | |
1857 /* Get the old font's size, and add it to the dropped | |
1858 * font's name */ | |
1859 cfg.playlist_font = g_strconcat(decoded+1, | |
1860 strrchr(cfg.playlist_font, ' '), | |
1861 NULL); | |
1862 playlist_list_set_font(cfg.playlist_font); | |
1863 playlistwin_update_list(); | |
1864 gtk_font_button_set_font_name(user_data, cfg.playlist_font); | |
1865 | |
1866 g_free(decoded); | |
1867 } | |
1868 | |
1869 static void | |
1870 on_skin_view_drag_data_received(GtkWidget * widget, | |
1871 GdkDragContext * context, | |
1872 gint x, gint y, | |
1873 GtkSelectionData * selection_data, | |
1874 guint info, guint time, | |
1875 gpointer user_data) | |
1876 { | |
1877 ConfigDb *db; | |
1878 gchar *path; | |
1879 | |
962
a341792533a6
[svn] - Let's not let the user press the skin refresh button while already refreshing ;)
nhjm449
parents:
954
diff
changeset
|
1880 GladeXML *xml; |
a341792533a6
[svn] - Let's not let the user press the skin refresh button while already refreshing ;)
nhjm449
parents:
954
diff
changeset
|
1881 GtkWidget *widget2; |
a341792533a6
[svn] - Let's not let the user press the skin refresh button while already refreshing ;)
nhjm449
parents:
954
diff
changeset
|
1882 |
0 | 1883 if (!selection_data->data) { |
1884 g_warning("DND data string is NULL"); | |
1885 return; | |
1886 } | |
1887 | |
1888 path = (gchar *) selection_data->data; | |
1889 | |
1890 /* FIXME: use a real URL validator/parser */ | |
1891 | |
1892 if (str_has_prefix_nocase(path, "file:///")) { | |
1893 path[strlen(path) - 2] = 0; /* Why the hell a CR&LF? */ | |
1894 path += 7; | |
1895 } | |
1896 else if (str_has_prefix_nocase(path, "file:")) { | |
1897 path += 5; | |
1898 } | |
1899 | |
1900 if (file_is_archive(path)) { | |
1901 bmp_active_skin_load(path); | |
1902 skin_install_skin(path); | |
962
a341792533a6
[svn] - Let's not let the user press the skin refresh button while already refreshing ;)
nhjm449
parents:
954
diff
changeset
|
1903 xml = prefswin_get_xml(); |
a341792533a6
[svn] - Let's not let the user press the skin refresh button while already refreshing ;)
nhjm449
parents:
954
diff
changeset
|
1904 widget2 = glade_xml_get_widget(xml, "skin_refresh_button"); |
a341792533a6
[svn] - Let's not let the user press the skin refresh button while already refreshing ;)
nhjm449
parents:
954
diff
changeset
|
1905 skin_view_update(GTK_TREE_VIEW(widget), GTK_WIDGET(widget2)); |
0 | 1906 /* Change skin name in the config file */ |
1907 db = bmp_cfg_db_open(); | |
1908 bmp_cfg_db_set_string(db, NULL, "skin", path); | |
1909 bmp_cfg_db_close(db); | |
1910 } | |
1911 | |
1912 } | |
1913 | |
1105
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1914 static void |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1915 on_chardet_detector_cbox_changed(GtkComboBox * combobox, gpointer data) |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1916 { |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1917 ConfigDb *db; |
1761
70caa62ead63
[svn] - fix for "bmp_rcfile_write_string: assertion `value != NULL' failed"
yaz
parents:
1758
diff
changeset
|
1918 gint position = 0; |
1105
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1919 |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1920 position = gtk_combo_box_get_active(GTK_COMBO_BOX(combobox)); |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1921 cfg.chardet_detector = (char *)chardet_detector_presets[position]; |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1922 |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1923 db = bmp_cfg_db_open(); |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1924 bmp_cfg_db_set_string(db, NULL, "chardet_detector", cfg.chardet_detector); |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1925 bmp_cfg_db_close(db); |
1864 | 1926 if (data != NULL) |
1927 gtk_widget_set_sensitive(GTK_WIDGET(data), 1); | |
1105
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1928 } |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1929 |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1930 static void |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1931 on_chardet_detector_cbox_realize(GtkComboBox *combobox, gpointer data) |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1932 { |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1933 ConfigDb *db; |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1934 gchar *ret=NULL; |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1935 guint i=0,index=0; |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1936 |
1109
95365899992e
[svn] - audacious should pick runtime library up from ${libdir}.
yaz
parents:
1105
diff
changeset
|
1937 for(i=0; i<n_chardet_detector_presets; i++) { |
95365899992e
[svn] - audacious should pick runtime library up from ${libdir}.
yaz
parents:
1105
diff
changeset
|
1938 gtk_combo_box_append_text(combobox, chardet_detector_presets[i]); |
95365899992e
[svn] - audacious should pick runtime library up from ${libdir}.
yaz
parents:
1105
diff
changeset
|
1939 } |
95365899992e
[svn] - audacious should pick runtime library up from ${libdir}.
yaz
parents:
1105
diff
changeset
|
1940 |
1105
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1941 db = bmp_cfg_db_open(); |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1942 if(bmp_cfg_db_get_string(db, NULL, "chardet_detector", &ret) != FALSE) { |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1943 for(i=0; i<n_chardet_detector_presets; i++) { |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1944 if(!strcmp(chardet_detector_presets[i], ret)) { |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1945 cfg.chardet_detector = (char *)chardet_detector_presets[i]; |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1946 index = i; |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1947 } |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1948 } |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1949 } |
1109
95365899992e
[svn] - audacious should pick runtime library up from ${libdir}.
yaz
parents:
1105
diff
changeset
|
1950 bmp_cfg_db_close(db); |
95365899992e
[svn] - audacious should pick runtime library up from ${libdir}.
yaz
parents:
1105
diff
changeset
|
1951 |
1105
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1952 #ifdef USE_CHARDET |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1953 gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), index); |
1864 | 1954 |
1955 if (data != NULL) | |
1956 gtk_widget_set_sensitive(GTK_WIDGET(data), TRUE); | |
1957 | |
1105
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1958 g_signal_connect(combobox, "changed", |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1959 G_CALLBACK(on_chardet_detector_cbox_changed), NULL); |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1960 #else |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1961 gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), -1); |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1962 gtk_widget_set_sensitive(GTK_WIDGET(combobox), 0); |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1963 #endif |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1964 if(ret) |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1965 g_free(ret); |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1966 } |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1967 |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1968 static void |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1969 on_chardet_fallback_realize(GtkEntry *entry, gpointer data) |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1970 { |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1971 ConfigDb *db; |
1758
6b9e1c2b2b32
[svn] - fix for gconf_value_get_string() does not accept null string.
yaz
parents:
1609
diff
changeset
|
1972 gchar *ret = NULL; |
1105
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1973 |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1974 db = bmp_cfg_db_open(); |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1975 |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1976 if (bmp_cfg_db_get_string(db, NULL, "chardet_fallback", &ret) != FALSE) { |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1977 if(cfg.chardet_fallback) |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1978 g_free(cfg.chardet_fallback); |
1758
6b9e1c2b2b32
[svn] - fix for gconf_value_get_string() does not accept null string.
yaz
parents:
1609
diff
changeset
|
1979 |
6b9e1c2b2b32
[svn] - fix for gconf_value_get_string() does not accept null string.
yaz
parents:
1609
diff
changeset
|
1980 if(ret && strncasecmp(ret, "None", sizeof("None"))) { |
6b9e1c2b2b32
[svn] - fix for gconf_value_get_string() does not accept null string.
yaz
parents:
1609
diff
changeset
|
1981 cfg.chardet_fallback = ret; |
6b9e1c2b2b32
[svn] - fix for gconf_value_get_string() does not accept null string.
yaz
parents:
1609
diff
changeset
|
1982 } else { |
6b9e1c2b2b32
[svn] - fix for gconf_value_get_string() does not accept null string.
yaz
parents:
1609
diff
changeset
|
1983 cfg.chardet_fallback = g_strdup(""); |
6b9e1c2b2b32
[svn] - fix for gconf_value_get_string() does not accept null string.
yaz
parents:
1609
diff
changeset
|
1984 } |
1105
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1985 gtk_entry_set_text(entry, cfg.chardet_fallback); |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1986 } |
1758
6b9e1c2b2b32
[svn] - fix for gconf_value_get_string() does not accept null string.
yaz
parents:
1609
diff
changeset
|
1987 |
1105
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1988 bmp_cfg_db_close(db); |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1989 } |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1990 |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1991 static void |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1992 on_chardet_fallback_changed(GtkEntry *entry, gpointer data) |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1993 { |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1994 ConfigDb *db; |
1761
70caa62ead63
[svn] - fix for "bmp_rcfile_write_string: assertion `value != NULL' failed"
yaz
parents:
1758
diff
changeset
|
1995 gchar *ret = NULL; |
1105
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1996 |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1997 if(cfg.chardet_fallback) |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
1998 g_free(cfg.chardet_fallback); |
1758
6b9e1c2b2b32
[svn] - fix for gconf_value_get_string() does not accept null string.
yaz
parents:
1609
diff
changeset
|
1999 |
1761
70caa62ead63
[svn] - fix for "bmp_rcfile_write_string: assertion `value != NULL' failed"
yaz
parents:
1758
diff
changeset
|
2000 ret = g_strdup(gtk_entry_get_text(entry)); |
70caa62ead63
[svn] - fix for "bmp_rcfile_write_string: assertion `value != NULL' failed"
yaz
parents:
1758
diff
changeset
|
2001 |
70caa62ead63
[svn] - fix for "bmp_rcfile_write_string: assertion `value != NULL' failed"
yaz
parents:
1758
diff
changeset
|
2002 if(ret == NULL) |
70caa62ead63
[svn] - fix for "bmp_rcfile_write_string: assertion `value != NULL' failed"
yaz
parents:
1758
diff
changeset
|
2003 cfg.chardet_fallback = g_strdup(""); |
70caa62ead63
[svn] - fix for "bmp_rcfile_write_string: assertion `value != NULL' failed"
yaz
parents:
1758
diff
changeset
|
2004 else |
70caa62ead63
[svn] - fix for "bmp_rcfile_write_string: assertion `value != NULL' failed"
yaz
parents:
1758
diff
changeset
|
2005 cfg.chardet_fallback = ret; |
1105
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
2006 |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
2007 db = bmp_cfg_db_open(); |
1758
6b9e1c2b2b32
[svn] - fix for gconf_value_get_string() does not accept null string.
yaz
parents:
1609
diff
changeset
|
2008 |
1761
70caa62ead63
[svn] - fix for "bmp_rcfile_write_string: assertion `value != NULL' failed"
yaz
parents:
1758
diff
changeset
|
2009 if(cfg.chardet_fallback == NULL || !strcmp(cfg.chardet_fallback, "")) |
1758
6b9e1c2b2b32
[svn] - fix for gconf_value_get_string() does not accept null string.
yaz
parents:
1609
diff
changeset
|
2010 bmp_cfg_db_set_string(db, NULL, "chardet_fallback", "None"); |
6b9e1c2b2b32
[svn] - fix for gconf_value_get_string() does not accept null string.
yaz
parents:
1609
diff
changeset
|
2011 else |
6b9e1c2b2b32
[svn] - fix for gconf_value_get_string() does not accept null string.
yaz
parents:
1609
diff
changeset
|
2012 bmp_cfg_db_set_string(db, NULL, "chardet_fallback", cfg.chardet_fallback); |
6b9e1c2b2b32
[svn] - fix for gconf_value_get_string() does not accept null string.
yaz
parents:
1609
diff
changeset
|
2013 |
1105
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
2014 bmp_cfg_db_close(db); |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
2015 } |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
2016 |
1358 | 2017 static void |
2018 on_show_filepopup_for_tuple_realize(GtkToggleButton * button, gpointer data) | |
2019 { | |
1413 | 2020 GladeXML *xml = prefswin_get_xml(); |
2021 GtkWidget *settings_button = glade_xml_get_widget(xml, "filepopup_for_tuple_settings_button"); | |
2022 | |
1358 | 2023 gtk_toggle_button_set_active(button, cfg.show_filepopup_for_tuple); |
1388
b8e521f642e4
[svn] - when the playlist page of the preferences window is shown, the checkbox for filepopup follows the popup menu now.
yaz
parents:
1384
diff
changeset
|
2024 filepopupbutton = (GtkWidget *)button; |
1413 | 2025 |
2026 gtk_widget_set_sensitive(settings_button, cfg.show_filepopup_for_tuple); | |
1358 | 2027 } |
2028 | |
2029 static void | |
2030 on_show_filepopup_for_tuple_toggled(GtkToggleButton * button, gpointer data) | |
2031 { | |
1413 | 2032 GladeXML *xml = prefswin_get_xml(); |
2033 GtkWidget *settings_button = glade_xml_get_widget(xml, "filepopup_for_tuple_settings_button"); | |
2034 | |
1358 | 2035 cfg.show_filepopup_for_tuple = gtk_toggle_button_get_active(button); |
1413 | 2036 |
2037 gtk_widget_set_sensitive(settings_button, cfg.show_filepopup_for_tuple); | |
2038 } | |
2039 | |
2040 static void | |
1889
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2041 on_recurse_for_cover_toggled(GtkToggleButton *button, gpointer data) |
1413 | 2042 { |
1889
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2043 gtk_widget_set_sensitive(GTK_WIDGET(data), |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2044 gtk_toggle_button_get_active(button)); |
1429
a360afd8df52
[svn] Make annoying recursion that consistently returns wrong art, optional.
nemo
parents:
1413
diff
changeset
|
2045 } |
a360afd8df52
[svn] Make annoying recursion that consistently returns wrong art, optional.
nemo
parents:
1413
diff
changeset
|
2046 |
a360afd8df52
[svn] Make annoying recursion that consistently returns wrong art, optional.
nemo
parents:
1413
diff
changeset
|
2047 static void |
1889
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2048 on_filepopup_for_tuple_settings_clicked(GtkButton *button, gpointer data) |
1429
a360afd8df52
[svn] Make annoying recursion that consistently returns wrong art, optional.
nemo
parents:
1413
diff
changeset
|
2049 { |
1889
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2050 GladeXML *xml = prefswin_get_xml(); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2051 GtkWidget *widget, *widget2; |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2052 |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2053 widget = glade_xml_get_widget(xml, "filepopup_settings_cover_name_include"); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2054 gtk_entry_set_text(GTK_ENTRY(widget), cfg.cover_name_include); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2055 |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2056 widget = glade_xml_get_widget(xml, "filepopup_settings_cover_name_exclude"); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2057 gtk_entry_set_text(GTK_ENTRY(widget), cfg.cover_name_exclude); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2058 |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2059 widget2 = glade_xml_get_widget(xml, "filepopup_settings_recurse_for_cover"); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2060 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget2), cfg.recurse_for_cover); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2061 |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2062 widget = glade_xml_get_widget(xml, "filepopup_settings_recurse_for_cover_depth"); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2063 gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), cfg.recurse_for_cover_depth); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2064 |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2065 widget = glade_xml_get_widget(xml, "filepopup_settings_recurse_for_cover_depth_box"); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2066 on_recurse_for_cover_toggled(GTK_TOGGLE_BUTTON(widget2), widget); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2067 |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2068 widget = glade_xml_get_widget(xml, "filepopup_settings_use_file_cover"); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2069 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), cfg.use_file_cover); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2070 |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2071 gtk_widget_show(filepopup_settings); |
1429
a360afd8df52
[svn] Make annoying recursion that consistently returns wrong art, optional.
nemo
parents:
1413
diff
changeset
|
2072 } |
a360afd8df52
[svn] Make annoying recursion that consistently returns wrong art, optional.
nemo
parents:
1413
diff
changeset
|
2073 |
a360afd8df52
[svn] Make annoying recursion that consistently returns wrong art, optional.
nemo
parents:
1413
diff
changeset
|
2074 static void |
1413 | 2075 on_filepopup_settings_ok_clicked(GtkButton *button, gpointer data) |
2076 { | |
2077 GladeXML *xml = prefswin_get_xml(); | |
1889
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2078 GtkWidget *widget; |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2079 |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2080 widget = glade_xml_get_widget(xml, "filepopup_settings_cover_name_include"); |
1413 | 2081 g_free(cfg.cover_name_include); |
1889
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2082 cfg.cover_name_include = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget))); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2083 |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2084 widget = glade_xml_get_widget(xml, "filepopup_settings_cover_name_exclude"); |
1413 | 2085 g_free(cfg.cover_name_exclude); |
1889
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2086 cfg.cover_name_exclude = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget))); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2087 |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2088 widget = glade_xml_get_widget(xml, "filepopup_settings_recurse_for_cover"); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2089 cfg.recurse_for_cover = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2090 |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2091 widget = glade_xml_get_widget(xml, "filepopup_settings_recurse_for_cover_depth"); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2092 cfg.recurse_for_cover_depth = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget)); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2093 |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2094 widget = glade_xml_get_widget(xml, "filepopup_settings_use_file_cover"); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2095 cfg.use_file_cover = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); |
1413 | 2096 |
2097 gtk_widget_hide(filepopup_settings); | |
2098 } | |
2099 | |
2100 static void | |
2101 on_filepopup_settings_cancel_clicked(GtkButton *button, gpointer data) | |
2102 { | |
2103 gtk_widget_hide(filepopup_settings); | |
1358 | 2104 } |
2105 | |
1905
6b4116c34489
[svn] - change "Transparency" to "Miscillaneous UI Features" in prefswin
nenolod
parents:
1889
diff
changeset
|
2106 static void |
6b4116c34489
[svn] - change "Transparency" to "Miscillaneous UI Features" in prefswin
nenolod
parents:
1889
diff
changeset
|
2107 on_xmms_style_fileselector_realize(GtkToggleButton * button, |
6b4116c34489
[svn] - change "Transparency" to "Miscillaneous UI Features" in prefswin
nenolod
parents:
1889
diff
changeset
|
2108 gpointer data) |
6b4116c34489
[svn] - change "Transparency" to "Miscillaneous UI Features" in prefswin
nenolod
parents:
1889
diff
changeset
|
2109 { |
6b4116c34489
[svn] - change "Transparency" to "Miscillaneous UI Features" in prefswin
nenolod
parents:
1889
diff
changeset
|
2110 gtk_toggle_button_set_active(button, cfg.use_xmms_style_fileselector); |
6b4116c34489
[svn] - change "Transparency" to "Miscillaneous UI Features" in prefswin
nenolod
parents:
1889
diff
changeset
|
2111 } |
6b4116c34489
[svn] - change "Transparency" to "Miscillaneous UI Features" in prefswin
nenolod
parents:
1889
diff
changeset
|
2112 |
6b4116c34489
[svn] - change "Transparency" to "Miscillaneous UI Features" in prefswin
nenolod
parents:
1889
diff
changeset
|
2113 static void |
6b4116c34489
[svn] - change "Transparency" to "Miscillaneous UI Features" in prefswin
nenolod
parents:
1889
diff
changeset
|
2114 on_xmms_style_fileselector_toggled(GtkToggleButton * button, |
6b4116c34489
[svn] - change "Transparency" to "Miscillaneous UI Features" in prefswin
nenolod
parents:
1889
diff
changeset
|
2115 gpointer data) |
6b4116c34489
[svn] - change "Transparency" to "Miscillaneous UI Features" in prefswin
nenolod
parents:
1889
diff
changeset
|
2116 { |
6b4116c34489
[svn] - change "Transparency" to "Miscillaneous UI Features" in prefswin
nenolod
parents:
1889
diff
changeset
|
2117 cfg.use_xmms_style_fileselector = gtk_toggle_button_get_active(button); |
6b4116c34489
[svn] - change "Transparency" to "Miscillaneous UI Features" in prefswin
nenolod
parents:
1889
diff
changeset
|
2118 } |
6b4116c34489
[svn] - change "Transparency" to "Miscillaneous UI Features" in prefswin
nenolod
parents:
1889
diff
changeset
|
2119 |
1971
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2120 static void |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2121 on_show_wm_decorations_realize(GtkToggleButton * button, |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2122 gpointer data) |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2123 { |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2124 gtk_toggle_button_set_active(button, cfg.show_wm_decorations); |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2125 } |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2126 |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2127 static void |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2128 on_show_wm_decorations_toggled(GtkToggleButton * button, |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2129 gpointer data) |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2130 { |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2131 extern GtkWidget *equalizerwin; |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2132 cfg.show_wm_decorations = gtk_toggle_button_get_active(button); |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2133 gtk_window_set_decorated(GTK_WINDOW(mainwin), cfg.show_wm_decorations); |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2134 gtk_window_set_decorated(GTK_WINDOW(playlistwin), cfg.show_wm_decorations); |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2135 gtk_window_set_decorated(GTK_WINDOW(equalizerwin), cfg.show_wm_decorations); |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2136 |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2137 } |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2138 |
0 | 2139 /* FIXME: complete the map */ |
2140 FUNC_MAP_BEGIN(prefswin_func_map) | |
2141 FUNC_MAP_ENTRY(on_input_plugin_view_realize) | |
2142 FUNC_MAP_ENTRY(on_output_plugin_cbox_realize) | |
2143 FUNC_MAP_ENTRY(on_general_plugin_view_realize) | |
2144 FUNC_MAP_ENTRY(on_vis_plugin_view_realize) | |
2145 FUNC_MAP_ENTRY(on_effect_plugin_view_realize) | |
2146 FUNC_MAP_ENTRY(on_custom_cursors_realize) | |
2147 FUNC_MAP_ENTRY(on_custom_cursors_toggled) | |
2148 FUNC_MAP_ENTRY(on_mainwin_font_button_realize) | |
2149 FUNC_MAP_ENTRY(on_mainwin_font_button_font_set) | |
124
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
2150 FUNC_MAP_ENTRY(on_use_bitmap_fonts_realize) |
428d3865de3c
[svn] More bitmap-font related stuff, working on a scrolling implementation too. (You can now enable or disable bitmap font support in Preferences.)
nenolod
parents:
0
diff
changeset
|
2151 FUNC_MAP_ENTRY(on_use_bitmap_fonts_toggled) |
0 | 2152 FUNC_MAP_ENTRY(on_mouse_wheel_volume_realize) |
2153 FUNC_MAP_ENTRY(on_mouse_wheel_volume_changed) | |
2154 FUNC_MAP_ENTRY(on_mouse_wheel_scroll_pl_realize) | |
2155 FUNC_MAP_ENTRY(on_mouse_wheel_scroll_pl_changed) | |
2156 FUNC_MAP_ENTRY(on_pause_between_songs_time_realize) | |
2157 FUNC_MAP_ENTRY(on_pause_between_songs_time_changed) | |
2158 FUNC_MAP_ENTRY(on_pl_metadata_on_load_realize) | |
2159 FUNC_MAP_ENTRY(on_pl_metadata_on_load_toggled) | |
2160 FUNC_MAP_ENTRY(on_pl_metadata_on_display_realize) | |
2161 FUNC_MAP_ENTRY(on_pl_metadata_on_display_toggled) | |
2162 FUNC_MAP_ENTRY(on_playlist_show_pl_numbers_realize) | |
2163 FUNC_MAP_ENTRY(on_playlist_show_pl_numbers_toggled) | |
1056
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
963
diff
changeset
|
2164 FUNC_MAP_ENTRY(on_playlist_show_pl_separator_realize) |
21628529c615
[svn] add the config option to enable/disable separator line in the playlist
yaz
parents:
963
diff
changeset
|
2165 FUNC_MAP_ENTRY(on_playlist_show_pl_separator_toggled) |
1081 | 2166 FUNC_MAP_ENTRY(on_playlist_transparent_realize) |
2167 FUNC_MAP_ENTRY(on_playlist_transparent_toggled) | |
0 | 2168 FUNC_MAP_ENTRY(on_playlist_convert_twenty_realize) |
2169 FUNC_MAP_ENTRY(on_playlist_convert_twenty_toggled) | |
2170 FUNC_MAP_ENTRY(on_playlist_convert_underscore_realize) | |
2171 FUNC_MAP_ENTRY(on_playlist_convert_underscore_toggled) | |
2172 FUNC_MAP_ENTRY(on_playlist_font_button_realize) | |
2173 FUNC_MAP_ENTRY(on_playlist_font_button_font_set) | |
2174 FUNC_MAP_ENTRY(on_playlist_no_advance_realize) | |
2175 FUNC_MAP_ENTRY(on_playlist_no_advance_toggled) | |
893
6afdd0d7e1e1
[svn] Make refreshing optional, default to disabled if Gnome VFS available.
nemo
parents:
887
diff
changeset
|
2176 FUNC_MAP_ENTRY(on_refresh_file_list_realize) |
6afdd0d7e1e1
[svn] Make refreshing optional, default to disabled if Gnome VFS available.
nemo
parents:
887
diff
changeset
|
2177 FUNC_MAP_ENTRY(on_refresh_file_list_toggled) |
1832 | 2178 FUNC_MAP_ENTRY(on_skin_view_realize) |
0 | 2179 FUNC_MAP_ENTRY(on_titlestring_entry_realize) |
2180 FUNC_MAP_ENTRY(on_titlestring_entry_changed) | |
2181 FUNC_MAP_ENTRY(on_eq_dir_preset_entry_realize) | |
2182 FUNC_MAP_ENTRY(on_eq_dir_preset_entry_changed) | |
2183 FUNC_MAP_ENTRY(on_eq_file_preset_entry_realize) | |
2184 FUNC_MAP_ENTRY(on_eq_file_preset_entry_changed) | |
2185 FUNC_MAP_ENTRY(on_eq_preset_view_realize) | |
2186 FUNC_MAP_ENTRY(on_eq_preset_add_clicked) | |
2187 FUNC_MAP_ENTRY(on_eq_preset_remove_clicked) | |
954 | 2188 FUNC_MAP_ENTRY(on_skin_refresh_button_clicked) |
1070 | 2189 FUNC_MAP_ENTRY(on_proxy_use_toggled) |
2190 FUNC_MAP_ENTRY(on_proxy_use_realize) | |
2191 FUNC_MAP_ENTRY(on_proxy_auth_toggled) | |
2192 FUNC_MAP_ENTRY(on_proxy_auth_realize) | |
2193 FUNC_MAP_ENTRY(on_proxy_host_realize) | |
2194 FUNC_MAP_ENTRY(on_proxy_host_changed) | |
2195 FUNC_MAP_ENTRY(on_proxy_port_realize) | |
2196 FUNC_MAP_ENTRY(on_proxy_port_changed) | |
2197 FUNC_MAP_ENTRY(on_proxy_user_realize) | |
2198 FUNC_MAP_ENTRY(on_proxy_user_changed) | |
2199 FUNC_MAP_ENTRY(on_proxy_pass_realize) | |
2200 FUNC_MAP_ENTRY(on_proxy_pass_changed) | |
1105
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
2201 FUNC_MAP_ENTRY(on_chardet_detector_cbox_realize) |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
2202 FUNC_MAP_ENTRY(on_chardet_detector_cbox_changed) |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
2203 FUNC_MAP_ENTRY(on_chardet_fallback_realize) |
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
2204 FUNC_MAP_ENTRY(on_chardet_fallback_changed) |
1147 | 2205 FUNC_MAP_ENTRY(on_output_plugin_bufsize_realize) |
2206 FUNC_MAP_ENTRY(on_output_plugin_bufsize_value_changed) | |
1163
ff71f891265b
[svn] - Allow to do format detection on demand; instead of immediately on add
nenolod
parents:
1147
diff
changeset
|
2207 FUNC_MAP_ENTRY(on_audio_format_det_cb_toggled) |
ff71f891265b
[svn] - Allow to do format detection on demand; instead of immediately on add
nenolod
parents:
1147
diff
changeset
|
2208 FUNC_MAP_ENTRY(on_audio_format_det_cb_realize) |
1358 | 2209 FUNC_MAP_ENTRY(on_show_filepopup_for_tuple_realize) |
2210 FUNC_MAP_ENTRY(on_show_filepopup_for_tuple_toggled) | |
1413 | 2211 FUNC_MAP_ENTRY(on_filepopup_for_tuple_settings_clicked) |
1382 | 2212 FUNC_MAP_ENTRY(on_continue_playback_on_startup_realize) |
2213 FUNC_MAP_ENTRY(on_continue_playback_on_startup_toggled) | |
1413 | 2214 |
2215 /* Filepopup settings */ | |
2216 FUNC_MAP_ENTRY(on_filepopup_settings_ok_clicked) | |
2217 FUNC_MAP_ENTRY(on_filepopup_settings_cancel_clicked) | |
1905
6b4116c34489
[svn] - change "Transparency" to "Miscillaneous UI Features" in prefswin
nenolod
parents:
1889
diff
changeset
|
2218 |
6b4116c34489
[svn] - change "Transparency" to "Miscillaneous UI Features" in prefswin
nenolod
parents:
1889
diff
changeset
|
2219 /* XMMS fileselector option -nenolod */ |
6b4116c34489
[svn] - change "Transparency" to "Miscillaneous UI Features" in prefswin
nenolod
parents:
1889
diff
changeset
|
2220 FUNC_MAP_ENTRY(on_xmms_style_fileselector_toggled) |
6b4116c34489
[svn] - change "Transparency" to "Miscillaneous UI Features" in prefswin
nenolod
parents:
1889
diff
changeset
|
2221 FUNC_MAP_ENTRY(on_xmms_style_fileselector_realize) |
1971
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2222 |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2223 /* show window manager decorations */ |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2224 FUNC_MAP_ENTRY(on_show_wm_decorations_toggled) |
9fd04055d6cc
[svn] - add show window decorations option to appearance preferences. closes #167.
yaz
parents:
1905
diff
changeset
|
2225 FUNC_MAP_ENTRY(on_show_wm_decorations_realize) |
0 | 2226 FUNC_MAP_END |
2227 | |
2228 void | |
2229 create_prefs_window(void) | |
2230 { | |
2231 const gchar *glade_file = DATA_DIR "/glade/prefswin.glade"; | |
2232 | |
2233 GladeXML *xml; | |
2234 GtkWidget *widget, *widget2; | |
816
8073d8300502
[svn] display audacious version and revision in the prefs window
giacomo
parents:
625
diff
changeset
|
2235 GString *aud_version_string; |
0 | 2236 |
2237 GtkWidget *titlestring_tag_menu, *menu_item; | |
625
0a73d1faeb4e
[svn] GCC 4.1 warning fixes by Diego 'Flameeyes' Petteno from Gentoo.
chainsaw
parents:
383
diff
changeset
|
2238 guint i; |
0 | 2239 |
2240 /* load the interface */ | |
2241 xml = glade_xml_new_or_die(_("Preferences Window"), glade_file, NULL, | |
2242 NULL); | |
2243 | |
2244 | |
2245 /* connect the signals in the interface */ | |
2246 glade_xml_signal_autoconnect_map(xml, prefswin_func_map); | |
2247 | |
2248 prefswin = glade_xml_get_widget(xml, "prefswin"); | |
2249 g_object_set_data(G_OBJECT(prefswin), "glade-xml", xml); | |
1609
fb2ac7c9e096
[svn] - comment out some gtk_window_set_transient_for() which hide mainwin unexpectedly.
yaz
parents:
1547
diff
changeset
|
2250 /* this will hide only mainwin. it's annoying! yaz */ |
fb2ac7c9e096
[svn] - comment out some gtk_window_set_transient_for() which hide mainwin unexpectedly.
yaz
parents:
1547
diff
changeset
|
2251 // gtk_window_set_transient_for(GTK_WINDOW(prefswin), GTK_WINDOW(mainwin)); |
0 | 2252 |
2253 /* create category view */ | |
2254 widget = glade_xml_get_widget(xml, "category_view"); | |
2255 widget2 = glade_xml_get_widget(xml, "category_notebook"); | |
2256 g_signal_connect_after(G_OBJECT(widget), "realize", | |
2257 G_CALLBACK(on_category_view_realize), | |
2258 widget2); | |
2259 | |
1180 | 2260 category_treeview = GTK_WIDGET(widget); |
1175 | 2261 category_notebook = GTK_WIDGET(widget2); |
2262 | |
0 | 2263 /* plugin->input page */ |
2264 | |
2265 widget = glade_xml_get_widget(xml, "input_plugin_view"); | |
2266 widget2 = glade_xml_get_widget(xml, "input_plugin_prefs"); | |
2267 g_signal_connect(G_OBJECT(widget), "cursor-changed", | |
2268 G_CALLBACK(input_plugin_enable_prefs), | |
2269 widget2); | |
2270 | |
2271 g_signal_connect_swapped(G_OBJECT(widget2), "clicked", | |
2272 G_CALLBACK(input_plugin_open_prefs), | |
2273 widget); | |
2274 widget2 = glade_xml_get_widget(xml, "input_plugin_info"); | |
2275 g_signal_connect(G_OBJECT(widget), "cursor-changed", | |
2276 G_CALLBACK(input_plugin_enable_info), | |
2277 widget2); | |
2278 g_signal_connect_swapped(G_OBJECT(widget2), "clicked", | |
2279 G_CALLBACK(input_plugin_open_info), | |
2280 widget); | |
2281 | |
2282 /* plugin->output page */ | |
2283 | |
2284 widget = glade_xml_get_widget(xml, "output_plugin_cbox"); | |
2285 | |
2286 widget2 = glade_xml_get_widget(xml, "output_plugin_prefs"); | |
2287 g_signal_connect(G_OBJECT(widget), "changed", | |
2288 G_CALLBACK(output_plugin_enable_prefs), | |
2289 widget2); | |
2290 g_signal_connect_swapped(G_OBJECT(widget2), "clicked", | |
2291 G_CALLBACK(output_plugin_open_prefs), | |
2292 widget); | |
2293 | |
2294 widget2 = glade_xml_get_widget(xml, "output_plugin_info"); | |
2295 g_signal_connect(G_OBJECT(widget), "changed", | |
2296 G_CALLBACK(output_plugin_enable_info), | |
2297 widget2); | |
2298 g_signal_connect_swapped(G_OBJECT(widget2), "clicked", | |
2299 G_CALLBACK(output_plugin_open_info), | |
2300 widget); | |
2301 | |
2302 /* plugin->general page */ | |
2303 | |
2304 widget = glade_xml_get_widget(xml, "general_plugin_view"); | |
2305 | |
2306 widget2 = glade_xml_get_widget(xml, "general_plugin_prefs"); | |
2307 g_signal_connect(G_OBJECT(widget), "cursor-changed", | |
2308 G_CALLBACK(general_plugin_enable_prefs), | |
2309 widget2); | |
2310 g_signal_connect_swapped(G_OBJECT(widget2), "clicked", | |
2311 G_CALLBACK(general_plugin_open_prefs), | |
2312 widget); | |
2313 | |
2314 widget2 = glade_xml_get_widget(xml, "general_plugin_info"); | |
2315 g_signal_connect(G_OBJECT(widget), "cursor-changed", | |
2316 G_CALLBACK(general_plugin_enable_info), | |
2317 widget2); | |
2318 g_signal_connect_swapped(G_OBJECT(widget2), "clicked", | |
2319 G_CALLBACK(general_plugin_open_info), | |
2320 widget); | |
2321 | |
2322 | |
2323 /* plugin->vis page */ | |
2324 | |
2325 widget = glade_xml_get_widget(xml, "vis_plugin_view"); | |
2326 widget2 = glade_xml_get_widget(xml, "vis_plugin_prefs"); | |
2327 | |
2328 g_signal_connect_swapped(G_OBJECT(widget2), "clicked", | |
2329 G_CALLBACK(vis_plugin_open_prefs), | |
2330 widget); | |
2331 g_signal_connect(G_OBJECT(widget), "cursor-changed", | |
2332 G_CALLBACK(vis_plugin_enable_prefs), widget2); | |
2333 | |
2334 | |
2335 widget2 = glade_xml_get_widget(xml, "vis_plugin_info"); | |
2336 g_signal_connect(G_OBJECT(widget), "cursor-changed", | |
2337 G_CALLBACK(vis_plugin_enable_info), widget2); | |
2338 g_signal_connect_swapped(G_OBJECT(widget2), "clicked", | |
2339 G_CALLBACK(vis_plugin_open_info), | |
2340 widget); | |
2341 | |
2342 | |
2343 /* plugin->effects page */ | |
2344 | |
2345 widget = glade_xml_get_widget(xml, "effect_plugin_view"); | |
2346 widget2 = glade_xml_get_widget(xml, "effect_plugin_prefs"); | |
2347 | |
2348 g_signal_connect_swapped(G_OBJECT(widget2), "clicked", | |
2349 G_CALLBACK(effect_plugin_open_prefs), | |
2350 widget); | |
2351 g_signal_connect(G_OBJECT(widget), "cursor-changed", | |
2352 G_CALLBACK(effect_plugin_enable_prefs), widget2); | |
2353 | |
2354 | |
2355 widget2 = glade_xml_get_widget(xml, "effect_plugin_info"); | |
2356 g_signal_connect(G_OBJECT(widget), "cursor-changed", | |
2357 G_CALLBACK(effect_plugin_enable_info), widget2); | |
2358 g_signal_connect_swapped(G_OBJECT(widget2), "clicked", | |
2359 G_CALLBACK(effect_plugin_open_info), | |
2360 widget); | |
2361 | |
2362 /* playlist page */ | |
2363 | |
2364 widget = glade_xml_get_widget(xml, "pause_between_songs_box"); | |
2365 widget2 = glade_xml_get_widget(xml, "pause_between_songs"); | |
2366 g_signal_connect_after(G_OBJECT(widget2), "realize", | |
2367 G_CALLBACK(on_pause_between_songs_realize), | |
2368 widget); | |
2369 g_signal_connect(G_OBJECT(widget2), "toggled", | |
2370 G_CALLBACK(on_pause_between_songs_toggled), | |
2371 widget); | |
2372 | |
2373 widget = glade_xml_get_widget(xml, "playlist_use_metadata_box"); | |
2374 widget2 = glade_xml_get_widget(xml, "playlist_use_metadata"); | |
2375 g_signal_connect_after(G_OBJECT(widget2), "realize", | |
2376 G_CALLBACK(on_use_pl_metadata_realize), | |
2377 widget); | |
2378 g_signal_connect(G_OBJECT(widget2), "toggled", | |
2379 G_CALLBACK(on_use_pl_metadata_toggled), | |
2380 widget); | |
2381 | |
2382 widget = glade_xml_get_widget(xml, "skin_view"); | |
2383 g_signal_connect(widget, "drag-data-received", | |
2384 G_CALLBACK(on_skin_view_drag_data_received), | |
2385 NULL); | |
2386 bmp_drag_dest_set(widget); | |
2387 | |
2388 g_signal_connect(mainwin, "drag-data-received", | |
2389 G_CALLBACK(mainwin_drag_data_received), | |
2390 widget); | |
2391 | |
887 | 2392 widget = glade_xml_get_widget(xml, "skin_refresh_button"); |
2393 g_signal_connect(widget, "clicked", | |
2394 G_CALLBACK(on_skin_refresh_button_clicked), | |
2395 NULL); | |
2396 | |
2397 widget = glade_xml_get_widget(xml, "playlist_font_button"); | |
0 | 2398 g_signal_connect(mainwin, "drag-data-received", |
2399 G_CALLBACK(mainwin_drag_data_received1), | |
2400 widget); | |
2401 | |
2402 widget = glade_xml_get_widget(xml, "titlestring_cbox"); | |
2403 widget2 = glade_xml_get_widget(xml, "titlestring_entry"); | |
2404 g_signal_connect(widget, "realize", | |
2405 G_CALLBACK(on_titlestring_cbox_realize), | |
2406 widget2); | |
2407 g_signal_connect(widget, "changed", | |
2408 G_CALLBACK(on_titlestring_cbox_changed), | |
2409 widget2); | |
2410 | |
2411 /* FIXME: move this into a function */ | |
2412 /* create tag menu */ | |
2413 titlestring_tag_menu = gtk_menu_new(); | |
2414 for(i = 0; i < n_title_field_tags; i++) { | |
2415 menu_item = gtk_menu_item_new_with_label(_(title_field_tags[i].name)); | |
2416 gtk_menu_shell_append(GTK_MENU_SHELL(titlestring_tag_menu), menu_item); | |
2417 g_signal_connect(menu_item, "activate", | |
2418 G_CALLBACK(titlestring_tag_menu_callback), | |
2419 GINT_TO_POINTER(i)); | |
2420 }; | |
2421 gtk_widget_show_all(titlestring_tag_menu); | |
2422 | |
2423 widget = glade_xml_get_widget(xml, "titlestring_help_button"); | |
2424 widget2 = glade_xml_get_widget(xml, "titlestring_cbox"); | |
2425 | |
2426 g_signal_connect(widget2, "changed", | |
2427 G_CALLBACK(on_titlestring_cbox_changed), | |
2428 widget); | |
2429 g_signal_connect(widget, "clicked", | |
2430 G_CALLBACK(on_titlestring_help_button_clicked), | |
2431 titlestring_tag_menu); | |
816
8073d8300502
[svn] display audacious version and revision in the prefs window
giacomo
parents:
625
diff
changeset
|
2432 |
8073d8300502
[svn] display audacious version and revision in the prefs window
giacomo
parents:
625
diff
changeset
|
2433 /* audacious version label */ |
8073d8300502
[svn] display audacious version and revision in the prefs window
giacomo
parents:
625
diff
changeset
|
2434 widget = glade_xml_get_widget(xml, "audversionlabel"); |
8073d8300502
[svn] display audacious version and revision in the prefs window
giacomo
parents:
625
diff
changeset
|
2435 aud_version_string = g_string_new( "" ); |
822
c5eb4b762977
[svn] - only show the SVN revision if we know what it is
nenolod
parents:
818
diff
changeset
|
2436 |
824 | 2437 if (strcasecmp(svn_stamp, "exported")) |
822
c5eb4b762977
[svn] - only show the SVN revision if we know what it is
nenolod
parents:
818
diff
changeset
|
2438 { |
1135 | 2439 g_string_printf( aud_version_string , "<span size='small'>%s (r%s) (%s@%s)</span>" , "Audacious " PACKAGE_VERSION , |
822
c5eb4b762977
[svn] - only show the SVN revision if we know what it is
nenolod
parents:
818
diff
changeset
|
2440 svn_stamp , g_get_user_name() , g_get_host_name() ); |
c5eb4b762977
[svn] - only show the SVN revision if we know what it is
nenolod
parents:
818
diff
changeset
|
2441 } |
c5eb4b762977
[svn] - only show the SVN revision if we know what it is
nenolod
parents:
818
diff
changeset
|
2442 else |
c5eb4b762977
[svn] - only show the SVN revision if we know what it is
nenolod
parents:
818
diff
changeset
|
2443 { |
1135 | 2444 g_string_printf( aud_version_string , "<span size='small'>%s (%s@%s)</span>" , "Audacious " PACKAGE_VERSION , |
822
c5eb4b762977
[svn] - only show the SVN revision if we know what it is
nenolod
parents:
818
diff
changeset
|
2445 g_get_user_name() , g_get_host_name() ); |
c5eb4b762977
[svn] - only show the SVN revision if we know what it is
nenolod
parents:
818
diff
changeset
|
2446 } |
c5eb4b762977
[svn] - only show the SVN revision if we know what it is
nenolod
parents:
818
diff
changeset
|
2447 |
1135 | 2448 gtk_label_set_markup( GTK_LABEL(widget) , aud_version_string->str ); |
816
8073d8300502
[svn] display audacious version and revision in the prefs window
giacomo
parents:
625
diff
changeset
|
2449 g_string_free( aud_version_string , TRUE ); |
1413 | 2450 |
2451 /* Create window for filepopup settings */ | |
2452 filepopup_settings = glade_xml_get_widget(xml, "filepopup_for_tuple_settings"); | |
2453 gtk_window_set_transient_for(GTK_WINDOW(filepopup_settings), GTK_WINDOW(prefswin)); | |
1889
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2454 |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2455 widget = glade_xml_get_widget(xml, "filepopup_settings_recurse_for_cover_depth_box"); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2456 widget2 = glade_xml_get_widget(xml, "filepopup_settings_recurse_for_cover"); |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2457 g_signal_connect(G_OBJECT(widget2), "toggled", |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2458 G_CALLBACK(on_recurse_for_cover_toggled), |
597bd579d9af
[svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents:
1864
diff
changeset
|
2459 widget); |
0 | 2460 } |
2461 | |
2462 void | |
2463 show_prefs_window(void) | |
2464 { | |
2465 gtk_widget_show(prefswin); | |
2466 } | |
1105
4be4d74db123
[svn] automatic character encoding detector for id3 metadata. --enable-chardet enables this feature.
yaz
parents:
1081
diff
changeset
|
2467 |
1184
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2468 static void |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2469 prefswin_page_queue_new(GtkWidget *container, gchar *name, gchar *imgurl) |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2470 { |
1352
8b249765fdd1
[svn] - GList cannot handle circular queues, so I integrated one into CategoryQueueEntry. No fuss, no muss.
nenolod
parents:
1188
diff
changeset
|
2471 CategoryQueueEntry *ent = g_malloc0(sizeof(CategoryQueueEntry)); |
1184
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2472 |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2473 ent->container = container; |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2474 ent->pg_name = name; |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2475 ent->img_url = imgurl; |
1352
8b249765fdd1
[svn] - GList cannot handle circular queues, so I integrated one into CategoryQueueEntry. No fuss, no muss.
nenolod
parents:
1188
diff
changeset
|
2476 |
8b249765fdd1
[svn] - GList cannot handle circular queues, so I integrated one into CategoryQueueEntry. No fuss, no muss.
nenolod
parents:
1188
diff
changeset
|
2477 if (category_queue) |
8b249765fdd1
[svn] - GList cannot handle circular queues, so I integrated one into CategoryQueueEntry. No fuss, no muss.
nenolod
parents:
1188
diff
changeset
|
2478 ent->next = category_queue; |
8b249765fdd1
[svn] - GList cannot handle circular queues, so I integrated one into CategoryQueueEntry. No fuss, no muss.
nenolod
parents:
1188
diff
changeset
|
2479 |
8b249765fdd1
[svn] - GList cannot handle circular queues, so I integrated one into CategoryQueueEntry. No fuss, no muss.
nenolod
parents:
1188
diff
changeset
|
2480 category_queue = ent; |
1184
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2481 } |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2482 |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2483 static void |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2484 prefswin_page_queue_destroy(CategoryQueueEntry *ent) |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2485 { |
1352
8b249765fdd1
[svn] - GList cannot handle circular queues, so I integrated one into CategoryQueueEntry. No fuss, no muss.
nenolod
parents:
1188
diff
changeset
|
2486 category_queue = ent->next; |
1184
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2487 g_free(ent); |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2488 } |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2489 |
1175 | 2490 /* |
2491 * Public APIs for adding new pages to the prefs window. | |
2492 * | |
2493 * Basically, the concept here is that third party components can register themselves in the root | |
2494 * preferences window. | |
2495 * | |
2496 * From a usability standpoint this makes the application look more "united", instead of cluttered | |
2497 * and malorganised. Hopefully this option will be used further in the future. | |
2498 * | |
2499 * - nenolod | |
2500 */ | |
1185 | 2501 gint |
1178 | 2502 prefswin_page_new(GtkWidget *container, gchar *name, gchar *imgurl) |
1175 | 2503 { |
2504 GtkTreeModel *model; | |
2505 GtkTreeIter iter; | |
2506 GdkPixbuf *img = NULL; | |
2507 GtkTreeView *treeview = GTK_TREE_VIEW(category_treeview); | |
2508 gint id; | |
2509 | |
1352
8b249765fdd1
[svn] - GList cannot handle circular queues, so I integrated one into CategoryQueueEntry. No fuss, no muss.
nenolod
parents:
1188
diff
changeset
|
2510 if (treeview == NULL || category_notebook == NULL) |
1184
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2511 { |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2512 prefswin_page_queue_new(container, name, imgurl); |
1185 | 2513 return -1; |
1184
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2514 } |
1175 | 2515 |
2516 model = gtk_tree_view_get_model(treeview); | |
2517 | |
2518 if (model == NULL) | |
1184
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2519 { |
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2520 prefswin_page_queue_new(container, name, imgurl); |
1185 | 2521 return -1; |
1184
b146ec74d778
[svn] - place plugins we cannot register UIs for right now in a queue and register them later
nenolod
parents:
1180
diff
changeset
|
2522 } |
1175 | 2523 |
1186
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2524 /* Make sure the widgets are visible. */ |
1180 | 2525 gtk_widget_show(container); |
1175 | 2526 id = gtk_notebook_append_page(GTK_NOTEBOOK(category_notebook), container, NULL); |
2527 | |
2528 if (id == -1) | |
1185 | 2529 return -1; |
1175 | 2530 |
2531 if (imgurl != NULL) | |
2532 img = gdk_pixbuf_new_from_file(imgurl, NULL); | |
2533 | |
2534 gtk_list_store_append(GTK_LIST_STORE(model), &iter); | |
2535 gtk_list_store_set(GTK_LIST_STORE(model), &iter, | |
2536 CATEGORY_VIEW_COL_ICON, img, | |
2537 CATEGORY_VIEW_COL_NAME, | |
2538 name, CATEGORY_VIEW_COL_ID, id, -1); | |
2539 | |
2540 if (img != NULL) | |
2541 g_object_unref(img); | |
2542 | |
1185 | 2543 return id; |
1175 | 2544 } |
1186
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2545 |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2546 void |
1188 | 2547 prefswin_page_destroy(GtkWidget *container) |
1186
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2548 { |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2549 GtkTreeModel *model; |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2550 GtkTreeIter iter; |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2551 GtkTreeView *treeview = GTK_TREE_VIEW(category_treeview); |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2552 gboolean ret; |
1188 | 2553 gint id; |
1384 | 2554 gint index = -1; |
1188 | 2555 |
2556 if (category_notebook == NULL || treeview == NULL || container == NULL) | |
2557 return; | |
2558 | |
2559 id = gtk_notebook_page_num(GTK_NOTEBOOK(category_notebook), container); | |
2560 | |
2561 if (id == -1) | |
1186
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2562 return; |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2563 |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2564 gtk_notebook_remove_page(GTK_NOTEBOOK(category_notebook), id); |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2565 |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2566 model = gtk_tree_view_get_model(treeview); |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2567 |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2568 if (model == NULL) |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2569 return; |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2570 |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2571 ret = gtk_tree_model_get_iter_first(model, &iter); |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2572 |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2573 while (ret == TRUE) |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2574 { |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2575 gtk_tree_model_get(model, &iter, CATEGORY_VIEW_COL_ID, &index, -1); |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2576 |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2577 if (index == id) |
1384 | 2578 { |
1186
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2579 gtk_list_store_remove(GTK_LIST_STORE(model), &iter); |
1384 | 2580 ret = gtk_tree_model_get_iter_first(model, &iter); |
2581 } | |
2582 | |
2583 if (index > id) | |
2584 { | |
2585 index--; | |
2586 gtk_list_store_set(GTK_LIST_STORE(model), &iter, CATEGORY_VIEW_COL_ID, index, -1); | |
2587 } | |
1186
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2588 |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2589 ret = gtk_tree_model_iter_next(model, &iter); |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2590 } |
d7848ff5bbe5
[svn] - prefswin_page_destroy() code, example will be added to the scrobbler plugin momentarily
nenolod
parents:
1185
diff
changeset
|
2591 } |