Mercurial > audlegacy-plugins
annotate src/skins/skins_cfg.c @ 3047:4434b4c4a715
ported EsounD plugin
author | Andrew O. Shadoura <bugzilla@tut.by> |
---|---|
date | Fri, 17 Apr 2009 16:17:10 +0300 |
parents | f856ff6a0055 |
children | 1ffcad5f406c |
rev | line source |
---|---|
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
1 /* |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
2 * Audacious - a cross-platform multimedia player |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
3 * Copyright (c) 2008 Tomasz Moń |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
4 * |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
5 * This program is free software; you can redistribute it and/or modify |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
6 * it under the terms of the GNU General Public License as published by |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
7 * the Free Software Foundation; under version 3 of the License. |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
8 * |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
9 * This program is distributed in the hope that it will be useful, |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
12 * GNU General Public License for more details. |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
13 * |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
14 * You should have received a copy of the GNU General Public License |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
15 * along with this program. If not, see <http://www.gnu.org/licenses>. |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
16 * |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
17 * The Audacious team does not consider modular code linking to |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
18 * Audacious or using our public API to be a derived work. |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
19 */ |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
20 |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
21 |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
22 #include "skins_cfg.h" |
2581 | 23 #include "ui_skin.h" |
2583 | 24 #include "ui_vis.h" |
2642 | 25 #include "ui_main.h" |
26 #include "ui_playlist.h" | |
2690
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
27 #include "ui_skinned_window.h" |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
28 #include "ui_skinned_textbox.h" |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
29 #include "ui_skinned_playlist.h" |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
30 #include "ui_skinselector.h" |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
31 #include "plugin.h" |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
32 #include "dnd.h" |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
33 #include "util.h" |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
34 #include <glib.h> |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
35 #include <stdlib.h> |
2971
3134a0987162
- changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2837
diff
changeset
|
36 #include <audlegacy/i18n.h> |
2690
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
37 #include <libintl.h> |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
38 |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
39 skins_cfg_t config; |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
40 |
2690
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
41 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
42 static GtkWidget *cfg_win = NULL; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
43 GtkWidget *skin_view; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
44 GtkWidget *skin_refresh_button; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
45 static GtkWidget *colorize_settings = NULL; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
46 /* colorize settings scales */ |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
47 GtkWidget *green_scale; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
48 GtkWidget *red_scale; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
49 GtkWidget *blue_scale; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
50 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
51 |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
52 skins_cfg_t skins_default_config = { |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
53 .scaled = FALSE, |
2592
8f5999909416
add ui_main - with huge amount of #if 0 to sort out later
Tomasz Mon <desowin@gmail.com>
parents:
2586
diff
changeset
|
54 .autoscroll = TRUE, |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
55 .always_on_top = FALSE, |
2602
7cd898f08f31
work in progress - add ui_manager and ui_main_evlisteners
Tomasz Mon <desowin@gmail.com>
parents:
2592
diff
changeset
|
56 .sticky = FALSE, |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
57 .scale_factor = 2.0, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
58 .always_show_cb = TRUE, |
2614 | 59 .close_dialog_open = TRUE, |
60 .close_dialog_add = TRUE, | |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
61 .skin = NULL, |
2614 | 62 .filesel_path = NULL, |
2592
8f5999909416
add ui_main - with huge amount of #if 0 to sort out later
Tomasz Mon <desowin@gmail.com>
parents:
2586
diff
changeset
|
63 .playlist_visible = FALSE, |
8f5999909416
add ui_main - with huge amount of #if 0 to sort out later
Tomasz Mon <desowin@gmail.com>
parents:
2586
diff
changeset
|
64 .equalizer_visible = FALSE, |
8f5999909416
add ui_main - with huge amount of #if 0 to sort out later
Tomasz Mon <desowin@gmail.com>
parents:
2586
diff
changeset
|
65 .player_visible = TRUE, |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
66 .player_shaded = FALSE, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
67 .equalizer_shaded = FALSE, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
68 .playlist_shaded = FALSE, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
69 .dim_titlebar = TRUE, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
70 .show_wm_decorations = FALSE, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
71 .easy_move = TRUE, |
2584 | 72 .allow_broken_skins = FALSE, |
2592
8f5999909416
add ui_main - with huge amount of #if 0 to sort out later
Tomasz Mon <desowin@gmail.com>
parents:
2586
diff
changeset
|
73 .warn_about_broken_gtk_engines = TRUE, |
8f5999909416
add ui_main - with huge amount of #if 0 to sort out later
Tomasz Mon <desowin@gmail.com>
parents:
2586
diff
changeset
|
74 .warn_about_win_visibility = TRUE, |
2584 | 75 .disable_inline_gtk = FALSE, |
2583 | 76 .timer_mode = 0, |
77 .vis_type = VIS_ANALYZER, | |
78 .analyzer_mode = ANALYZER_NORMAL, | |
79 .analyzer_type = ANALYZER_BARS, | |
80 .scope_mode = SCOPE_DOT, | |
81 .voiceprint_mode = VOICEPRINT_NORMAL, | |
82 .vu_mode = VU_SMOOTH, | |
83 .vis_refresh = REFRESH_FULL, | |
84 .analyzer_falloff = FALLOFF_FAST, | |
85 .peaks_falloff = FALLOFF_SLOW, | |
86 .player_x = MAINWIN_DEFAULT_POS_X, | |
87 .player_y = MAINWIN_DEFAULT_POS_Y, | |
88 .equalizer_x = EQUALIZER_DEFAULT_POS_X, | |
89 .equalizer_y = EQUALIZER_DEFAULT_POS_Y, | |
90 .playlist_x = PLAYLISTWIN_DEFAULT_POS_X, | |
91 .playlist_y = PLAYLISTWIN_DEFAULT_POS_Y, | |
92 .playlist_width = PLAYLISTWIN_DEFAULT_WIDTH, | |
93 .playlist_height = PLAYLISTWIN_DEFAULT_HEIGHT, | |
94 .playlist_position = 0, | |
95 .mouse_change = 8, /* mouse wheel scroll step */ | |
96 .scroll_pl_by = 3, | |
97 .colorize_r = 255, .colorize_g = 255, .colorize_b = 255, | |
98 .snap_distance = 10, | |
99 .snap_windows = TRUE, | |
100 .save_window_position = TRUE, | |
2584 | 101 .analyzer_peaks = TRUE, |
2586 | 102 .twoway_scroll = TRUE, /* use back and forth scroll */ |
2592
8f5999909416
add ui_main - with huge amount of #if 0 to sort out later
Tomasz Mon <desowin@gmail.com>
parents:
2586
diff
changeset
|
103 .mainwin_use_bitmapfont = TRUE, |
2606 | 104 .eq_scaled_linked = TRUE, |
2620 | 105 .show_numbers_in_pl = TRUE, |
106 .show_separator_in_pl = TRUE, | |
2642 | 107 .playlist_font = NULL, |
108 .mainwin_font = NULL, | |
109 .show_filepopup_for_tuple = TRUE, | |
110 .filepopup_delay = 20, /* delay until the filepopup comes up */ | |
2679
fb5375e86a03
make setting random skin on play working
Tomasz Mon <desowin@gmail.com>
parents:
2642
diff
changeset
|
111 .random_skin_on_play = FALSE, |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
112 }; |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
113 |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
114 typedef struct skins_cfg_boolent_t { |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
115 char const *be_vname; |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
116 gboolean *be_vloc; |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
117 gboolean be_wrt; |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
118 } skins_cfg_boolent; |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
119 |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
120 static skins_cfg_boolent skins_boolents[] = { |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
121 {"always_show_cb", &config.always_show_cb, TRUE}, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
122 {"always_on_top", &config.always_on_top, TRUE}, |
2602
7cd898f08f31
work in progress - add ui_manager and ui_main_evlisteners
Tomasz Mon <desowin@gmail.com>
parents:
2592
diff
changeset
|
123 {"sticky", &config.sticky, TRUE}, |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
124 {"always_show_cb", &config.always_show_cb, TRUE}, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
125 {"scaled", &config.scaled, TRUE}, |
2592
8f5999909416
add ui_main - with huge amount of #if 0 to sort out later
Tomasz Mon <desowin@gmail.com>
parents:
2586
diff
changeset
|
126 {"autoscroll_songname", &config.autoscroll, TRUE}, |
8f5999909416
add ui_main - with huge amount of #if 0 to sort out later
Tomasz Mon <desowin@gmail.com>
parents:
2586
diff
changeset
|
127 {"equalizer_visible", &config.equalizer_visible, TRUE}, |
8f5999909416
add ui_main - with huge amount of #if 0 to sort out later
Tomasz Mon <desowin@gmail.com>
parents:
2586
diff
changeset
|
128 {"playlist_visible", &config.playlist_visible, TRUE}, |
8f5999909416
add ui_main - with huge amount of #if 0 to sort out later
Tomasz Mon <desowin@gmail.com>
parents:
2586
diff
changeset
|
129 {"player_visible", &config.player_visible, TRUE}, |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
130 {"player_shaded", &config.player_shaded, TRUE}, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
131 {"equalizer_shaded", &config.equalizer_shaded, TRUE}, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
132 {"playlist_shaded", &config.playlist_shaded, TRUE}, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
133 {"dim_titlebar", &config.dim_titlebar, TRUE}, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
134 {"show_wm_decorations", &config.show_wm_decorations, TRUE}, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
135 {"easy_move", &config.easy_move, TRUE}, |
2584 | 136 {"allow_broken_skins", &config.allow_broken_skins, TRUE}, |
137 {"disable_inline_gtk", &config.disable_inline_gtk, TRUE}, | |
2583 | 138 {"snap_windows", &config.snap_windows, TRUE}, |
139 {"save_window_positions", &config.save_window_position, TRUE}, | |
2584 | 140 {"analyzer_peaks", &config.analyzer_peaks, TRUE}, |
2586 | 141 {"twoway_scroll", &config.twoway_scroll, TRUE}, |
2592
8f5999909416
add ui_main - with huge amount of #if 0 to sort out later
Tomasz Mon <desowin@gmail.com>
parents:
2586
diff
changeset
|
142 {"warn_about_win_visibility", &config.warn_about_win_visibility, TRUE}, |
8f5999909416
add ui_main - with huge amount of #if 0 to sort out later
Tomasz Mon <desowin@gmail.com>
parents:
2586
diff
changeset
|
143 {"warn_about_broken_gtk_engines", &config.warn_about_broken_gtk_engines, TRUE}, |
8f5999909416
add ui_main - with huge amount of #if 0 to sort out later
Tomasz Mon <desowin@gmail.com>
parents:
2586
diff
changeset
|
144 {"mainwin_use_bitmapfont", &config.mainwin_use_bitmapfont, TRUE}, |
2606 | 145 {"eq_scaled_linked", &config.eq_scaled_linked, TRUE}, |
2620 | 146 {"show_numbers_in_pl", &config.show_numbers_in_pl, TRUE}, |
147 {"show_separator_in_pl", &config.show_separator_in_pl, TRUE}, | |
2642 | 148 {"show_filepopup_for_tuple", &config.show_filepopup_for_tuple, TRUE}, |
2679
fb5375e86a03
make setting random skin on play working
Tomasz Mon <desowin@gmail.com>
parents:
2642
diff
changeset
|
149 {"random_skin_on_play", &config.random_skin_on_play, TRUE}, |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
150 }; |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
151 |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
152 static gint ncfgbent = G_N_ELEMENTS(skins_boolents); |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
153 |
2583 | 154 typedef struct skins_cfg_nument_t { |
155 char const *ie_vname; | |
156 gint *ie_vloc; | |
157 gboolean ie_wrt; | |
158 } skins_cfg_nument; | |
159 | |
160 static skins_cfg_nument skins_numents[] = { | |
161 {"player_x", &config.player_x, TRUE}, | |
162 {"player_y", &config.player_y, TRUE}, | |
163 {"timer_mode", &config.timer_mode, TRUE}, | |
164 {"vis_type", &config.vis_type, TRUE}, | |
165 {"analyzer_mode", &config.analyzer_mode, TRUE}, | |
166 {"analyzer_type", &config.analyzer_type, TRUE}, | |
167 {"scope_mode", &config.scope_mode, TRUE}, | |
168 {"vu_mode", &config.vu_mode, TRUE}, | |
169 {"voiceprint_mode", &config.voiceprint_mode, TRUE}, | |
170 {"vis_refresh_rate", &config.vis_refresh, TRUE}, | |
171 {"analyzer_falloff", &config.analyzer_falloff, TRUE}, | |
172 {"peaks_falloff", &config.peaks_falloff, TRUE}, | |
173 {"playlist_x", &config.playlist_x, TRUE}, | |
174 {"playlist_y", &config.playlist_y, TRUE}, | |
175 {"playlist_width", &config.playlist_width, TRUE}, | |
176 {"playlist_height", &config.playlist_height, TRUE}, | |
177 {"playlist_position", &config.playlist_position, TRUE}, | |
178 {"equalizer_x", &config.equalizer_x, TRUE}, | |
179 {"equalizer_y", &config.equalizer_y, TRUE}, | |
180 {"mouse_wheel_change", &config.mouse_change, TRUE}, | |
181 {"scroll_pl_by", &config.scroll_pl_by, TRUE}, | |
182 {"colorize_r", &config.colorize_r, TRUE}, | |
183 {"colorize_g", &config.colorize_g, TRUE}, | |
184 {"colorize_b", &config.colorize_b, TRUE}, | |
185 {"snap_distance", &config.snap_distance, TRUE}, | |
2642 | 186 {"filepopup_delay", &config.filepopup_delay, TRUE}, |
2583 | 187 }; |
188 | |
189 static gint ncfgient = G_N_ELEMENTS(skins_numents); | |
190 | |
2642 | 191 typedef struct skins_cfg_strent_t { |
192 char const *se_vname; | |
193 char **se_vloc; | |
194 gboolean se_wrt; | |
195 } skins_cfg_strent; | |
196 | |
197 static skins_cfg_strent skins_strents[] = { | |
198 {"playlist_font", &config.playlist_font, TRUE}, | |
199 {"mainwin_font", &config.mainwin_font, TRUE}, | |
200 {"skin", &config.skin, FALSE}, | |
201 }; | |
202 | |
203 static gint ncfgsent = G_N_ELEMENTS(skins_strents); | |
204 | |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
205 void skins_cfg_free() { |
2642 | 206 gint i; |
207 for (i = 0; i < ncfgsent; ++i) { | |
208 if (*(skins_strents[i].se_vloc) != NULL) { | |
209 g_free( *(skins_strents[i].se_vloc) ); | |
210 *(skins_strents[i].se_vloc) = NULL; | |
211 } | |
212 } | |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
213 } |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
214 |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
215 void skins_cfg_load() { |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
216 mcs_handle_t *cfgfile = aud_cfg_db_open(); |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
217 |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
218 memcpy(&config, &skins_default_config, sizeof(skins_cfg_t)); |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
219 int i; |
2635
b990e7eb0c25
save config on plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2620
diff
changeset
|
220 |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
221 for (i = 0; i < ncfgbent; ++i) { |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
222 aud_cfg_db_get_bool(cfgfile, "skins", |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
223 skins_boolents[i].be_vname, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
224 skins_boolents[i].be_vloc); |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
225 } |
2635
b990e7eb0c25
save config on plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2620
diff
changeset
|
226 |
2583 | 227 for (i = 0; i < ncfgient; ++i) { |
228 aud_cfg_db_get_int(cfgfile, "skins", | |
229 skins_numents[i].ie_vname, | |
230 skins_numents[i].ie_vloc); | |
231 } | |
2581 | 232 |
2642 | 233 for (i = 0; i < ncfgsent; ++i) { |
234 aud_cfg_db_get_string(cfgfile, "skins", | |
235 skins_strents[i].se_vname, | |
236 skins_strents[i].se_vloc); | |
237 } | |
238 | |
239 if (!config.mainwin_font) | |
240 config.mainwin_font = g_strdup(MAINWIN_DEFAULT_FONT); | |
241 | |
242 if (!config.playlist_font) | |
243 config.playlist_font = g_strdup(PLAYLISTWIN_DEFAULT_FONT); | |
2573
c0b08527b121
allow loading compressed skins
Tomasz Mon <desowin@gmail.com>
parents:
2572
diff
changeset
|
244 |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
245 if (!aud_cfg_db_get_float(cfgfile, "skins", "scale_factor", &(config.scale_factor))) |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
246 config.scale_factor = 2.0; |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
247 |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
248 aud_cfg_db_close(cfgfile); |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
249 } |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
250 |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
251 |
2635
b990e7eb0c25
save config on plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2620
diff
changeset
|
252 void skins_cfg_save() { |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
253 mcs_handle_t *cfgfile = aud_cfg_db_open(); |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
254 |
2636 | 255 if (aud_active_skin != NULL) { |
256 if (aud_active_skin->path) | |
257 aud_cfg_db_set_string(cfgfile, "skins", "skin", aud_active_skin->path); | |
258 else | |
259 aud_cfg_db_unset_key(cfgfile, "skins", "skin"); | |
260 } | |
261 | |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
262 int i; |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
263 |
2642 | 264 for (i = 0; i < ncfgsent; ++i) { |
265 if (skins_strents[i].se_wrt) | |
266 aud_cfg_db_set_string(cfgfile, "skins", | |
267 skins_strents[i].se_vname, | |
268 *skins_strents[i].se_vloc); | |
269 } | |
270 | |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
271 for (i = 0; i < ncfgbent; ++i) |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
272 if (skins_boolents[i].be_wrt) |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
273 aud_cfg_db_set_bool(cfgfile, "skins", |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
274 skins_boolents[i].be_vname, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
275 *skins_boolents[i].be_vloc); |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
276 |
2583 | 277 for (i = 0; i < ncfgient; ++i) |
278 if (skins_numents[i].ie_wrt) | |
279 aud_cfg_db_set_int(cfgfile, "skins", | |
280 skins_numents[i].ie_vname, | |
281 *skins_numents[i].ie_vloc); | |
282 | |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
283 aud_cfg_db_close(cfgfile); |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
284 } |
2690
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
285 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
286 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
287 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
288 playlist_show_pl_separator_numbers_cb() |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
289 { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
290 playlistwin_update_list(aud_playlist_get_active()); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
291 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
292 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
293 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
294 mainwin_font_set_cb() |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
295 { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
296 ui_skinned_textbox_set_xfont(mainwin_info, !config.mainwin_use_bitmapfont, config.mainwin_font); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
297 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
298 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
299 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
300 playlist_font_set_cb() |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
301 { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
302 AUDDBG("Attempt to set font \"%s\"\n", config.playlist_font); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
303 ui_skinned_playlist_set_font(config.playlist_font); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
304 playlistwin_set_sinfo_font(config.playlist_font); /* propagate font setting to playlistwin_sinfo */ |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
305 playlistwin_update_list(aud_playlist_get_active()); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
306 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
307 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
308 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
309 bitmap_fonts_cb() |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
310 { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
311 ui_skinned_textbox_set_xfont(mainwin_info, !config.mainwin_use_bitmapfont, config.mainwin_font); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
312 playlistwin_set_sinfo_font(config.playlist_font); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
313 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
314 if (config.playlist_shaded) { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
315 playlistwin_update_list(aud_playlist_get_active()); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
316 ui_skinned_window_draw_all(playlistwin); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
317 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
318 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
319 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
320 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
321 show_wm_decorations_cb() |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
322 { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
323 gtk_window_set_decorated(GTK_WINDOW(mainwin), config.show_wm_decorations); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
324 gtk_window_set_decorated(GTK_WINDOW(playlistwin), config.show_wm_decorations); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
325 gtk_window_set_decorated(GTK_WINDOW(equalizerwin), config.show_wm_decorations); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
326 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
327 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
328 static PreferencesWidget appearance_misc_widgets[] = { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
329 {WIDGET_LABEL, N_("<b>_Fonts</b>"), NULL, NULL, NULL, FALSE}, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
330 {WIDGET_FONT_BTN, N_("_Player:"), &config.mainwin_font, G_CALLBACK(mainwin_font_set_cb), N_("Select main player window font:"), FALSE}, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
331 {WIDGET_FONT_BTN, N_("_Playlist:"), &config.playlist_font, G_CALLBACK(playlist_font_set_cb), N_("Select playlist font:"), FALSE}, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
332 {WIDGET_CHK_BTN, N_("Use Bitmap fonts if available"), &config.mainwin_use_bitmapfont, G_CALLBACK(bitmap_fonts_cb), N_("Use bitmap fonts if they are available. Bitmap fonts do not support Unicode strings."), FALSE}, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
333 {WIDGET_LABEL, N_("<b>_Miscellaneous</b>"), NULL, NULL, NULL, FALSE}, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
334 {WIDGET_CHK_BTN, N_("Show track numbers in playlist"), &config.show_numbers_in_pl, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
335 G_CALLBACK(playlist_show_pl_separator_numbers_cb), NULL, FALSE}, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
336 {WIDGET_CHK_BTN, N_("Show separators in playlist"), &config.show_separator_in_pl, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
337 G_CALLBACK(playlist_show_pl_separator_numbers_cb), NULL, FALSE}, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
338 {WIDGET_CHK_BTN, N_("Show window manager decoration"), &config.show_wm_decorations, G_CALLBACK(show_wm_decorations_cb), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
339 N_("This enables the window manager to show decorations for windows."), FALSE}, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
340 {WIDGET_CHK_BTN, N_("Use two-way text scroller"), &config.twoway_scroll, NULL, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
341 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}, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
342 {WIDGET_CHK_BTN, N_("Disable inline gtk theme"), &config.disable_inline_gtk, NULL, NULL, FALSE}, |
3039
f856ff6a0055
Add random skin on play to skins plugin preferences (bug #28)
Tomasz Mon <desowin@gmail.com>
parents:
2971
diff
changeset
|
343 {WIDGET_CHK_BTN, N_("Random skin on play"), &config.random_skin_on_play, NULL, NULL, FALSE}, |
2690
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
344 {WIDGET_CHK_BTN, N_("Allow loading incomplete skins"), &config.allow_broken_skins, NULL, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
345 N_("If selected, audacious won't refuse loading broken skins. Use only if your favourite skin doesn't work"), FALSE}, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
346 }; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
347 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
348 static gboolean |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
349 on_skin_view_realize(GtkTreeView * treeview, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
350 gpointer data) |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
351 { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
352 skin_view_realize(treeview); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
353 skin_view_update(GTK_TREE_VIEW(skin_view), GTK_WIDGET(skin_refresh_button)); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
354 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
355 return TRUE; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
356 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
357 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
358 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
359 reload_skin() |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
360 { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
361 /* reload the skin to apply the change */ |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
362 skin_reload_forced(); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
363 ui_skinned_window_draw_all(mainwin); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
364 ui_skinned_window_draw_all(equalizerwin); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
365 ui_skinned_window_draw_all(playlistwin); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
366 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
367 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
368 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
369 on_red_scale_value_changed(GtkHScale *scale, gpointer data) |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
370 { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
371 config.colorize_r = gtk_range_get_value(GTK_RANGE(scale)); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
372 reload_skin(); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
373 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
374 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
375 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
376 on_green_scale_value_changed(GtkHScale *scale, gpointer data) |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
377 { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
378 config.colorize_g = gtk_range_get_value(GTK_RANGE(scale)); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
379 reload_skin(); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
380 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
381 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
382 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
383 on_blue_scale_value_changed(GtkHScale *scale, gpointer data) |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
384 { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
385 config.colorize_b = gtk_range_get_value(GTK_RANGE(scale)); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
386 reload_skin(); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
387 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
388 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
389 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
390 on_colorize_close_clicked(GtkButton *button, gpointer data) |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
391 { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
392 gtk_widget_destroy(colorize_settings); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
393 colorize_settings = NULL; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
394 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
395 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
396 void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
397 create_colorize_settings(void) |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
398 { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
399 GtkWidget *vbox; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
400 GtkWidget *label; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
401 GtkWidget *table; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
402 GtkWidget *hbuttonbox; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
403 GtkWidget *colorize_close; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
404 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
405 GtkWidget *green_label; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
406 GtkWidget *red_label; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
407 GtkWidget *blue_label; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
408 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
409 colorize_settings = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
410 gtk_container_set_border_width(GTK_CONTAINER(colorize_settings), 12); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
411 gtk_window_set_title(GTK_WINDOW(colorize_settings), _("Color Adjustment")); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
412 gtk_window_set_type_hint(GTK_WINDOW(colorize_settings), GDK_WINDOW_TYPE_HINT_DIALOG); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
413 gtk_window_set_transient_for(GTK_WINDOW(colorize_settings), GTK_WINDOW(cfg_win)); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
414 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
415 vbox = gtk_vbox_new(FALSE, 12); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
416 gtk_container_add(GTK_CONTAINER(colorize_settings), vbox); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
417 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
418 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.")); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
419 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
420 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
421 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
422 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
423 table = gtk_table_new(3, 2, FALSE); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
424 gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
425 gtk_table_set_row_spacings(GTK_TABLE(table), 6); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
426 gtk_table_set_col_spacings(GTK_TABLE(table), 12); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
427 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
428 blue_label = gtk_label_new(_("Blue")); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
429 gtk_table_attach(GTK_TABLE(table), blue_label, 0, 1, 2, 3, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
430 (GtkAttachOptions) (0), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
431 (GtkAttachOptions) (0), 0, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
432 gtk_label_set_justify(GTK_LABEL(blue_label), GTK_JUSTIFY_RIGHT); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
433 gtk_misc_set_alignment(GTK_MISC(blue_label), 1, 0.5); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
434 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
435 green_label = gtk_label_new(_("Green")); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
436 gtk_table_attach(GTK_TABLE(table), green_label, 0, 1, 1, 2, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
437 (GtkAttachOptions) (0), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
438 (GtkAttachOptions) (0), 0, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
439 gtk_label_set_justify(GTK_LABEL(green_label), GTK_JUSTIFY_RIGHT); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
440 gtk_misc_set_alignment(GTK_MISC(green_label), 1, 0.5); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
441 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
442 red_label = gtk_label_new(_("Red")); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
443 gtk_table_attach(GTK_TABLE(table), red_label, 0, 1, 0, 1, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
444 (GtkAttachOptions) (0), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
445 (GtkAttachOptions) (0), 0, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
446 gtk_label_set_justify(GTK_LABEL(red_label), GTK_JUSTIFY_RIGHT); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
447 gtk_misc_set_alignment(GTK_MISC(red_label), 1, 0.5); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
448 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
449 red_scale = gtk_hscale_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 255, 0, 0, 0))); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
450 gtk_table_attach(GTK_TABLE(table), red_scale, 1, 2, 0, 1, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
451 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
452 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
453 gtk_scale_set_draw_value(GTK_SCALE(red_scale), FALSE); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
454 gtk_scale_set_digits(GTK_SCALE(red_scale), 3); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
455 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
456 green_scale = gtk_hscale_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 255, 0, 0, 0))); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
457 gtk_table_attach(GTK_TABLE(table), green_scale, 1, 2, 1, 2, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
458 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
459 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
460 gtk_scale_set_draw_value(GTK_SCALE(green_scale), FALSE); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
461 gtk_scale_set_digits(GTK_SCALE(green_scale), 3); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
462 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
463 blue_scale = gtk_hscale_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 255, 0, 0, 0))); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
464 gtk_table_attach(GTK_TABLE(table), blue_scale, 1, 2, 2, 3, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
465 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
466 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
467 gtk_scale_set_draw_value(GTK_SCALE(blue_scale), FALSE); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
468 gtk_scale_set_digits(GTK_SCALE(blue_scale), 3); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
469 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
470 hbuttonbox = gtk_hbutton_box_new(); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
471 gtk_box_pack_start(GTK_BOX(vbox), hbuttonbox, FALSE, FALSE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
472 gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox), GTK_BUTTONBOX_END); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
473 gtk_box_set_spacing(GTK_BOX(hbuttonbox), 6); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
474 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
475 colorize_close = gtk_button_new_from_stock("gtk-close"); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
476 gtk_container_add(GTK_CONTAINER(hbuttonbox), colorize_close); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
477 GTK_WIDGET_SET_FLAGS(colorize_close, GTK_CAN_DEFAULT); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
478 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
479 g_signal_connect((gpointer) red_scale, "value_changed", |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
480 G_CALLBACK(on_red_scale_value_changed), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
481 NULL); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
482 g_signal_connect((gpointer) green_scale, "value_changed", |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
483 G_CALLBACK(on_green_scale_value_changed), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
484 NULL); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
485 g_signal_connect((gpointer) blue_scale, "value_changed", |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
486 G_CALLBACK(on_blue_scale_value_changed), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
487 NULL); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
488 g_signal_connect((gpointer) colorize_close, "clicked", |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
489 G_CALLBACK(on_colorize_close_clicked), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
490 NULL); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
491 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
492 gtk_range_set_value(GTK_RANGE(red_scale), config.colorize_r); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
493 gtk_range_set_value(GTK_RANGE(green_scale), config.colorize_g); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
494 gtk_range_set_value(GTK_RANGE(blue_scale), config.colorize_b); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
495 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
496 gtk_widget_grab_default(colorize_close); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
497 gtk_widget_show_all(colorize_settings); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
498 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
499 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
500 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
501 on_colorize_button_clicked(GtkButton *button, gpointer data) |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
502 { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
503 if (colorize_settings) |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
504 gtk_window_present(GTK_WINDOW(colorize_settings)); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
505 else |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
506 create_colorize_settings(); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
507 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
508 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
509 void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
510 on_skin_view_drag_data_received(GtkWidget * widget, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
511 GdkDragContext * context, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
512 gint x, gint y, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
513 GtkSelectionData * selection_data, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
514 guint info, guint time, |
2837
bdc4fbf878ec
make use of new InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
2793
diff
changeset
|
515 gpointer user_data) |
2690
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
516 { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
517 mcs_handle_t *db; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
518 gchar *path; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
519 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
520 if (!selection_data->data) { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
521 g_warning("DND data string is NULL"); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
522 return; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
523 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
524 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
525 path = (gchar *) selection_data->data; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
526 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
527 /* FIXME: use a real URL validator/parser */ |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
528 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
529 if (aud_str_has_prefix_nocase(path, "file:///")) { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
530 path[strlen(path) - 2] = 0; /* Why the hell a CR&LF? */ |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
531 path += 7; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
532 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
533 else if (aud_str_has_prefix_nocase(path, "file:")) { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
534 path += 5; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
535 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
536 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
537 if (file_is_archive(path)) { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
538 if (!aud_active_skin_load(path)) |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
539 return; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
540 skin_install_skin(path); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
541 skin_view_update(GTK_TREE_VIEW(widget), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
542 GTK_WIDGET(skin_refresh_button)); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
543 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
544 /* Change skin name in the config file */ |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
545 db = aud_cfg_db_open(); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
546 aud_cfg_db_set_string(db, "skins", "skin", path); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
547 aud_cfg_db_close(db); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
548 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
549 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
550 |
2793 | 551 GtkWidget* skins_configure(void) { |
2690
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
552 GtkWidget *appearance_page_vbox; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
553 GtkWidget *vbox37; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
554 GtkWidget *vbox38; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
555 GtkWidget *hbox12; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
556 GtkWidget *alignment94; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
557 GtkWidget *hbox13; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
558 GtkWidget *label103; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
559 GtkWidget *colorspace_button; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
560 GtkWidget *image11; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
561 GtkWidget *image12; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
562 GtkWidget *alignment95; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
563 GtkWidget *skin_view_scrolled_window; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
564 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
565 appearance_page_vbox = gtk_vbox_new (FALSE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
566 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
567 vbox37 = gtk_vbox_new (FALSE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
568 gtk_box_pack_start (GTK_BOX (appearance_page_vbox), vbox37, TRUE, TRUE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
569 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
570 vbox38 = gtk_vbox_new (FALSE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
571 gtk_box_pack_start (GTK_BOX (vbox37), vbox38, FALSE, TRUE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
572 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
573 hbox12 = gtk_hbox_new (FALSE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
574 gtk_box_pack_start (GTK_BOX (vbox38), hbox12, TRUE, TRUE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
575 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
576 alignment94 = gtk_alignment_new (0.5, 0.5, 1, 1); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
577 gtk_box_pack_start (GTK_BOX (hbox12), alignment94, TRUE, TRUE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
578 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment94), 0, 4, 0, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
579 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
580 hbox13 = gtk_hbox_new (FALSE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
581 gtk_container_add (GTK_CONTAINER (alignment94), hbox13); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
582 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
583 label103 = gtk_label_new_with_mnemonic (_("<b>_Skin</b>")); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
584 gtk_box_pack_start (GTK_BOX (hbox13), label103, TRUE, TRUE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
585 gtk_label_set_use_markup (GTK_LABEL (label103), TRUE); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
586 gtk_misc_set_alignment (GTK_MISC (label103), 0, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
587 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
588 colorspace_button = gtk_button_new (); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
589 gtk_box_pack_start (GTK_BOX (hbox13), colorspace_button, FALSE, FALSE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
590 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
591 image11 = gtk_image_new_from_stock ("gtk-properties", GTK_ICON_SIZE_BUTTON); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
592 gtk_container_add (GTK_CONTAINER (colorspace_button), image11); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
593 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
594 skin_refresh_button = gtk_button_new (); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
595 gtk_box_pack_start (GTK_BOX (hbox13), skin_refresh_button, FALSE, FALSE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
596 GTK_WIDGET_UNSET_FLAGS (skin_refresh_button, GTK_CAN_FOCUS); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
597 gtk_button_set_relief (GTK_BUTTON (skin_refresh_button), GTK_RELIEF_HALF); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
598 gtk_button_set_focus_on_click (GTK_BUTTON (skin_refresh_button), FALSE); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
599 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
600 image12 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
601 gtk_container_add (GTK_CONTAINER (skin_refresh_button), image12); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
602 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
603 alignment95 = gtk_alignment_new (0.5, 0.5, 1, 1); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
604 gtk_box_pack_start (GTK_BOX (vbox38), alignment95, TRUE, TRUE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
605 gtk_widget_set_size_request (alignment95, -1, 172); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
606 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment95), 0, 0, 12, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
607 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
608 skin_view_scrolled_window = gtk_scrolled_window_new (NULL, NULL); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
609 gtk_container_add (GTK_CONTAINER (alignment95), skin_view_scrolled_window); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
610 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (skin_view_scrolled_window), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
611 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (skin_view_scrolled_window), GTK_SHADOW_IN); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
612 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
613 skin_view = gtk_tree_view_new (); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
614 gtk_container_add (GTK_CONTAINER (skin_view_scrolled_window), skin_view); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
615 gtk_widget_set_size_request (skin_view, -1, 100); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
616 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
617 aud_create_widgets(GTK_BOX(vbox37), appearance_misc_widgets, G_N_ELEMENTS(appearance_misc_widgets)); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
618 gtk_widget_show_all(appearance_page_vbox); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
619 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
620 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
621 g_signal_connect(G_OBJECT(colorspace_button), "clicked", |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
622 G_CALLBACK(on_colorize_button_clicked), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
623 NULL); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
624 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
625 g_signal_connect(skin_view, "drag-data-received", |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
626 G_CALLBACK(on_skin_view_drag_data_received), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
627 NULL); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
628 aud_drag_dest_set(skin_view); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
629 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
630 g_signal_connect(mainwin, "drag-data-received", |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
631 G_CALLBACK(mainwin_drag_data_received), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
632 skin_view); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
633 #if 0 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
634 g_signal_connect(skin_refresh_button, "clicked", |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
635 G_CALLBACK(on_skin_refresh_button_clicked), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
636 NULL); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
637 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
638 g_signal_connect_swapped(G_OBJECT(skin_refresh_button), "clicked", |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
639 G_CALLBACK(on_skin_refresh_button_clicked), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
640 prefswin); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
641 #endif |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
642 g_signal_connect_after(G_OBJECT(skin_view), "realize", |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
643 G_CALLBACK(on_skin_view_realize), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
644 NULL); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
645 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
646 gtk_window_present(GTK_WINDOW(cfg_win)); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
647 |
2793 | 648 return appearance_page_vbox; |
2690
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
649 } |