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