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