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