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