Mercurial > audlegacy
annotate audacious/widgets/skin.c @ 1811:a6a248bfafc3 trunk
[svn] - create the windows during skin load process after the skin.hints has been loaded
author | nenolod |
---|---|
date | Wed, 04 Oct 2006 23:16:49 -0700 |
parents | e0e46bce806e |
children | 97e060182873 |
rev | line source |
---|---|
1653 | 1 /* BMP - Cross-platform multimedia player |
2 * Copyright (C) 2003-2004 BMP development team. | |
3 * | |
4 * Based on XMMS: | |
5 * Copyright (C) 1998-2003 XMMS development team. | |
6 * | |
7 * This program is free software; you can redistribute it and/or modify | |
8 * it under the terms of the GNU General Public License as published by | |
9 * the Free Software Foundation; either version 2 of the License, or | |
10 * (at your option) any later version. | |
11 * | |
12 * This program is distributed in the hope that it will be useful, | |
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 * GNU General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU General Public License | |
18 * along with this program; if not, write to the Free Software | |
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
20 */ | |
21 | |
22 #ifdef HAVE_CONFIG_H | |
23 # include "config.h" | |
24 #endif | |
25 | |
26 /* TODO: enforce default sizes! */ | |
27 | |
28 #include <glib.h> | |
29 #include <stdio.h> | |
30 #include <stdlib.h> | |
31 #include <string.h> | |
32 #include <ctype.h> | |
33 | |
34 #include "widgetcore.h" | |
35 | |
36 #include "equalizer.h" | |
37 #include "main.h" | |
38 #include "ui_playlist.h" | |
39 #include "skinwin.h" | |
40 #include "util.h" | |
41 | |
42 #include "debug.h" | |
43 | |
44 #include "platform/smartinclude.h" | |
1670 | 45 #include "libaudacious/vfs.h" |
1653 | 46 |
47 #define EXTENSION_TARGETS 7 | |
48 | |
49 static gchar *ext_targets[EXTENSION_TARGETS] = { "bmp", "xpm", "png", "svg", | |
50 "gif", "jpg", "jpeg" }; | |
51 | |
52 struct _SkinPixmapIdMapping { | |
53 SkinPixmapId id; | |
54 const gchar *name; | |
55 const gchar *alt_name; | |
56 gint width, height; | |
57 }; | |
58 | |
59 struct _SkinMaskInfo { | |
60 gint width, height; | |
61 gchar *inistr; | |
62 }; | |
63 | |
64 typedef struct _SkinPixmapIdMapping SkinPixmapIdMapping; | |
65 typedef struct _SkinMaskInfo SkinMaskInfo; | |
66 | |
67 | |
68 Skin *bmp_active_skin = NULL; | |
69 | |
70 static gint skin_current_num; | |
71 | |
72 static SkinMaskInfo skin_mask_info[] = { | |
73 {275, 116, "Normal"}, | |
74 {275, 16, "WindowShade"}, | |
75 {275, 116, "Equalizer"}, | |
76 {275, 16, "EqualizerWS"} | |
77 }; | |
78 | |
79 static SkinPixmapIdMapping skin_pixmap_id_map[] = { | |
80 {SKIN_MAIN, "main", NULL, 0, 0}, | |
81 {SKIN_CBUTTONS, "cbuttons", NULL, 0, 0}, | |
82 {SKIN_SHUFREP, "shufrep", NULL, 0, 0}, | |
83 {SKIN_TEXT, "text", NULL, 0, 0}, | |
84 {SKIN_TITLEBAR, "titlebar", NULL, 0, 0}, | |
85 {SKIN_VOLUME, "volume", NULL, 0, 0}, | |
86 {SKIN_BALANCE, "balance", "volume", 0, 0}, | |
87 {SKIN_MONOSTEREO, "monoster", NULL, 0, 0}, | |
88 {SKIN_PLAYPAUSE, "playpaus", NULL, 0, 0}, | |
89 {SKIN_NUMBERS, "nums_ex", "numbers", 0, 0}, | |
90 {SKIN_POSBAR, "posbar", NULL, 0, 0}, | |
91 {SKIN_EQMAIN, "eqmain", NULL, 0, 0}, | |
92 {SKIN_PLEDIT, "pledit", NULL, 0, 0}, | |
93 {SKIN_EQ_EX, "eq_ex", NULL, 0, 0} | |
94 }; | |
95 | |
96 static guint skin_pixmap_id_map_size = G_N_ELEMENTS(skin_pixmap_id_map); | |
97 | |
98 static const guchar skin_default_viscolor[24][3] = { | |
99 {9, 34, 53}, | |
100 {10, 18, 26}, | |
101 {0, 54, 108}, | |
102 {0, 58, 116}, | |
103 {0, 62, 124}, | |
104 {0, 66, 132}, | |
105 {0, 70, 140}, | |
106 {0, 74, 148}, | |
107 {0, 78, 156}, | |
108 {0, 82, 164}, | |
109 {0, 86, 172}, | |
110 {0, 92, 184}, | |
111 {0, 98, 196}, | |
112 {0, 104, 208}, | |
113 {0, 110, 220}, | |
114 {0, 116, 232}, | |
115 {0, 122, 244}, | |
116 {0, 128, 255}, | |
117 {0, 128, 255}, | |
118 {0, 104, 208}, | |
119 {0, 80, 160}, | |
120 {0, 56, 112}, | |
121 {0, 32, 64}, | |
122 {200, 200, 200} | |
123 }; | |
124 | |
125 static GdkBitmap * | |
126 skin_create_transparent_mask(const gchar *, | |
127 const gchar *, | |
128 const gchar *, | |
129 GdkWindow *, | |
130 gint, gint); | |
131 | |
132 static void | |
133 skin_setup_masks(Skin * skin); | |
134 | |
135 static void | |
136 skin_set_default_vis_color(Skin * skin); | |
137 | |
138 | |
139 void | |
140 skin_lock(Skin * skin) | |
141 { | |
142 g_mutex_lock(skin->lock); | |
143 } | |
144 | |
145 void | |
146 skin_unlock(Skin * skin) | |
147 { | |
148 g_mutex_unlock(skin->lock); | |
149 } | |
150 | |
151 gboolean | |
152 bmp_active_skin_reload(void) | |
153 { | |
154 return bmp_active_skin_load(bmp_active_skin->path); | |
155 } | |
156 | |
157 gboolean | |
158 bmp_active_skin_load(const gchar * path) | |
159 { | |
160 g_return_val_if_fail(bmp_active_skin != NULL, FALSE); | |
161 | |
162 memset(&bmp_active_skin->properties, 0, sizeof(SkinProperties)); | |
163 | |
164 if (!skin_load(bmp_active_skin, path)) | |
165 return FALSE; | |
166 | |
167 skin_setup_masks(bmp_active_skin); | |
168 | |
169 if (cfg.playlist_transparent) | |
170 { | |
171 if (rootpix != NULL) | |
172 g_object_unref(rootpix); | |
173 | |
174 rootpix = shade_pixmap(get_transparency_pixmap(), 0, 0, 0, 0, gdk_screen_width(), gdk_screen_height(), | |
175 skin_get_color(bmp_active_skin, SKIN_PLEDIT_NORMALBG)); | |
176 } | |
177 | |
178 draw_main_window(TRUE); | |
179 draw_playlist_window(TRUE); | |
180 draw_equalizer_window(TRUE); | |
181 | |
182 vis_set_window(mainwin_vis, mainwin->window); | |
183 playlistwin_update_list(); | |
184 | |
185 return TRUE; | |
186 } | |
187 | |
188 void | |
189 skin_pixmap_free(SkinPixmap * p) | |
190 { | |
191 g_return_if_fail(p != NULL); | |
192 g_return_if_fail(p->pixmap != NULL); | |
193 | |
194 g_object_unref(p->pixmap); | |
195 p->pixmap = NULL; | |
196 } | |
197 | |
198 Skin * | |
199 skin_new(void) | |
200 { | |
201 Skin *skin; | |
202 skin = g_new0(Skin, 1); | |
203 skin->lock = g_mutex_new(); | |
204 return skin; | |
205 } | |
206 | |
207 void | |
208 skin_free(Skin * skin) | |
209 { | |
210 gint i; | |
211 | |
212 g_return_if_fail(skin != NULL); | |
213 | |
214 skin_lock(skin); | |
215 | |
216 for (i = 0; i < SKIN_PIXMAP_COUNT; i++) | |
217 skin_pixmap_free(&skin->pixmaps[i]); | |
218 | |
219 for (i = 0; i < SKIN_PIXMAP_COUNT; i++) { | |
220 if (skin->masks[i]) | |
221 g_object_unref(skin->masks[i]); | |
222 | |
223 skin->masks[i] = NULL; | |
224 } | |
225 | |
226 skin_set_default_vis_color(skin); | |
227 skin_unlock(skin); | |
228 } | |
229 | |
230 void | |
231 skin_destroy(Skin * skin) | |
232 { | |
233 g_return_if_fail(skin != NULL); | |
234 skin_free(skin); | |
235 g_mutex_free(skin->lock); | |
236 g_free(skin); | |
237 } | |
238 | |
239 const SkinPixmapIdMapping * | |
240 skin_pixmap_id_lookup(guint id) | |
241 { | |
242 guint i; | |
243 | |
244 for (i = 0; i < skin_pixmap_id_map_size; i++) { | |
245 if (id == skin_pixmap_id_map[i].id) { | |
246 return &skin_pixmap_id_map[i]; | |
247 } | |
248 } | |
249 | |
250 return NULL; | |
251 } | |
252 | |
253 const gchar * | |
254 skin_pixmap_id_to_name(SkinPixmapId id) | |
255 { | |
256 guint i; | |
257 | |
258 for (i = 0; i < skin_pixmap_id_map_size; i++) { | |
259 if (id == skin_pixmap_id_map[i].id) | |
260 return skin_pixmap_id_map[i].name; | |
261 } | |
262 return NULL; | |
263 } | |
264 | |
265 static void | |
266 skin_set_default_vis_color(Skin * skin) | |
267 { | |
268 memcpy(skin->vis_color, skin_default_viscolor, | |
269 sizeof(skin_default_viscolor)); | |
270 } | |
271 | |
272 /* | |
273 * I have rewritten this to take an array of possible targets, | |
274 * once we find a matching target we now return, instead of loop | |
275 * recursively. This allows for us to support many possible format | |
276 * targets for our skinning engine than just the original winamp | |
277 * formats. | |
278 * | |
279 * -- nenolod, 16 January 2006 | |
280 */ | |
281 gchar * | |
282 skin_pixmap_locate(const gchar * dirname, gchar ** basenames) | |
283 { | |
284 gchar *filename; | |
285 gint i; | |
286 | |
287 for (i = 0; basenames[i]; i++) | |
288 if (!(filename = find_file_recursively(dirname, basenames[i]))) | |
289 g_free(filename); | |
290 else | |
291 return filename; | |
292 | |
293 /* can't find any targets -- sorry */ | |
294 return NULL; | |
295 } | |
296 | |
297 /* FIXME: this function is temporary. It will be removed when the skinning system | |
298 uses GdkPixbuf in place of GdkPixmap */ | |
299 | |
300 static GdkPixmap * | |
301 pixmap_new_from_file(const gchar * filename) | |
302 { | |
303 GdkPixbuf *pixbuf; | |
304 GdkPixmap *pixmap; | |
305 gint width, height; | |
306 | |
307 if (!(pixbuf = gdk_pixbuf_new_from_file(filename, NULL))) | |
308 return NULL; | |
309 | |
310 width = gdk_pixbuf_get_width(pixbuf); | |
311 height = gdk_pixbuf_get_height(pixbuf); | |
312 | |
1811
a6a248bfafc3
[svn] - create the windows during skin load process after the skin.hints has been loaded
nenolod
parents:
1804
diff
changeset
|
313 /* create the windows if they haven't been created yet, needed for bootstrapping */ |
a6a248bfafc3
[svn] - create the windows during skin load process after the skin.hints has been loaded
nenolod
parents:
1804
diff
changeset
|
314 if (mainwin == NULL) |
a6a248bfafc3
[svn] - create the windows during skin load process after the skin.hints has been loaded
nenolod
parents:
1804
diff
changeset
|
315 { |
a6a248bfafc3
[svn] - create the windows during skin load process after the skin.hints has been loaded
nenolod
parents:
1804
diff
changeset
|
316 mainwin_create(); |
a6a248bfafc3
[svn] - create the windows during skin load process after the skin.hints has been loaded
nenolod
parents:
1804
diff
changeset
|
317 equalizerwin_create(); |
a6a248bfafc3
[svn] - create the windows during skin load process after the skin.hints has been loaded
nenolod
parents:
1804
diff
changeset
|
318 playlistwin_create(); |
a6a248bfafc3
[svn] - create the windows during skin load process after the skin.hints has been loaded
nenolod
parents:
1804
diff
changeset
|
319 } |
a6a248bfafc3
[svn] - create the windows during skin load process after the skin.hints has been loaded
nenolod
parents:
1804
diff
changeset
|
320 |
1653 | 321 if (!(pixmap = gdk_pixmap_new(mainwin->window, width, height, |
322 gdk_rgb_get_visual()->depth))) { | |
323 g_object_unref(pixbuf); | |
324 return NULL; | |
325 } | |
326 | |
327 gdk_pixbuf_render_to_drawable(pixbuf, pixmap, mainwin_gc, 0, 0, 0, 0, | |
328 width, height, GDK_RGB_DITHER_MAX, 0, 0); | |
329 g_object_unref(pixbuf); | |
330 | |
331 return pixmap; | |
332 } | |
333 | |
334 static gboolean | |
335 skin_load_pixmap_id(Skin * skin, SkinPixmapId id, const gchar * path_p) | |
336 { | |
337 const gchar *path; | |
338 gchar *filename; | |
339 gint width, height; | |
340 const SkinPixmapIdMapping *pixmap_id_mapping; | |
341 GdkPixmap *gpm; | |
342 SkinPixmap *pm = NULL; | |
343 gchar *basenames[EXTENSION_TARGETS * 2 + 1]; /* alternate basenames */ | |
344 gint i, y; | |
345 | |
346 g_return_val_if_fail(skin != NULL, FALSE); | |
347 g_return_val_if_fail(id < SKIN_PIXMAP_COUNT, FALSE); | |
348 | |
349 pixmap_id_mapping = skin_pixmap_id_lookup(id); | |
350 g_return_val_if_fail(pixmap_id_mapping != NULL, FALSE); | |
351 | |
352 memset(&basenames, 0, sizeof(basenames)); | |
353 | |
354 for (i = 0, y = 0; i < EXTENSION_TARGETS; i++, y++) | |
355 { | |
356 basenames[y] = g_strdup_printf("%s.%s", pixmap_id_mapping->name, | |
357 ext_targets[i]); | |
358 | |
359 if (pixmap_id_mapping->alt_name) | |
360 basenames[++y] = g_strdup_printf("%s.%s", | |
361 pixmap_id_mapping->alt_name, ext_targets[i]); | |
362 } | |
363 | |
364 path = path_p ? path_p : skin->path; | |
365 filename = skin_pixmap_locate(path, basenames); | |
366 | |
367 for (i = 0; basenames[i] != NULL; i++) | |
368 { | |
369 g_free(basenames[i]); | |
370 basenames[i] = NULL; | |
371 } | |
372 | |
373 if (!(gpm = pixmap_new_from_file(filename))) { | |
374 g_warning("loading of %s failed", filename); | |
375 g_free(filename); | |
376 return FALSE; | |
377 } | |
378 | |
379 g_free(filename); | |
380 | |
381 gdk_drawable_get_size(GDK_DRAWABLE(gpm), &width, &height); | |
382 pm = &skin->pixmaps[id]; | |
383 pm->pixmap = gpm; | |
384 pm->width = width; | |
385 pm->height = height; | |
386 pm->current_width = width; | |
387 pm->current_height = height; | |
388 | |
389 return TRUE; | |
390 } | |
391 | |
392 void | |
393 skin_mask_create(Skin * skin, | |
394 const gchar * path, | |
395 gint id, | |
396 GdkWindow * window) | |
397 { | |
398 skin->masks[id] = | |
399 skin_create_transparent_mask(path, "region.txt", | |
400 skin_mask_info[id].inistr, window, | |
401 skin_mask_info[id].width, | |
402 skin_mask_info[id].height); | |
403 } | |
404 | |
405 static void | |
406 skin_setup_masks(Skin * skin) | |
407 { | |
408 GdkBitmap *mask; | |
409 | |
410 if (cfg.show_wm_decorations) | |
411 return; | |
412 | |
413 if (cfg.player_visible) { | |
414 mask = skin_get_mask(skin, SKIN_MASK_MAIN + cfg.player_shaded); | |
415 gtk_widget_shape_combine_mask(mainwin, mask, 0, 0); | |
416 } | |
417 | |
418 mask = skin_get_mask(skin, SKIN_MASK_EQ + cfg.equalizer_shaded); | |
419 gtk_widget_shape_combine_mask(equalizerwin, mask, 0, 0); | |
420 } | |
421 | |
422 static GdkBitmap * | |
423 create_default_mask(GdkWindow * parent, gint w, gint h) | |
424 { | |
425 GdkBitmap *ret; | |
426 GdkGC *gc; | |
427 GdkColor pattern; | |
428 | |
429 ret = gdk_pixmap_new(parent, w, h, 1); | |
430 gc = gdk_gc_new(ret); | |
431 pattern.pixel = 1; | |
432 gdk_gc_set_foreground(gc, &pattern); | |
433 gdk_draw_rectangle(ret, gc, TRUE, 0, 0, w, h); | |
434 gdk_gc_destroy(gc); | |
435 | |
436 return ret; | |
437 } | |
438 | |
439 static void | |
440 skin_query_color(GdkColormap * cm, GdkColor * c) | |
441 { | |
442 #ifdef GDK_WINDOWING_X11 | |
443 XColor xc = { 0,0,0,0,0,0 }; | |
444 | |
445 xc.pixel = c->pixel; | |
446 XQueryColor(GDK_COLORMAP_XDISPLAY(cm), GDK_COLORMAP_XCOLORMAP(cm), &xc); | |
447 c->red = xc.red; | |
448 c->green = xc.green; | |
449 c->blue = xc.blue; | |
450 #else | |
451 /* do nothing. see what breaks? */ | |
452 #endif | |
453 } | |
454 | |
455 static glong | |
456 skin_calc_luminance(GdkColor * c) | |
457 { | |
458 return (0.212671 * c->red + 0.715160 * c->green + 0.072169 * c->blue); | |
459 } | |
460 | |
461 static void | |
462 skin_get_textcolors(GdkPixmap * text, GdkColor * bgc, GdkColor * fgc) | |
463 { | |
464 /* | |
465 * Try to extract reasonable background and foreground colors | |
466 * from the font pixmap | |
467 */ | |
468 | |
469 GdkImage *gi; | |
470 GdkColormap *cm; | |
471 gint i; | |
472 | |
473 g_return_if_fail(text != NULL); | |
474 | |
475 /* Get the first line of text */ | |
476 gi = gdk_drawable_get_image(text, 0, 0, 152, 6); | |
477 cm = gdk_window_get_colormap(playlistwin->window); | |
478 g_return_if_fail(GDK_IS_WINDOW(playlistwin->window)); | |
479 | |
480 for (i = 0; i < 6; i++) { | |
481 GdkColor c; | |
482 gint x; | |
483 glong d, max_d; | |
484 | |
485 /* Get a pixel from the middle of the space character */ | |
486 bgc[i].pixel = gdk_image_get_pixel(gi, 151, i); | |
487 skin_query_color(cm, &bgc[i]); | |
488 | |
489 max_d = 0; | |
490 for (x = 1; x < 150; x++) { | |
491 c.pixel = gdk_image_get_pixel(gi, x, i); | |
492 skin_query_color(cm, &c); | |
493 | |
494 d = labs(skin_calc_luminance(&c) - skin_calc_luminance(&bgc[i])); | |
495 if (d > max_d) { | |
496 memcpy(&fgc[i], &c, sizeof(GdkColor)); | |
497 max_d = d; | |
498 } | |
499 } | |
500 } | |
501 gdk_image_destroy(gi); | |
502 } | |
503 | |
504 gboolean | |
505 init_skins(const gchar * path) | |
506 { | |
507 bmp_active_skin = skin_new(); | |
508 | |
509 if (!bmp_active_skin_load(path)) { | |
510 /* FIXME: Oddly, g_message() causes a crash if path is NULL on | |
511 * Solaris (see bug #165) */ | |
512 if (path) | |
513 g_message("Unable to load skin (%s), trying default...", path); | |
514 | |
515 /* can't load configured skin, retry with default */ | |
516 if (!bmp_active_skin_load(BMP_DEFAULT_SKIN_PATH)) { | |
517 g_message("Unable to load default skin (%s)! Giving up.", | |
518 BMP_DEFAULT_SKIN_PATH); | |
519 return FALSE; | |
520 } | |
521 } | |
522 | |
523 if (cfg.random_skin_on_play) | |
524 skinlist_update(); | |
525 | |
526 return TRUE; | |
527 } | |
528 | |
529 /* | |
530 * Opens and parses a skin's hints file. | |
531 * Hints files are somewhat like "scripts" in Winamp3/5. | |
532 * We'll probably add scripts to it next. | |
533 */ | |
534 void | |
535 skin_parse_hints(Skin * skin, gchar *path_p) | |
536 { | |
537 gchar *filename, *tmp; | |
538 | |
539 path_p = path_p ? path_p : skin->path; | |
540 | |
541 filename = find_file_recursively(path_p, "skin.hints"); | |
542 | |
543 if (filename == NULL) | |
544 return; | |
545 | |
546 #if 0 | |
547 skin->description = read_ini_string(filename, "skin", "skinDescription"); | |
548 #endif | |
549 | |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
550 skin->properties.mainwin_othertext = FALSE; |
1653 | 551 tmp = read_ini_string(filename, "skin", "mainwinOthertext"); |
552 | |
553 if (tmp != NULL) | |
1772
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
554 { |
1653 | 555 skin->properties.mainwin_othertext = atoi(tmp); |
1772
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
556 g_free(tmp); |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
557 } |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
558 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
559 skin->properties.mainwin_vis_x = 24; |
1772
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
560 tmp = read_ini_string(filename, "skin", "mainwinVisX"); |
1751
a5fcf96e33fe
[svn] - properly free the path to skin.hints once we locate it
nenolod
parents:
1670
diff
changeset
|
561 |
1772
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
562 if (tmp != NULL) |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
563 { |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
564 skin->properties.mainwin_vis_x = atoi(tmp); |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
565 g_free(tmp); |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
566 } |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
567 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
568 skin->properties.mainwin_vis_y = 43; |
1772
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
569 tmp = read_ini_string(filename, "skin", "mainwinVisY"); |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
570 |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
571 if (tmp != NULL) |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
572 { |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
573 skin->properties.mainwin_vis_y = atoi(tmp); |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
574 g_free(tmp); |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
575 } |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
576 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
577 skin->properties.mainwin_vis_width = 76; |
1780
be1de1dd7262
[svn] - implement [skin.hints:mainwinVisWidth] property.
nenolod
parents:
1779
diff
changeset
|
578 tmp = read_ini_string(filename, "skin", "mainwinVisWidth"); |
be1de1dd7262
[svn] - implement [skin.hints:mainwinVisWidth] property.
nenolod
parents:
1779
diff
changeset
|
579 |
be1de1dd7262
[svn] - implement [skin.hints:mainwinVisWidth] property.
nenolod
parents:
1779
diff
changeset
|
580 if (tmp != NULL) |
be1de1dd7262
[svn] - implement [skin.hints:mainwinVisWidth] property.
nenolod
parents:
1779
diff
changeset
|
581 { |
be1de1dd7262
[svn] - implement [skin.hints:mainwinVisWidth] property.
nenolod
parents:
1779
diff
changeset
|
582 skin->properties.mainwin_vis_width = atoi(tmp); |
be1de1dd7262
[svn] - implement [skin.hints:mainwinVisWidth] property.
nenolod
parents:
1779
diff
changeset
|
583 g_free(tmp); |
be1de1dd7262
[svn] - implement [skin.hints:mainwinVisWidth] property.
nenolod
parents:
1779
diff
changeset
|
584 } |
be1de1dd7262
[svn] - implement [skin.hints:mainwinVisWidth] property.
nenolod
parents:
1779
diff
changeset
|
585 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
586 skin->properties.mainwin_text_x = 112; |
1773 | 587 tmp = read_ini_string(filename, "skin", "mainwinTextX"); |
588 | |
589 if (tmp != NULL) | |
590 { | |
591 skin->properties.mainwin_text_x = atoi(tmp); | |
592 g_free(tmp); | |
593 } | |
594 | |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
595 skin->properties.mainwin_text_y = 27; |
1773 | 596 tmp = read_ini_string(filename, "skin", "mainwinTextY"); |
597 | |
598 if (tmp != NULL) | |
599 { | |
600 skin->properties.mainwin_text_y = atoi(tmp); | |
601 g_free(tmp); | |
602 } | |
603 | |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
604 skin->properties.mainwin_text_width = 153; |
1777
17e38b5c8e2f
[svn] - support for the [skin.hints:mainwinTextWidth] property.
nenolod
parents:
1773
diff
changeset
|
605 tmp = read_ini_string(filename, "skin", "mainwinTextWidth"); |
17e38b5c8e2f
[svn] - support for the [skin.hints:mainwinTextWidth] property.
nenolod
parents:
1773
diff
changeset
|
606 |
17e38b5c8e2f
[svn] - support for the [skin.hints:mainwinTextWidth] property.
nenolod
parents:
1773
diff
changeset
|
607 if (tmp != NULL) |
17e38b5c8e2f
[svn] - support for the [skin.hints:mainwinTextWidth] property.
nenolod
parents:
1773
diff
changeset
|
608 { |
17e38b5c8e2f
[svn] - support for the [skin.hints:mainwinTextWidth] property.
nenolod
parents:
1773
diff
changeset
|
609 skin->properties.mainwin_text_width = atoi(tmp); |
17e38b5c8e2f
[svn] - support for the [skin.hints:mainwinTextWidth] property.
nenolod
parents:
1773
diff
changeset
|
610 g_free(tmp); |
17e38b5c8e2f
[svn] - support for the [skin.hints:mainwinTextWidth] property.
nenolod
parents:
1773
diff
changeset
|
611 } |
17e38b5c8e2f
[svn] - support for the [skin.hints:mainwinTextWidth] property.
nenolod
parents:
1773
diff
changeset
|
612 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
613 skin->properties.mainwin_infobar_x = 112; |
1773 | 614 tmp = read_ini_string(filename, "skin", "mainwinInfoBarX"); |
615 | |
616 if (tmp != NULL) | |
617 { | |
618 skin->properties.mainwin_infobar_x = atoi(tmp); | |
619 g_free(tmp); | |
620 } | |
621 | |
622 tmp = read_ini_string(filename, "skin", "mainwinInfoBarY"); | |
623 | |
624 if (tmp != NULL) | |
625 { | |
626 skin->properties.mainwin_infobar_y = atoi(tmp); | |
627 g_free(tmp); | |
628 } | |
629 | |
1778
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
630 tmp = read_ini_string(filename, "skin", "mainwinNumber0X"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
631 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
632 if (tmp != NULL) |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
633 { |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
634 skin->properties.mainwin_number_0_x = atoi(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
635 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
636 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
637 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
638 tmp = read_ini_string(filename, "skin", "mainwinNumber0Y"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
639 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
640 if (tmp != NULL) |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
641 { |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
642 skin->properties.mainwin_number_0_y = atoi(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
643 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
644 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
645 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
646 tmp = read_ini_string(filename, "skin", "mainwinNumber1X"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
647 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
648 if (tmp != NULL) |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
649 { |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
650 skin->properties.mainwin_number_1_x = atoi(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
651 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
652 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
653 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
654 tmp = read_ini_string(filename, "skin", "mainwinNumber1Y"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
655 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
656 if (tmp != NULL) |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
657 { |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
658 skin->properties.mainwin_number_1_y = atoi(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
659 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
660 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
661 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
662 tmp = read_ini_string(filename, "skin", "mainwinNumber2X"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
663 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
664 if (tmp != NULL) |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
665 { |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
666 skin->properties.mainwin_number_2_x = atoi(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
667 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
668 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
669 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
670 tmp = read_ini_string(filename, "skin", "mainwinNumber2Y"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
671 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
672 if (tmp != NULL) |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
673 { |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
674 skin->properties.mainwin_number_2_y = atoi(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
675 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
676 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
677 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
678 tmp = read_ini_string(filename, "skin", "mainwinNumber3X"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
679 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
680 if (tmp != NULL) |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
681 { |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
682 skin->properties.mainwin_number_3_x = atoi(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
683 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
684 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
685 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
686 tmp = read_ini_string(filename, "skin", "mainwinNumber3Y"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
687 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
688 if (tmp != NULL) |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
689 { |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
690 skin->properties.mainwin_number_3_y = atoi(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
691 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
692 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
693 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
694 tmp = read_ini_string(filename, "skin", "mainwinNumber4X"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
695 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
696 if (tmp != NULL) |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
697 { |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
698 skin->properties.mainwin_number_4_x = atoi(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
699 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
700 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
701 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
702 tmp = read_ini_string(filename, "skin", "mainwinNumber4Y"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
703 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
704 if (tmp != NULL) |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
705 { |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
706 skin->properties.mainwin_number_4_y = atoi(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
707 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
708 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
709 |
1779
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
710 tmp = read_ini_string(filename, "skin", "mainwinPlayStatusX"); |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
711 |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
712 if (tmp != NULL) |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
713 { |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
714 skin->properties.mainwin_playstatus_x = atoi(tmp); |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
715 g_free(tmp); |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
716 } |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
717 |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
718 tmp = read_ini_string(filename, "skin", "mainwinPlayStatusY"); |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
719 |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
720 if (tmp != NULL) |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
721 { |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
722 skin->properties.mainwin_playstatus_y = atoi(tmp); |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
723 g_free(tmp); |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
724 } |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
725 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
726 skin->properties.mainwin_menurow_visible = TRUE; |
1784 | 727 tmp = read_ini_string(filename, "skin", "mainwinMenurowVisible"); |
728 | |
729 if (tmp != NULL) | |
730 { | |
731 skin->properties.mainwin_menurow_visible = atoi(tmp); | |
732 g_free(tmp); | |
733 } | |
734 | |
1786 | 735 tmp = read_ini_string(filename, "skin", "mainwinVolumeX"); |
736 | |
737 if (tmp != NULL) | |
738 { | |
739 skin->properties.mainwin_volume_x = atoi(tmp); | |
740 g_free(tmp); | |
741 } | |
742 | |
743 tmp = read_ini_string(filename, "skin", "mainwinVolumeY"); | |
744 | |
745 if (tmp != NULL) | |
746 { | |
747 skin->properties.mainwin_volume_y = atoi(tmp); | |
748 g_free(tmp); | |
749 } | |
750 | |
751 tmp = read_ini_string(filename, "skin", "mainwinBalanceX"); | |
752 | |
753 if (tmp != NULL) | |
754 { | |
755 skin->properties.mainwin_balance_x = atoi(tmp); | |
756 g_free(tmp); | |
757 } | |
758 | |
759 tmp = read_ini_string(filename, "skin", "mainwinBalanceY"); | |
760 | |
761 if (tmp != NULL) | |
762 { | |
763 skin->properties.mainwin_balance_y = atoi(tmp); | |
764 g_free(tmp); | |
765 } | |
766 | |
767 tmp = read_ini_string(filename, "skin", "mainwinPositionX"); | |
768 | |
769 if (tmp != NULL) | |
770 { | |
771 skin->properties.mainwin_position_x = atoi(tmp); | |
772 g_free(tmp); | |
773 } | |
774 | |
1788
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
775 tmp = read_ini_string(filename, "skin", "mainwinPositionY"); |
1786 | 776 |
777 if (tmp != NULL) | |
778 { | |
779 skin->properties.mainwin_position_y = atoi(tmp); | |
780 g_free(tmp); | |
781 } | |
782 | |
1788
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
783 tmp = read_ini_string(filename, "skin", "mainwinOthertextIsStatus"); |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
784 |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
785 if (tmp != NULL) |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
786 { |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
787 skin->properties.mainwin_othertext_is_status = atoi(tmp); |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
788 g_free(tmp); |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
789 } |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
790 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
791 skin->properties.mainwin_othertext_visible = TRUE; |
1792
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
792 tmp = read_ini_string(filename, "skin", "mainwinOthertextVisible"); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
793 |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
794 if (tmp != NULL) |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
795 { |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
796 skin->properties.mainwin_othertext_visible = atoi(tmp); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
797 g_free(tmp); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
798 } |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
799 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
800 skin->properties.mainwin_text_visible = TRUE; |
1792
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
801 tmp = read_ini_string(filename, "skin", "mainwinTextVisible"); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
802 |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
803 if (tmp != NULL) |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
804 { |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
805 skin->properties.mainwin_text_visible = atoi(tmp); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
806 g_free(tmp); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
807 } |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
808 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
809 skin->properties.mainwin_vis_visible = TRUE; |
1792
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
810 tmp = read_ini_string(filename, "skin", "mainwinVisVisible"); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
811 |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
812 if (tmp != NULL) |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
813 { |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
814 skin->properties.mainwin_vis_visible = atoi(tmp); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
815 g_free(tmp); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
816 } |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
817 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
818 tmp = read_ini_string(filename, "skin", "mainwinPreviousX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
819 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
820 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
821 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
822 skin->properties.mainwin_previous_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
823 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
824 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
825 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
826 tmp = read_ini_string(filename, "skin", "mainwinPreviousY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
827 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
828 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
829 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
830 skin->properties.mainwin_previous_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
831 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
832 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
833 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
834 tmp = read_ini_string(filename, "skin", "mainwinPlayX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
835 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
836 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
837 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
838 skin->properties.mainwin_play_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
839 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
840 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
841 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
842 tmp = read_ini_string(filename, "skin", "mainwinPlayY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
843 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
844 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
845 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
846 skin->properties.mainwin_play_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
847 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
848 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
849 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
850 tmp = read_ini_string(filename, "skin", "mainwinPauseX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
851 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
852 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
853 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
854 skin->properties.mainwin_pause_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
855 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
856 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
857 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
858 tmp = read_ini_string(filename, "skin", "mainwinPauseY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
859 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
860 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
861 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
862 skin->properties.mainwin_pause_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
863 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
864 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
865 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
866 tmp = read_ini_string(filename, "skin", "mainwinStopX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
867 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
868 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
869 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
870 skin->properties.mainwin_stop_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
871 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
872 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
873 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
874 tmp = read_ini_string(filename, "skin", "mainwinStopY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
875 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
876 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
877 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
878 skin->properties.mainwin_stop_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
879 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
880 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
881 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
882 tmp = read_ini_string(filename, "skin", "mainwinNextX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
883 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
884 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
885 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
886 skin->properties.mainwin_next_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
887 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
888 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
889 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
890 tmp = read_ini_string(filename, "skin", "mainwinNextY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
891 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
892 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
893 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
894 skin->properties.mainwin_next_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
895 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
896 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
897 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
898 tmp = read_ini_string(filename, "skin", "mainwinEjectX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
899 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
900 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
901 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
902 skin->properties.mainwin_eject_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
903 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
904 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
905 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
906 tmp = read_ini_string(filename, "skin", "mainwinEjectY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
907 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
908 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
909 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
910 skin->properties.mainwin_eject_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
911 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
912 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
913 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
914 skin->properties.mainwin_width = 275; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
915 tmp = read_ini_string(filename, "skin", "mainwinWidth"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
916 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
917 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
918 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
919 skin->properties.mainwin_width = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
920 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
921 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
922 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
923 skin->properties.mainwin_height = 116; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
924 tmp = read_ini_string(filename, "skin", "mainwinHeight"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
925 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
926 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
927 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
928 skin->properties.mainwin_height = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
929 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
930 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
931 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
932 skin->properties.mainwin_about_x = 247; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
933 tmp = read_ini_string(filename, "skin", "mainwinAboutX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
934 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
935 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
936 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
937 skin->properties.mainwin_about_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
938 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
939 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
940 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
941 skin->properties.mainwin_about_y = 83; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
942 tmp = read_ini_string(filename, "skin", "mainwinAboutY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
943 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
944 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
945 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
946 skin->properties.mainwin_about_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
947 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
948 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
949 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
950 skin->properties.mainwin_shuffle_x = 164; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
951 tmp = read_ini_string(filename, "skin", "mainwinShuffleX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
952 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
953 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
954 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
955 skin->properties.mainwin_shuffle_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
956 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
957 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
958 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
959 skin->properties.mainwin_shuffle_y = 89; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
960 tmp = read_ini_string(filename, "skin", "mainwinShuffleY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
961 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
962 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
963 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
964 skin->properties.mainwin_shuffle_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
965 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
966 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
967 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
968 skin->properties.mainwin_repeat_x = 210; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
969 tmp = read_ini_string(filename, "skin", "mainwinRepeatX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
970 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
971 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
972 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
973 skin->properties.mainwin_repeat_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
974 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
975 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
976 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
977 skin->properties.mainwin_repeat_y = 89; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
978 tmp = read_ini_string(filename, "skin", "mainwinRepeatY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
979 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
980 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
981 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
982 skin->properties.mainwin_repeat_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
983 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
984 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
985 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
986 skin->properties.mainwin_eqbutton_x = 219; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
987 tmp = read_ini_string(filename, "skin", "mainwinEQButtonX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
988 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
989 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
990 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
991 skin->properties.mainwin_eqbutton_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
992 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
993 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
994 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
995 skin->properties.mainwin_eqbutton_y = 58; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
996 tmp = read_ini_string(filename, "skin", "mainwinEQButtonY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
997 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
998 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
999 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1000 skin->properties.mainwin_eqbutton_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1001 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1002 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1003 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1004 skin->properties.mainwin_plbutton_x = 242; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1005 tmp = read_ini_string(filename, "skin", "mainwinPLButtonX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1006 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1007 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1008 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1009 skin->properties.mainwin_plbutton_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1010 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1011 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1012 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1013 skin->properties.mainwin_plbutton_y = 58; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1014 tmp = read_ini_string(filename, "skin", "mainwinPLButtonY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1015 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1016 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1017 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1018 skin->properties.mainwin_plbutton_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1019 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1020 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1021 |
1751
a5fcf96e33fe
[svn] - properly free the path to skin.hints once we locate it
nenolod
parents:
1670
diff
changeset
|
1022 g_free(filename); |
1653 | 1023 } |
1024 | |
1025 static guint | |
1026 hex_chars_to_int(gchar hi, gchar lo) | |
1027 { | |
1028 /* | |
1029 * Converts a value in the range 0x00-0xFF | |
1030 * to a integer in the range 0-65535 | |
1031 */ | |
1032 gchar str[3]; | |
1033 | |
1034 str[0] = hi; | |
1035 str[1] = lo; | |
1036 str[2] = 0; | |
1037 | |
1038 return (CLAMP(strtol(str, NULL, 16), 0, 0xFF) << 8); | |
1039 } | |
1040 | |
1041 GdkColor * | |
1042 skin_load_color(const gchar * path, const gchar * file, | |
1043 const gchar * section, const gchar * key, | |
1044 gchar * default_hex) | |
1045 { | |
1046 gchar *filename, *value; | |
1047 GdkColor *color = NULL; | |
1048 | |
1049 filename = find_file_recursively(path, file); | |
1050 if (filename || default_hex) { | |
1051 if (filename) { | |
1052 value = read_ini_string(filename, section, key); | |
1053 if (value == NULL) { | |
1054 value = g_strdup(default_hex); | |
1055 } | |
1056 } else { | |
1057 value = g_strdup(default_hex); | |
1058 } | |
1059 if (value) { | |
1060 gchar *ptr = value; | |
1061 gint len; | |
1062 | |
1063 color = g_new0(GdkColor, 1); | |
1064 g_strstrip(value); | |
1065 | |
1066 if (value[0] == '#') | |
1067 ptr++; | |
1068 len = strlen(ptr); | |
1069 /* | |
1070 * The handling of incomplete values is done this way | |
1071 * to maximize winamp compatibility | |
1072 */ | |
1073 if (len >= 6) { | |
1074 color->red = hex_chars_to_int(*ptr, *(ptr + 1)); | |
1075 ptr += 2; | |
1076 } | |
1077 if (len >= 4) { | |
1078 color->green = hex_chars_to_int(*ptr, *(ptr + 1)); | |
1079 ptr += 2; | |
1080 } | |
1081 if (len >= 2) | |
1082 color->blue = hex_chars_to_int(*ptr, *(ptr + 1)); | |
1083 | |
1084 gdk_color_alloc(gdk_window_get_colormap(playlistwin->window), | |
1085 color); | |
1086 g_free(value); | |
1087 } | |
1088 if (filename) | |
1089 g_free(filename); | |
1090 } | |
1091 return color; | |
1092 } | |
1093 | |
1094 | |
1095 | |
1096 GdkBitmap * | |
1097 skin_create_transparent_mask(const gchar * path, | |
1098 const gchar * file, | |
1099 const gchar * section, | |
1100 GdkWindow * window, | |
1101 gint width, | |
1102 gint height) | |
1103 { | |
1104 GdkBitmap *mask = NULL; | |
1105 GdkGC *gc = NULL; | |
1106 GdkColor pattern; | |
1107 GdkPoint *gpoints; | |
1108 | |
1109 gchar *filename = NULL; | |
1110 gboolean created_mask = FALSE; | |
1111 GArray *num, *point; | |
1112 guint i, j; | |
1113 gint k; | |
1114 | |
1115 if (path) | |
1116 filename = find_file_recursively(path, file); | |
1117 | |
1118 /* filename will be null if path wasn't set */ | |
1119 if (!filename) { | |
1120 return create_default_mask(window, width, height); | |
1121 } | |
1122 | |
1123 if ((num = read_ini_array(filename, section, "NumPoints")) == NULL) { | |
1124 g_free(filename); | |
1125 return NULL; | |
1126 } | |
1127 | |
1128 if ((point = read_ini_array(filename, section, "PointList")) == NULL) { | |
1129 g_array_free(num, TRUE); | |
1130 g_free(filename); | |
1131 return NULL; | |
1132 } | |
1133 | |
1134 mask = gdk_pixmap_new(window, width, height, 1); | |
1135 gc = gdk_gc_new(mask); | |
1136 | |
1137 pattern.pixel = 0; | |
1138 gdk_gc_set_foreground(gc, &pattern); | |
1139 gdk_draw_rectangle(mask, gc, TRUE, 0, 0, width, height); | |
1140 pattern.pixel = 1; | |
1141 gdk_gc_set_foreground(gc, &pattern); | |
1142 | |
1143 j = 0; | |
1144 for (i = 0; i < num->len; i++) { | |
1145 if ((int)(point->len - j) >= (g_array_index(num, gint, i) * 2)) { | |
1146 created_mask = TRUE; | |
1147 gpoints = g_new(GdkPoint, g_array_index(num, gint, i)); | |
1148 for (k = 0; k < g_array_index(num, gint, i); k++) { | |
1149 gpoints[k].x = g_array_index(point, gint, j + k * 2); | |
1150 gpoints[k].y = g_array_index(point, gint, j + k * 2 + 1); | |
1151 } | |
1152 j += k * 2; | |
1153 gdk_draw_polygon(mask, gc, TRUE, gpoints, | |
1154 g_array_index(num, gint, i)); | |
1155 g_free(gpoints); | |
1156 } | |
1157 } | |
1158 g_array_free(num, TRUE); | |
1159 g_array_free(point, TRUE); | |
1160 g_free(filename); | |
1161 | |
1162 if (!created_mask) | |
1163 gdk_draw_rectangle(mask, gc, TRUE, 0, 0, width, height); | |
1164 | |
1165 gdk_gc_destroy(gc); | |
1166 | |
1167 return mask; | |
1168 } | |
1169 | |
1170 void | |
1171 skin_load_viscolor(Skin * skin, const gchar * path, const gchar * basename) | |
1172 { | |
1670 | 1173 VFSFile *file; |
1653 | 1174 gint i, c; |
1175 gchar line[256], *filename; | |
1176 GArray *a; | |
1177 | |
1178 g_return_if_fail(skin != NULL); | |
1179 g_return_if_fail(path != NULL); | |
1180 g_return_if_fail(basename != NULL); | |
1181 | |
1182 skin_set_default_vis_color(skin); | |
1183 | |
1184 filename = find_file_recursively(path, basename); | |
1185 if (!filename) | |
1186 return; | |
1187 | |
1670 | 1188 if (!(file = vfs_fopen(filename, "r"))) { |
1653 | 1189 g_free(filename); |
1190 return; | |
1191 } | |
1192 | |
1193 g_free(filename); | |
1194 | |
1195 for (i = 0; i < 24; i++) { | |
1670 | 1196 if (vfs_fgets(line, 255, file)) { |
1653 | 1197 a = string_to_garray(line); |
1198 if (a->len > 2) { | |
1199 for (c = 0; c < 3; c++) | |
1200 skin->vis_color[i][c] = g_array_index(a, gint, c); | |
1201 } | |
1202 g_array_free(a, TRUE); | |
1203 } | |
1204 else | |
1205 break; | |
1206 } | |
1207 | |
1670 | 1208 vfs_fclose(file); |
1653 | 1209 } |
1210 | |
1211 #if 0 | |
1212 static void | |
1213 skin_numbers_generate_dash(Skin * skin) | |
1214 { | |
1215 GdkGC *gc; | |
1216 GdkPixmap *pixmap; | |
1217 SkinPixmap *numbers; | |
1218 | |
1219 g_return_if_fail(skin != NULL); | |
1220 | |
1221 numbers = &skin->pixmaps[SKIN_NUMBERS]; | |
1222 if (!numbers->pixmap || numbers->current_width < 99) | |
1223 return; | |
1224 | |
1225 gc = gdk_gc_new(numbers->pixmap); | |
1226 pixmap = gdk_pixmap_new(mainwin->window, 108, | |
1227 numbers->current_height, | |
1228 -1); | |
1229 | |
1230 skin_draw_pixmap(skin, pixmap, gc, SKIN_NUMBERS, 0, 0, 0, 0, 99, 13); | |
1231 skin_draw_pixmap(skin, pixmap, gc, SKIN_NUMBERS, 90, 0, 99, 0, 9, 13); | |
1232 skin_draw_pixmap(skin, pixmap, gc, SKIN_NUMBERS, 20, 6, 101, 6, 5, 1); | |
1233 | |
1234 g_object_unref(numbers->pixmap); | |
1235 g_object_unref(gc); | |
1236 | |
1237 numbers->pixmap = pixmap; | |
1238 numbers->current_width = 108; | |
1239 } | |
1240 #endif | |
1241 | |
1242 static void | |
1243 skin_load_cursor(Skin * skin, const gchar * dirname) | |
1244 { | |
1245 const gchar * basename = "normal.cur"; | |
1246 gchar * filename = NULL; | |
1247 GdkPixbuf * cursor_pixbuf = NULL; | |
1248 GdkPixbufAnimation * cursor_animated = NULL; | |
1249 GdkCursor * cursor_gdk = NULL; | |
1250 GError * error = NULL; | |
1251 | |
1252 filename = find_file_recursively(dirname, basename); | |
1253 | |
1254 if (filename && cfg.custom_cursors) { | |
1255 cursor_animated = gdk_pixbuf_animation_new_from_file(filename, &error); | |
1256 cursor_pixbuf = gdk_pixbuf_animation_get_static_image(cursor_animated); | |
1257 cursor_gdk = gdk_cursor_new_from_pixbuf(gdk_display_get_default(), | |
1258 cursor_pixbuf, 0, 0); | |
1259 } else { | |
1260 cursor_gdk = gdk_cursor_new(GDK_LEFT_PTR); | |
1261 } | |
1262 | |
1263 gdk_window_set_cursor(mainwin->window, cursor_gdk); | |
1264 gdk_window_set_cursor(playlistwin->window, cursor_gdk); | |
1265 gdk_window_set_cursor(equalizerwin->window, cursor_gdk); | |
1266 gdk_cursor_unref(cursor_gdk); | |
1267 } | |
1268 | |
1269 static void | |
1270 skin_load_pixmaps(Skin * skin, const gchar * path) | |
1271 { | |
1272 GdkPixmap *text_pm; | |
1273 guint i; | |
1274 | |
1275 for (i = 0; i < SKIN_PIXMAP_COUNT; i++) | |
1276 skin_load_pixmap_id(skin, i, path); | |
1277 | |
1278 text_pm = skin->pixmaps[SKIN_TEXT].pixmap; | |
1279 | |
1280 if (text_pm) | |
1281 skin_get_textcolors(text_pm, skin->textbg, skin->textfg); | |
1282 | |
1283 #if 0 | |
1284 if (skin->pixmaps[SKIN_NUMBERS].pixmap) | |
1285 skin_numbers_generate_dash(skin); | |
1286 #endif | |
1287 | |
1288 skin->colors[SKIN_PLEDIT_NORMAL] = | |
1289 skin_load_color(path, "pledit.txt", "text", "normal", "#2499ff"); | |
1290 skin->colors[SKIN_PLEDIT_CURRENT] = | |
1291 skin_load_color(path, "pledit.txt", "text", "current", "#ffeeff"); | |
1292 skin->colors[SKIN_PLEDIT_NORMALBG] = | |
1293 skin_load_color(path, "pledit.txt", "text", "normalbg", "#0a120a"); | |
1294 skin->colors[SKIN_PLEDIT_SELECTEDBG] = | |
1295 skin_load_color(path, "pledit.txt", "text", "selectedbg", "#0a124a"); | |
1296 | |
1297 skin_mask_create(skin, path, SKIN_MASK_MAIN, mainwin->window); | |
1298 skin_mask_create(skin, path, SKIN_MASK_MAIN_SHADE, mainwin->window); | |
1299 | |
1300 skin_mask_create(skin, path, SKIN_MASK_EQ, equalizerwin->window); | |
1301 skin_mask_create(skin, path, SKIN_MASK_EQ_SHADE, equalizerwin->window); | |
1302 | |
1303 skin_load_viscolor(skin, path, "viscolor.txt"); | |
1304 } | |
1305 | |
1306 static gboolean | |
1307 skin_load_nolock(Skin * skin, const gchar * path, gboolean force) | |
1308 { | |
1309 gchar *cpath; | |
1310 | |
1311 g_return_val_if_fail(skin != NULL, FALSE); | |
1312 g_return_val_if_fail(path != NULL, FALSE); | |
1313 REQUIRE_LOCK(skin->lock); | |
1314 | |
1315 if (!g_file_test(path, G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_DIR)) | |
1316 return FALSE; | |
1317 | |
1318 if (!force) { | |
1319 if (skin->path) | |
1320 if (!strcmp(skin->path, path)) | |
1321 return FALSE; | |
1322 } | |
1323 | |
1324 skin_current_num++; | |
1325 | |
1326 skin->path = g_strdup(path); | |
1327 | |
1328 if (!file_is_archive(path)) { | |
1811
a6a248bfafc3
[svn] - create the windows during skin load process after the skin.hints has been loaded
nenolod
parents:
1804
diff
changeset
|
1329 /* Parse the hints for this skin. */ |
a6a248bfafc3
[svn] - create the windows during skin load process after the skin.hints has been loaded
nenolod
parents:
1804
diff
changeset
|
1330 skin_parse_hints(skin, NULL); |
a6a248bfafc3
[svn] - create the windows during skin load process after the skin.hints has been loaded
nenolod
parents:
1804
diff
changeset
|
1331 |
1653 | 1332 skin_load_pixmaps(skin, path); |
1333 skin_load_cursor(skin, path); | |
1334 | |
1335 return TRUE; | |
1336 } | |
1337 | |
1338 if (!(cpath = archive_decompress(path))) { | |
1339 g_message("Unable to extract skin archive (%s)", path); | |
1340 return FALSE; | |
1341 } | |
1342 | |
1811
a6a248bfafc3
[svn] - create the windows during skin load process after the skin.hints has been loaded
nenolod
parents:
1804
diff
changeset
|
1343 /* Parse the hints for this skin. */ |
a6a248bfafc3
[svn] - create the windows during skin load process after the skin.hints has been loaded
nenolod
parents:
1804
diff
changeset
|
1344 skin_parse_hints(skin, cpath); |
a6a248bfafc3
[svn] - create the windows during skin load process after the skin.hints has been loaded
nenolod
parents:
1804
diff
changeset
|
1345 |
1653 | 1346 skin_load_pixmaps(skin, cpath); |
1347 skin_load_cursor(skin, cpath); | |
1348 | |
1349 del_directory(cpath); | |
1350 g_free(cpath); | |
1351 | |
1352 return TRUE; | |
1353 } | |
1354 | |
1355 void | |
1356 skin_install_skin(const gchar * path) | |
1357 { | |
1358 gchar *command; | |
1359 | |
1360 g_return_if_fail(path != NULL); | |
1361 | |
1362 command = g_strdup_printf("cp %s %s", path, bmp_paths[BMP_PATH_USER_SKIN_DIR]); | |
1363 if (system(command)) { | |
1364 g_message("Unable to install skin (%s) into user directory (%s)", | |
1365 path, bmp_paths[BMP_PATH_USER_SKIN_DIR]); | |
1366 } | |
1367 g_free(command); | |
1368 } | |
1369 | |
1370 | |
1371 gboolean | |
1372 skin_load(Skin * skin, const gchar * path) | |
1373 { | |
1374 gboolean error; | |
1375 | |
1376 g_return_val_if_fail(skin != NULL, FALSE); | |
1377 | |
1378 if (!path) | |
1379 return FALSE; | |
1380 | |
1381 skin_lock(skin); | |
1382 error = skin_load_nolock(skin, path, FALSE); | |
1383 skin_unlock(skin); | |
1384 | |
1385 return error; | |
1386 } | |
1387 | |
1388 gboolean | |
1389 skin_reload_forced(void) | |
1390 { | |
1391 gboolean error; | |
1392 | |
1393 skin_lock(bmp_active_skin); | |
1394 error = skin_load_nolock(bmp_active_skin, bmp_active_skin->path, TRUE); | |
1395 skin_unlock(bmp_active_skin); | |
1396 | |
1397 return error; | |
1398 } | |
1399 | |
1400 void | |
1401 skin_reload(Skin * skin) | |
1402 { | |
1403 g_return_if_fail(skin != NULL); | |
1404 skin_load_nolock(skin, skin->path, TRUE); | |
1405 } | |
1406 | |
1407 | |
1408 static SkinPixmap * | |
1409 skin_get_pixmap(Skin * skin, SkinPixmapId map_id) | |
1410 { | |
1411 g_return_val_if_fail(skin != NULL, NULL); | |
1412 g_return_val_if_fail(map_id < SKIN_PIXMAP_COUNT, NULL); | |
1413 | |
1414 return &skin->pixmaps[map_id]; | |
1415 } | |
1416 | |
1417 GdkBitmap * | |
1418 skin_get_mask(Skin * skin, SkinMaskId mi) | |
1419 { | |
1420 g_return_val_if_fail(skin != NULL, NULL); | |
1421 g_return_val_if_fail(mi < SKIN_PIXMAP_COUNT, NULL); | |
1422 | |
1423 return skin->masks[mi]; | |
1424 } | |
1425 | |
1426 GdkColor * | |
1427 skin_get_color(Skin * skin, SkinColorId color_id) | |
1428 { | |
1429 GdkColor *ret = NULL; | |
1430 | |
1431 g_return_val_if_fail(skin != NULL, NULL); | |
1432 | |
1433 switch (color_id) { | |
1434 case SKIN_TEXTBG: | |
1435 if (skin->pixmaps[SKIN_TEXT].pixmap) | |
1436 ret = skin->textbg; | |
1437 else | |
1438 ret = skin->def_textbg; | |
1439 break; | |
1440 case SKIN_TEXTFG: | |
1441 if (skin->pixmaps[SKIN_TEXT].pixmap) | |
1442 ret = skin->textfg; | |
1443 else | |
1444 ret = skin->def_textfg; | |
1445 break; | |
1446 default: | |
1447 if (color_id < SKIN_COLOR_COUNT) | |
1448 ret = skin->colors[color_id]; | |
1449 break; | |
1450 } | |
1451 return ret; | |
1452 } | |
1453 | |
1454 void | |
1455 skin_get_viscolor(Skin * skin, guchar vis_color[24][3]) | |
1456 { | |
1457 gint i; | |
1458 | |
1459 g_return_if_fail(skin != NULL); | |
1460 | |
1461 for (i = 0; i < 24; i++) { | |
1462 vis_color[i][0] = skin->vis_color[i][0]; | |
1463 vis_color[i][1] = skin->vis_color[i][1]; | |
1464 vis_color[i][2] = skin->vis_color[i][2]; | |
1465 } | |
1466 } | |
1467 | |
1468 gint | |
1469 skin_get_id(void) | |
1470 { | |
1471 return skin_current_num; | |
1472 } | |
1473 | |
1474 void | |
1475 skin_draw_pixmap(Skin * skin, GdkDrawable * drawable, GdkGC * gc, | |
1476 SkinPixmapId pixmap_id, | |
1477 gint xsrc, gint ysrc, gint xdest, gint ydest, | |
1478 gint width, gint height) | |
1479 { | |
1480 SkinPixmap *pixmap; | |
1481 | |
1482 g_return_if_fail(skin != NULL); | |
1483 | |
1484 pixmap = skin_get_pixmap(skin, pixmap_id); | |
1485 g_return_if_fail(pixmap != NULL); | |
1486 g_return_if_fail(pixmap->pixmap != NULL); | |
1487 | |
1488 if (xsrc > pixmap->width || ysrc > pixmap->height) | |
1489 return; | |
1490 | |
1491 width = MIN(width, pixmap->width - xsrc); | |
1492 height = MIN(height, pixmap->height - ysrc); | |
1493 gdk_draw_pixmap(drawable, gc, pixmap->pixmap, xsrc, ysrc, | |
1494 xdest, ydest, width, height); | |
1495 } | |
1496 | |
1497 void | |
1498 skin_get_eq_spline_colors(Skin * skin, guint32 colors[19]) | |
1499 { | |
1500 gint i; | |
1501 GdkPixmap *pixmap; | |
1502 GdkImage *img; | |
1503 SkinPixmap *eqmainpm; | |
1504 | |
1505 g_return_if_fail(skin != NULL); | |
1506 | |
1507 eqmainpm = &skin->pixmaps[SKIN_EQMAIN]; | |
1508 if (eqmainpm->pixmap && | |
1509 eqmainpm->current_width >= 116 && eqmainpm->current_height >= 313) | |
1510 pixmap = eqmainpm->pixmap; | |
1511 else | |
1512 return; | |
1513 | |
1514 if (!GDK_IS_DRAWABLE(pixmap)) | |
1515 return; | |
1516 | |
1517 if (!(img = gdk_drawable_get_image(pixmap, 115, 294, 1, 19))) | |
1518 return; | |
1519 | |
1520 for (i = 0; i < 19; i++) | |
1521 colors[i] = gdk_image_get_pixel(img, 0, i); | |
1522 | |
1523 gdk_image_destroy(img); | |
1524 } | |
1525 | |
1526 | |
1527 static void | |
1528 skin_draw_playlistwin_frame_top(Skin * skin, | |
1529 GdkDrawable * drawable, | |
1530 GdkGC * gc, | |
1531 gint width, gint height, gboolean focus) | |
1532 { | |
1533 /* The title bar skin consists of 2 sets of 4 images, 1 set | |
1534 * for focused state and the other for unfocused. The 4 images | |
1535 * are: | |
1536 * | |
1537 * a. right corner (25,20) | |
1538 * b. left corner (25,20) | |
1539 * c. tiler (25,20) | |
1540 * d. title (100,20) | |
1541 * | |
1542 * min allowed width = 100+25+25 = 150 | |
1543 */ | |
1544 | |
1545 gint i, y, c; | |
1546 | |
1547 /* get y offset of the pixmap set to use */ | |
1548 if (focus) | |
1549 y = 0; | |
1550 else | |
1551 y = 21; | |
1552 | |
1553 /* left corner */ | |
1554 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 0, y, 0, 0, 25, 20); | |
1555 | |
1556 /* titlebar title */ | |
1557 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 26, y, | |
1558 (width - 100) / 2, 0, 100, 20); | |
1559 | |
1560 /* titlebar right corner */ | |
1561 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 153, y, | |
1562 width - 25, 0, 25, 20); | |
1563 | |
1564 /* tile draw the remaining frame */ | |
1565 | |
1566 /* compute tile count */ | |
1567 c = (width - (100 + 25 + 25)) / 25; | |
1568 | |
1569 for (i = 0; i < c / 2; i++) { | |
1570 /* left of title */ | |
1571 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y, | |
1572 25 + i * 25, 0, 25, 20); | |
1573 | |
1574 /* right of title */ | |
1575 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y, | |
1576 (width + 100) / 2 + i * 25, 0, 25, 20); | |
1577 } | |
1578 | |
1579 if (c & 1) { | |
1580 /* Odd tile count, so one remaining to draw. Here we split | |
1581 * it into two and draw half on either side of the title */ | |
1582 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y, | |
1583 ((c / 2) * 25) + 25, 0, 12, 20); | |
1584 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y, | |
1585 (width / 2) + ((c / 2) * 25) + 50, 0, 13, 20); | |
1586 } | |
1587 } | |
1588 | |
1589 static void | |
1590 skin_draw_playlistwin_frame_bottom(Skin * skin, | |
1591 GdkDrawable * drawable, | |
1592 GdkGC * gc, | |
1593 gint width, gint height, gboolean focus) | |
1594 { | |
1595 /* The bottom frame skin consists of 1 set of 4 images. The 4 | |
1596 * images are: | |
1597 * | |
1598 * a. left corner with menu buttons (125,38) | |
1599 * b. visualization window (75,38) | |
1600 * c. right corner with play buttons (150,38) | |
1601 * d. frame tile (25,38) | |
1602 * | |
1603 * (min allowed width = 125+150+25=300 | |
1604 */ | |
1605 | |
1606 gint i, c; | |
1607 | |
1608 /* bottom left corner (menu buttons) */ | |
1609 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 0, 72, | |
1610 0, height - 38, 125, 38); | |
1611 | |
1612 c = (width - 275) / 25; | |
1613 | |
1614 /* draw visualization window, if width allows */ | |
1615 if (c >= 3) { | |
1616 c -= 3; | |
1617 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 205, 0, | |
1618 width - (150 + 75), height - 38, 75, 38); | |
1619 } | |
1620 | |
1621 /* Bottom right corner (playbuttons etc) */ | |
1622 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, | |
1623 126, 72, width - 150, height - 38, 150, 38); | |
1624 | |
1625 /* Tile draw the remaining undrawn portions */ | |
1626 for (i = 0; i < c; i++) | |
1627 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 179, 0, | |
1628 125 + i * 25, height - 38, 25, 38); | |
1629 } | |
1630 | |
1631 static void | |
1632 skin_draw_playlistwin_frame_sides(Skin * skin, | |
1633 GdkDrawable * drawable, | |
1634 GdkGC * gc, | |
1635 gint width, gint height, gboolean focus) | |
1636 { | |
1637 /* The side frames consist of 2 tile images. 1 for the left, 1 for | |
1638 * the right. | |
1639 * a. left (12,29) | |
1640 * b. right (19,29) | |
1641 */ | |
1642 | |
1643 gint i; | |
1644 | |
1645 /* frame sides */ | |
1646 for (i = 0; i < (height - (20 + 38)) / 29; i++) { | |
1647 /* left */ | |
1648 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 0, 42, | |
1649 0, 20 + i * 29, 12, 29); | |
1650 | |
1651 /* right */ | |
1652 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 32, 42, | |
1653 width - 19, 20 + i * 29, 19, 29); | |
1654 } | |
1655 } | |
1656 | |
1657 | |
1658 void | |
1659 skin_draw_playlistwin_frame(Skin * skin, | |
1660 GdkDrawable * drawable, GdkGC * gc, | |
1661 gint width, gint height, gboolean focus) | |
1662 { | |
1663 skin_draw_playlistwin_frame_top(skin, drawable, gc, width, height, focus); | |
1664 skin_draw_playlistwin_frame_bottom(skin, drawable, gc, width, height, | |
1665 focus); | |
1666 skin_draw_playlistwin_frame_sides(skin, drawable, gc, width, height, | |
1667 focus); | |
1668 } | |
1669 | |
1670 | |
1671 void | |
1672 skin_draw_playlistwin_shaded(Skin * skin, | |
1673 GdkDrawable * drawable, GdkGC * gc, | |
1674 gint width, gboolean focus) | |
1675 { | |
1676 /* The shade mode titlebar skin consists of 4 images: | |
1677 * a) left corner offset (72,42) size (25,14) | |
1678 * b) right corner, focused offset (99,57) size (50,14) | |
1679 * c) right corner, unfocused offset (99,42) size (50,14) | |
1680 * d) bar tile offset (72,57) size (25,14) | |
1681 */ | |
1682 | |
1683 gint i; | |
1684 | |
1685 /* left corner */ | |
1686 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 72, 42, 0, 0, 25, 14); | |
1687 | |
1688 /* bar tile */ | |
1689 for (i = 0; i < (width - 75) / 25; i++) | |
1690 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 72, 57, | |
1691 (i * 25) + 25, 0, 25, 14); | |
1692 | |
1693 /* right corner */ | |
1694 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 99, focus ? 57 : 42, | |
1695 width - 50, 0, 50, 14); | |
1696 } | |
1697 | |
1698 | |
1699 void | |
1700 skin_draw_mainwin_titlebar(Skin * skin, | |
1701 GdkDrawable * drawable, GdkGC * gc, | |
1702 gboolean shaded, gboolean focus) | |
1703 { | |
1704 /* The titlebar skin consists of 2 sets of 2 images, one for for | |
1705 * shaded and the other for unshaded mode, giving a total of 4. | |
1706 * The images are exactly 275x14 pixels, aligned and arranged | |
1707 * vertically on each other in the pixmap in the following order: | |
1708 * | |
1709 * a) unshaded, focused offset (27, 0) | |
1710 * b) unshaded, unfocused offset (27, 15) | |
1711 * c) shaded, focused offset (27, 29) | |
1712 * d) shaded, unfocused offset (27, 42) | |
1713 */ | |
1714 | |
1715 gint y_offset; | |
1716 | |
1717 if (shaded) { | |
1718 if (focus) | |
1719 y_offset = 29; | |
1720 else | |
1721 y_offset = 42; | |
1722 } | |
1723 else { | |
1724 if (focus) | |
1725 y_offset = 0; | |
1726 else | |
1727 y_offset = 15; | |
1728 } | |
1729 | |
1730 skin_draw_pixmap(skin, drawable, gc, SKIN_TITLEBAR, 27, y_offset, | |
1731 0, 0, MAINWIN_WIDTH, MAINWIN_TITLEBAR_HEIGHT); | |
1732 } |