Mercurial > audlegacy-plugins
annotate src/skins/skins_cfg.c @ 3178:4634dab72608
alsa-ng: Add get_volume() implementation.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Wed, 10 Jun 2009 00:06:15 -0500 |
parents | 1ffcad5f406c |
children |
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, | |
2679
fb5375e86a03
make setting random skin on play working
Tomasz Mon <desowin@gmail.com>
parents:
2642
diff
changeset
|
109 .random_skin_on_play = FALSE, |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
110 }; |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
111 |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
112 typedef struct skins_cfg_boolent_t { |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
113 char const *be_vname; |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
114 gboolean *be_vloc; |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
115 gboolean be_wrt; |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
116 } skins_cfg_boolent; |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
117 |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
118 static skins_cfg_boolent skins_boolents[] = { |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
119 {"always_show_cb", &config.always_show_cb, TRUE}, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
120 {"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
|
121 {"sticky", &config.sticky, TRUE}, |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
122 {"always_show_cb", &config.always_show_cb, TRUE}, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
123 {"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
|
124 {"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
|
125 {"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
|
126 {"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
|
127 {"player_visible", &config.player_visible, TRUE}, |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
128 {"player_shaded", &config.player_shaded, TRUE}, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
129 {"equalizer_shaded", &config.equalizer_shaded, TRUE}, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
130 {"playlist_shaded", &config.playlist_shaded, TRUE}, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
131 {"dim_titlebar", &config.dim_titlebar, TRUE}, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
132 {"show_wm_decorations", &config.show_wm_decorations, TRUE}, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
133 {"easy_move", &config.easy_move, TRUE}, |
2584 | 134 {"allow_broken_skins", &config.allow_broken_skins, TRUE}, |
135 {"disable_inline_gtk", &config.disable_inline_gtk, TRUE}, | |
2583 | 136 {"snap_windows", &config.snap_windows, TRUE}, |
137 {"save_window_positions", &config.save_window_position, TRUE}, | |
2584 | 138 {"analyzer_peaks", &config.analyzer_peaks, TRUE}, |
2586 | 139 {"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
|
140 {"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
|
141 {"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
|
142 {"mainwin_use_bitmapfont", &config.mainwin_use_bitmapfont, TRUE}, |
2606 | 143 {"eq_scaled_linked", &config.eq_scaled_linked, TRUE}, |
2620 | 144 {"show_numbers_in_pl", &config.show_numbers_in_pl, TRUE}, |
145 {"show_separator_in_pl", &config.show_separator_in_pl, TRUE}, | |
2679
fb5375e86a03
make setting random skin on play working
Tomasz Mon <desowin@gmail.com>
parents:
2642
diff
changeset
|
146 {"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
|
147 }; |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
148 |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
149 static gint ncfgbent = G_N_ELEMENTS(skins_boolents); |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
150 |
2583 | 151 typedef struct skins_cfg_nument_t { |
152 char const *ie_vname; | |
153 gint *ie_vloc; | |
154 gboolean ie_wrt; | |
155 } skins_cfg_nument; | |
156 | |
157 static skins_cfg_nument skins_numents[] = { | |
158 {"player_x", &config.player_x, TRUE}, | |
159 {"player_y", &config.player_y, TRUE}, | |
160 {"timer_mode", &config.timer_mode, TRUE}, | |
161 {"vis_type", &config.vis_type, TRUE}, | |
162 {"analyzer_mode", &config.analyzer_mode, TRUE}, | |
163 {"analyzer_type", &config.analyzer_type, TRUE}, | |
164 {"scope_mode", &config.scope_mode, TRUE}, | |
165 {"vu_mode", &config.vu_mode, TRUE}, | |
166 {"voiceprint_mode", &config.voiceprint_mode, TRUE}, | |
167 {"vis_refresh_rate", &config.vis_refresh, TRUE}, | |
168 {"analyzer_falloff", &config.analyzer_falloff, TRUE}, | |
169 {"peaks_falloff", &config.peaks_falloff, TRUE}, | |
170 {"playlist_x", &config.playlist_x, TRUE}, | |
171 {"playlist_y", &config.playlist_y, TRUE}, | |
172 {"playlist_width", &config.playlist_width, TRUE}, | |
173 {"playlist_height", &config.playlist_height, TRUE}, | |
174 {"playlist_position", &config.playlist_position, TRUE}, | |
175 {"equalizer_x", &config.equalizer_x, TRUE}, | |
176 {"equalizer_y", &config.equalizer_y, TRUE}, | |
177 {"mouse_wheel_change", &config.mouse_change, TRUE}, | |
178 {"scroll_pl_by", &config.scroll_pl_by, TRUE}, | |
179 {"colorize_r", &config.colorize_r, TRUE}, | |
180 {"colorize_g", &config.colorize_g, TRUE}, | |
181 {"colorize_b", &config.colorize_b, TRUE}, | |
182 {"snap_distance", &config.snap_distance, TRUE}, | |
183 }; | |
184 | |
185 static gint ncfgient = G_N_ELEMENTS(skins_numents); | |
186 | |
2642 | 187 typedef struct skins_cfg_strent_t { |
188 char const *se_vname; | |
189 char **se_vloc; | |
190 gboolean se_wrt; | |
191 } skins_cfg_strent; | |
192 | |
193 static skins_cfg_strent skins_strents[] = { | |
194 {"playlist_font", &config.playlist_font, TRUE}, | |
195 {"mainwin_font", &config.mainwin_font, TRUE}, | |
196 {"skin", &config.skin, FALSE}, | |
197 }; | |
198 | |
199 static gint ncfgsent = G_N_ELEMENTS(skins_strents); | |
200 | |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
201 void skins_cfg_free() { |
2642 | 202 gint i; |
203 for (i = 0; i < ncfgsent; ++i) { | |
204 if (*(skins_strents[i].se_vloc) != NULL) { | |
205 g_free( *(skins_strents[i].se_vloc) ); | |
206 *(skins_strents[i].se_vloc) = NULL; | |
207 } | |
208 } | |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
209 } |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
210 |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
211 void skins_cfg_load() { |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
212 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
|
213 |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
214 memcpy(&config, &skins_default_config, sizeof(skins_cfg_t)); |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
215 int i; |
2635
b990e7eb0c25
save config on plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2620
diff
changeset
|
216 |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
217 for (i = 0; i < ncfgbent; ++i) { |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
218 aud_cfg_db_get_bool(cfgfile, "skins", |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
219 skins_boolents[i].be_vname, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
220 skins_boolents[i].be_vloc); |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
221 } |
2635
b990e7eb0c25
save config on plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2620
diff
changeset
|
222 |
2583 | 223 for (i = 0; i < ncfgient; ++i) { |
224 aud_cfg_db_get_int(cfgfile, "skins", | |
225 skins_numents[i].ie_vname, | |
226 skins_numents[i].ie_vloc); | |
227 } | |
2581 | 228 |
2642 | 229 for (i = 0; i < ncfgsent; ++i) { |
230 aud_cfg_db_get_string(cfgfile, "skins", | |
231 skins_strents[i].se_vname, | |
232 skins_strents[i].se_vloc); | |
233 } | |
234 | |
235 if (!config.mainwin_font) | |
236 config.mainwin_font = g_strdup(MAINWIN_DEFAULT_FONT); | |
237 | |
238 if (!config.playlist_font) | |
239 config.playlist_font = g_strdup(PLAYLISTWIN_DEFAULT_FONT); | |
2573
c0b08527b121
allow loading compressed skins
Tomasz Mon <desowin@gmail.com>
parents:
2572
diff
changeset
|
240 |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
241 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
|
242 config.scale_factor = 2.0; |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
243 |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
244 aud_cfg_db_close(cfgfile); |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
245 } |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
246 |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
247 |
2635
b990e7eb0c25
save config on plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2620
diff
changeset
|
248 void skins_cfg_save() { |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
249 mcs_handle_t *cfgfile = aud_cfg_db_open(); |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
250 |
2636 | 251 if (aud_active_skin != NULL) { |
252 if (aud_active_skin->path) | |
253 aud_cfg_db_set_string(cfgfile, "skins", "skin", aud_active_skin->path); | |
254 else | |
255 aud_cfg_db_unset_key(cfgfile, "skins", "skin"); | |
256 } | |
257 | |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
258 int i; |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
259 |
2642 | 260 for (i = 0; i < ncfgsent; ++i) { |
261 if (skins_strents[i].se_wrt) | |
262 aud_cfg_db_set_string(cfgfile, "skins", | |
263 skins_strents[i].se_vname, | |
264 *skins_strents[i].se_vloc); | |
265 } | |
266 | |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
267 for (i = 0; i < ncfgbent; ++i) |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
268 if (skins_boolents[i].be_wrt) |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
269 aud_cfg_db_set_bool(cfgfile, "skins", |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
270 skins_boolents[i].be_vname, |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
271 *skins_boolents[i].be_vloc); |
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
272 |
2583 | 273 for (i = 0; i < ncfgient; ++i) |
274 if (skins_numents[i].ie_wrt) | |
275 aud_cfg_db_set_int(cfgfile, "skins", | |
276 skins_numents[i].ie_vname, | |
277 *skins_numents[i].ie_vloc); | |
278 | |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2581
diff
changeset
|
279 aud_cfg_db_close(cfgfile); |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
280 } |
2690
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
281 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
282 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
283 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
284 playlist_show_pl_separator_numbers_cb() |
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 playlistwin_update_list(aud_playlist_get_active()); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
287 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
288 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
289 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
290 mainwin_font_set_cb() |
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 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
|
293 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
294 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
295 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
296 playlist_font_set_cb() |
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 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
|
299 ui_skinned_playlist_set_font(config.playlist_font); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
300 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
|
301 playlistwin_update_list(aud_playlist_get_active()); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
302 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
303 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
304 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
305 bitmap_fonts_cb() |
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 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
|
308 playlistwin_set_sinfo_font(config.playlist_font); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
309 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
310 if (config.playlist_shaded) { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
311 playlistwin_update_list(aud_playlist_get_active()); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
312 ui_skinned_window_draw_all(playlistwin); |
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 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
315 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
316 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
317 show_wm_decorations_cb() |
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 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
|
320 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
|
321 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
|
322 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
323 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
324 static PreferencesWidget appearance_misc_widgets[] = { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
325 {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
|
326 {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
|
327 {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
|
328 {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
|
329 {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
|
330 {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
|
331 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
|
332 {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
|
333 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
|
334 {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
|
335 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
|
336 {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
|
337 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
|
338 {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
|
339 {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
|
340 {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
|
341 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
|
342 }; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
343 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
344 static gboolean |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
345 on_skin_view_realize(GtkTreeView * treeview, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
346 gpointer data) |
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 skin_view_realize(treeview); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
349 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
|
350 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
351 return TRUE; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
352 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
353 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
354 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
355 reload_skin() |
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 /* reload the skin to apply the change */ |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
358 skin_reload_forced(); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
359 ui_skinned_window_draw_all(mainwin); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
360 ui_skinned_window_draw_all(equalizerwin); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
361 ui_skinned_window_draw_all(playlistwin); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
362 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
363 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
364 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
365 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
|
366 { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
367 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
|
368 reload_skin(); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
369 } |
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 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
372 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
|
373 { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
374 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
|
375 reload_skin(); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
376 } |
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 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
379 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
|
380 { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
381 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
|
382 reload_skin(); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
383 } |
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 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
386 on_colorize_close_clicked(GtkButton *button, gpointer data) |
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 gtk_widget_destroy(colorize_settings); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
389 colorize_settings = NULL; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
390 } |
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 void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
393 create_colorize_settings(void) |
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 GtkWidget *vbox; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
396 GtkWidget *label; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
397 GtkWidget *table; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
398 GtkWidget *hbuttonbox; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
399 GtkWidget *colorize_close; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
400 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
401 GtkWidget *green_label; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
402 GtkWidget *red_label; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
403 GtkWidget *blue_label; |
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 colorize_settings = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
406 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
|
407 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
|
408 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
|
409 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
|
410 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
411 vbox = gtk_vbox_new(FALSE, 12); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
412 gtk_container_add(GTK_CONTAINER(colorize_settings), vbox); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
413 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
414 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
|
415 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
|
416 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
|
417 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
|
418 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
419 table = gtk_table_new(3, 2, FALSE); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
420 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
|
421 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
|
422 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
|
423 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
424 blue_label = gtk_label_new(_("Blue")); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
425 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
|
426 (GtkAttachOptions) (0), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
427 (GtkAttachOptions) (0), 0, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
428 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
|
429 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
|
430 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
431 green_label = gtk_label_new(_("Green")); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
432 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
|
433 (GtkAttachOptions) (0), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
434 (GtkAttachOptions) (0), 0, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
435 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
|
436 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
|
437 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
438 red_label = gtk_label_new(_("Red")); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
439 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
|
440 (GtkAttachOptions) (0), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
441 (GtkAttachOptions) (0), 0, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
442 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
|
443 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
|
444 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
445 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
|
446 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
|
447 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
448 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
449 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
|
450 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
|
451 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
452 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
|
453 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
|
454 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
455 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
456 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
|
457 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
|
458 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
459 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
|
460 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
|
461 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
462 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
463 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
|
464 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
|
465 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
466 hbuttonbox = gtk_hbutton_box_new(); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
467 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
|
468 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
|
469 gtk_box_set_spacing(GTK_BOX(hbuttonbox), 6); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
470 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
471 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
|
472 gtk_container_add(GTK_CONTAINER(hbuttonbox), colorize_close); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
473 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
|
474 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
475 g_signal_connect((gpointer) red_scale, "value_changed", |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
476 G_CALLBACK(on_red_scale_value_changed), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
477 NULL); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
478 g_signal_connect((gpointer) green_scale, "value_changed", |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
479 G_CALLBACK(on_green_scale_value_changed), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
480 NULL); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
481 g_signal_connect((gpointer) blue_scale, "value_changed", |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
482 G_CALLBACK(on_blue_scale_value_changed), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
483 NULL); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
484 g_signal_connect((gpointer) colorize_close, "clicked", |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
485 G_CALLBACK(on_colorize_close_clicked), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
486 NULL); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
487 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
488 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
|
489 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
|
490 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
|
491 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
492 gtk_widget_grab_default(colorize_close); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
493 gtk_widget_show_all(colorize_settings); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
494 } |
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 static void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
497 on_colorize_button_clicked(GtkButton *button, gpointer data) |
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 if (colorize_settings) |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
500 gtk_window_present(GTK_WINDOW(colorize_settings)); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
501 else |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
502 create_colorize_settings(); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
503 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
504 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
505 void |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
506 on_skin_view_drag_data_received(GtkWidget * widget, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
507 GdkDragContext * context, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
508 gint x, gint y, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
509 GtkSelectionData * selection_data, |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
510 guint info, guint time, |
2837
bdc4fbf878ec
make use of new InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
2793
diff
changeset
|
511 gpointer user_data) |
2690
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
512 { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
513 mcs_handle_t *db; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
514 gchar *path; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
515 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
516 if (!selection_data->data) { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
517 g_warning("DND data string is NULL"); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
518 return; |
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 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
521 path = (gchar *) selection_data->data; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
522 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
523 /* FIXME: use a real URL validator/parser */ |
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 if (aud_str_has_prefix_nocase(path, "file:///")) { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
526 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
|
527 path += 7; |
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 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
|
530 path += 5; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
531 } |
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 if (file_is_archive(path)) { |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
534 if (!aud_active_skin_load(path)) |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
535 return; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
536 skin_install_skin(path); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
537 skin_view_update(GTK_TREE_VIEW(widget), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
538 GTK_WIDGET(skin_refresh_button)); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
539 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
540 /* Change skin name in the config file */ |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
541 db = aud_cfg_db_open(); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
542 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
|
543 aud_cfg_db_close(db); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
544 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
545 } |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
546 |
2793 | 547 GtkWidget* skins_configure(void) { |
2690
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
548 GtkWidget *appearance_page_vbox; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
549 GtkWidget *vbox37; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
550 GtkWidget *vbox38; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
551 GtkWidget *hbox12; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
552 GtkWidget *alignment94; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
553 GtkWidget *hbox13; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
554 GtkWidget *label103; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
555 GtkWidget *colorspace_button; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
556 GtkWidget *image11; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
557 GtkWidget *image12; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
558 GtkWidget *alignment95; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
559 GtkWidget *skin_view_scrolled_window; |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
560 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
561 appearance_page_vbox = gtk_vbox_new (FALSE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
562 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
563 vbox37 = gtk_vbox_new (FALSE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
564 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
|
565 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
566 vbox38 = gtk_vbox_new (FALSE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
567 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
|
568 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
569 hbox12 = gtk_hbox_new (FALSE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
570 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
|
571 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
572 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
|
573 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
|
574 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
|
575 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
576 hbox13 = gtk_hbox_new (FALSE, 0); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
577 gtk_container_add (GTK_CONTAINER (alignment94), hbox13); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
578 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
579 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
|
580 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
|
581 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
|
582 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
|
583 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
584 colorspace_button = gtk_button_new (); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
585 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
|
586 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
587 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
|
588 gtk_container_add (GTK_CONTAINER (colorspace_button), image11); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
589 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
590 skin_refresh_button = gtk_button_new (); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
591 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
|
592 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
|
593 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
|
594 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
|
595 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
596 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
|
597 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
|
598 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
599 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
|
600 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
|
601 gtk_widget_set_size_request (alignment95, -1, 172); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
602 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
|
603 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
604 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
|
605 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
|
606 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
|
607 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
|
608 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
609 skin_view = gtk_tree_view_new (); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
610 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
|
611 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
|
612 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
613 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
|
614 gtk_widget_show_all(appearance_page_vbox); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
615 |
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 g_signal_connect(G_OBJECT(colorspace_button), "clicked", |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
618 G_CALLBACK(on_colorize_button_clicked), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
619 NULL); |
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(skin_view, "drag-data-received", |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
622 G_CALLBACK(on_skin_view_drag_data_received), |
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 aud_drag_dest_set(skin_view); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
625 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
626 g_signal_connect(mainwin, "drag-data-received", |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
627 G_CALLBACK(mainwin_drag_data_received), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
628 skin_view); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
629 #if 0 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
630 g_signal_connect(skin_refresh_button, "clicked", |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
631 G_CALLBACK(on_skin_refresh_button_clicked), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
632 NULL); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
633 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
634 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
|
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 prefswin); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
637 #endif |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
638 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
|
639 G_CALLBACK(on_skin_view_realize), |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
640 NULL); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
641 |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
642 gtk_window_present(GTK_WINDOW(cfg_win)); |
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
643 |
2793 | 644 return appearance_page_vbox; |
2690
a8328c40a5c1
more work on skins plugin settings
Tomasz Mon <desowin@gmail.com>
parents:
2680
diff
changeset
|
645 } |