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