Mercurial > audlegacy
annotate audacious/widgets/skin.c @ 1829:e4e4fadfb2a9 trunk
[svn] - fixes for resize bug
author | nenolod |
---|---|
date | Thu, 05 Oct 2006 07:39:43 -0700 |
parents | 3b6901e8e63f |
children | 3da01efb3225 |
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 | |
1814 | 622 skin->properties.mainwin_infobar_y = 43; |
1773 | 623 tmp = read_ini_string(filename, "skin", "mainwinInfoBarY"); |
624 | |
625 if (tmp != NULL) | |
626 { | |
627 skin->properties.mainwin_infobar_y = atoi(tmp); | |
628 g_free(tmp); | |
629 } | |
630 | |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
631 skin->properties.mainwin_number_0_x = 36; |
1778
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
632 tmp = read_ini_string(filename, "skin", "mainwinNumber0X"); |
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 if (tmp != NULL) |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
635 { |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
636 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
|
637 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
638 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
639 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
640 skin->properties.mainwin_number_0_y = 26; |
1778
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
641 tmp = read_ini_string(filename, "skin", "mainwinNumber0Y"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
642 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
643 if (tmp != NULL) |
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 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
|
646 g_free(tmp); |
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 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
649 skin->properties.mainwin_number_1_x = 48; |
1778
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
650 tmp = read_ini_string(filename, "skin", "mainwinNumber1X"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
651 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
652 if (tmp != NULL) |
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 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
|
655 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
656 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
657 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
658 skin->properties.mainwin_number_1_y = 26; |
1778
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
659 tmp = read_ini_string(filename, "skin", "mainwinNumber1Y"); |
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 if (tmp != NULL) |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
662 { |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
663 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
|
664 g_free(tmp); |
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 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
667 skin->properties.mainwin_number_2_x = 60; |
1778
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
668 tmp = read_ini_string(filename, "skin", "mainwinNumber2X"); |
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 if (tmp != NULL) |
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 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
|
673 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
674 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
675 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
676 skin->properties.mainwin_number_2_y = 26; |
1778
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
677 tmp = read_ini_string(filename, "skin", "mainwinNumber2Y"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
678 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
679 if (tmp != NULL) |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
680 { |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
681 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
|
682 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
683 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
684 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
685 skin->properties.mainwin_number_3_x = 78; |
1778
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
686 tmp = read_ini_string(filename, "skin", "mainwinNumber3X"); |
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_x = 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 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
694 skin->properties.mainwin_number_3_y = 26; |
1778
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
695 tmp = read_ini_string(filename, "skin", "mainwinNumber3Y"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
696 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
697 if (tmp != NULL) |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
698 { |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
699 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
|
700 g_free(tmp); |
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 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
703 skin->properties.mainwin_number_4_x = 90; |
1778
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
704 tmp = read_ini_string(filename, "skin", "mainwinNumber4X"); |
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 if (tmp != NULL) |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
707 { |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
708 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
|
709 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
710 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
711 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
712 skin->properties.mainwin_number_4_y = 26; |
1778
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
713 tmp = read_ini_string(filename, "skin", "mainwinNumber4Y"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
714 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
715 if (tmp != NULL) |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
716 { |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
717 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
|
718 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
719 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
720 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
721 skin->properties.mainwin_playstatus_x = 24; |
1779
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
722 tmp = read_ini_string(filename, "skin", "mainwinPlayStatusX"); |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
723 |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
724 if (tmp != NULL) |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
725 { |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
726 skin->properties.mainwin_playstatus_x = atoi(tmp); |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
727 g_free(tmp); |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
728 } |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
729 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
730 skin->properties.mainwin_playstatus_y = 28; |
1779
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
731 tmp = read_ini_string(filename, "skin", "mainwinPlayStatusY"); |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
732 |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
733 if (tmp != NULL) |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
734 { |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
735 skin->properties.mainwin_playstatus_y = atoi(tmp); |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
736 g_free(tmp); |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
737 } |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
738 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
739 skin->properties.mainwin_menurow_visible = TRUE; |
1784 | 740 tmp = read_ini_string(filename, "skin", "mainwinMenurowVisible"); |
741 | |
742 if (tmp != NULL) | |
743 { | |
744 skin->properties.mainwin_menurow_visible = atoi(tmp); | |
745 g_free(tmp); | |
746 } | |
747 | |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
748 skin->properties.mainwin_volume_x = 107; |
1786 | 749 tmp = read_ini_string(filename, "skin", "mainwinVolumeX"); |
750 | |
751 if (tmp != NULL) | |
752 { | |
753 skin->properties.mainwin_volume_x = atoi(tmp); | |
754 g_free(tmp); | |
755 } | |
756 | |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
757 skin->properties.mainwin_volume_y = 57; |
1786 | 758 tmp = read_ini_string(filename, "skin", "mainwinVolumeY"); |
759 | |
760 if (tmp != NULL) | |
761 { | |
762 skin->properties.mainwin_volume_y = atoi(tmp); | |
763 g_free(tmp); | |
764 } | |
765 | |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
766 skin->properties.mainwin_balance_x = 177; |
1786 | 767 tmp = read_ini_string(filename, "skin", "mainwinBalanceX"); |
768 | |
769 if (tmp != NULL) | |
770 { | |
771 skin->properties.mainwin_balance_x = atoi(tmp); | |
772 g_free(tmp); | |
773 } | |
774 | |
1815 | 775 skin->properties.mainwin_balance_y = 57; |
1786 | 776 tmp = read_ini_string(filename, "skin", "mainwinBalanceY"); |
777 | |
778 if (tmp != NULL) | |
779 { | |
780 skin->properties.mainwin_balance_y = atoi(tmp); | |
781 g_free(tmp); | |
782 } | |
783 | |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
784 skin->properties.mainwin_position_x = 16; |
1786 | 785 tmp = read_ini_string(filename, "skin", "mainwinPositionX"); |
786 | |
787 if (tmp != NULL) | |
788 { | |
789 skin->properties.mainwin_position_x = atoi(tmp); | |
790 g_free(tmp); | |
791 } | |
792 | |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
793 skin->properties.mainwin_position_y = 72; |
1788
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
794 tmp = read_ini_string(filename, "skin", "mainwinPositionY"); |
1786 | 795 |
796 if (tmp != NULL) | |
797 { | |
798 skin->properties.mainwin_position_y = atoi(tmp); | |
799 g_free(tmp); | |
800 } | |
801 | |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
802 skin->properties.mainwin_othertext_is_status = FALSE; |
1788
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
803 tmp = read_ini_string(filename, "skin", "mainwinOthertextIsStatus"); |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
804 |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
805 if (tmp != NULL) |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
806 { |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
807 skin->properties.mainwin_othertext_is_status = atoi(tmp); |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
808 g_free(tmp); |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
809 } |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
810 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
811 skin->properties.mainwin_othertext_visible = TRUE; |
1792
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
812 tmp = read_ini_string(filename, "skin", "mainwinOthertextVisible"); |
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 if (tmp != NULL) |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
815 { |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
816 skin->properties.mainwin_othertext_visible = atoi(tmp); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
817 g_free(tmp); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
818 } |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
819 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
820 skin->properties.mainwin_text_visible = TRUE; |
1792
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
821 tmp = read_ini_string(filename, "skin", "mainwinTextVisible"); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
822 |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
823 if (tmp != NULL) |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
824 { |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
825 skin->properties.mainwin_text_visible = atoi(tmp); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
826 g_free(tmp); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
827 } |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
828 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
829 skin->properties.mainwin_vis_visible = TRUE; |
1792
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
830 tmp = read_ini_string(filename, "skin", "mainwinVisVisible"); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
831 |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
832 if (tmp != NULL) |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
833 { |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
834 skin->properties.mainwin_vis_visible = atoi(tmp); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
835 g_free(tmp); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
836 } |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
837 |
1816 | 838 skin->properties.mainwin_previous_x = 16; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
839 tmp = read_ini_string(filename, "skin", "mainwinPreviousX"); |
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 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
842 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
843 skin->properties.mainwin_previous_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
844 g_free(tmp); |
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 |
1816 | 847 skin->properties.mainwin_previous_y = 88; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
848 tmp = read_ini_string(filename, "skin", "mainwinPreviousY"); |
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 if (tmp != NULL) |
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 skin->properties.mainwin_previous_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
853 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
854 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
855 |
1816 | 856 skin->properties.mainwin_play_x = 39; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
857 tmp = read_ini_string(filename, "skin", "mainwinPlayX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
858 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
859 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
860 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
861 skin->properties.mainwin_play_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
862 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
863 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
864 |
1816 | 865 skin->properties.mainwin_play_y = 88; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
866 tmp = read_ini_string(filename, "skin", "mainwinPlayY"); |
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_play_y = 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 |
1816 | 874 skin->properties.mainwin_pause_x = 62; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
875 tmp = read_ini_string(filename, "skin", "mainwinPauseX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
876 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
877 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
878 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
879 skin->properties.mainwin_pause_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
880 g_free(tmp); |
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 |
1816 | 883 skin->properties.mainwin_pause_y = 88; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
884 tmp = read_ini_string(filename, "skin", "mainwinPauseY"); |
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 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
887 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
888 skin->properties.mainwin_pause_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
889 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
890 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
891 |
1816 | 892 skin->properties.mainwin_stop_x = 85; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
893 tmp = read_ini_string(filename, "skin", "mainwinStopX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
894 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
895 if (tmp != NULL) |
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 skin->properties.mainwin_stop_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
898 g_free(tmp); |
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 |
1816 | 901 skin->properties.mainwin_stop_y = 88; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
902 tmp = read_ini_string(filename, "skin", "mainwinStopY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
903 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
904 if (tmp != NULL) |
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 skin->properties.mainwin_stop_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
907 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
908 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
909 |
1816 | 910 skin->properties.mainwin_next_x = 108; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
911 tmp = read_ini_string(filename, "skin", "mainwinNextX"); |
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 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
914 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
915 skin->properties.mainwin_next_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
916 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
917 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
918 |
1816 | 919 skin->properties.mainwin_next_y = 88; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
920 tmp = read_ini_string(filename, "skin", "mainwinNextY"); |
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 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
923 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
924 skin->properties.mainwin_next_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
925 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
926 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
927 |
1816 | 928 skin->properties.mainwin_eject_x = 136; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
929 tmp = read_ini_string(filename, "skin", "mainwinEjectX"); |
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 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
932 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
933 skin->properties.mainwin_eject_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
934 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
935 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
936 |
1816 | 937 skin->properties.mainwin_eject_y = 88; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
938 tmp = read_ini_string(filename, "skin", "mainwinEjectY"); |
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 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
941 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
942 skin->properties.mainwin_eject_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
943 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
944 } |
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_width = 275; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
947 tmp = read_ini_string(filename, "skin", "mainwinWidth"); |
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 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
950 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
951 skin->properties.mainwin_width = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
952 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
953 } |
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_height = 116; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
956 tmp = read_ini_string(filename, "skin", "mainwinHeight"); |
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 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
959 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
960 skin->properties.mainwin_height = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
961 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
962 } |
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_about_x = 247; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
965 tmp = read_ini_string(filename, "skin", "mainwinAboutX"); |
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 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
968 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
969 skin->properties.mainwin_about_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
970 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
971 } |
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_about_y = 83; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
974 tmp = read_ini_string(filename, "skin", "mainwinAboutY"); |
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 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
977 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
978 skin->properties.mainwin_about_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
979 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
980 } |
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_shuffle_x = 164; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
983 tmp = read_ini_string(filename, "skin", "mainwinShuffleX"); |
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 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
986 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
987 skin->properties.mainwin_shuffle_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
988 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
989 } |
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_shuffle_y = 89; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
992 tmp = read_ini_string(filename, "skin", "mainwinShuffleY"); |
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 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
995 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
996 skin->properties.mainwin_shuffle_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
997 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
998 } |
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_repeat_x = 210; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1001 tmp = read_ini_string(filename, "skin", "mainwinRepeatX"); |
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 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1004 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1005 skin->properties.mainwin_repeat_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1006 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1007 } |
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_repeat_y = 89; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1010 tmp = read_ini_string(filename, "skin", "mainwinRepeatY"); |
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 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1013 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1014 skin->properties.mainwin_repeat_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1015 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1016 } |
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_eqbutton_x = 219; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1019 tmp = read_ini_string(filename, "skin", "mainwinEQButtonX"); |
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 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1022 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1023 skin->properties.mainwin_eqbutton_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1024 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1025 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1026 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1027 skin->properties.mainwin_eqbutton_y = 58; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1028 tmp = read_ini_string(filename, "skin", "mainwinEQButtonY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1029 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1030 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1031 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1032 skin->properties.mainwin_eqbutton_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1033 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1034 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1035 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1036 skin->properties.mainwin_plbutton_x = 242; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1037 tmp = read_ini_string(filename, "skin", "mainwinPLButtonX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1038 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1039 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1040 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1041 skin->properties.mainwin_plbutton_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1042 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1043 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1044 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1045 skin->properties.mainwin_plbutton_y = 58; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1046 tmp = read_ini_string(filename, "skin", "mainwinPLButtonY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1047 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1048 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1049 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1050 skin->properties.mainwin_plbutton_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1051 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1052 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1053 |
1751
a5fcf96e33fe
[svn] - properly free the path to skin.hints once we locate it
nenolod
parents:
1670
diff
changeset
|
1054 g_free(filename); |
1653 | 1055 } |
1056 | |
1057 static guint | |
1058 hex_chars_to_int(gchar hi, gchar lo) | |
1059 { | |
1060 /* | |
1061 * Converts a value in the range 0x00-0xFF | |
1062 * to a integer in the range 0-65535 | |
1063 */ | |
1064 gchar str[3]; | |
1065 | |
1066 str[0] = hi; | |
1067 str[1] = lo; | |
1068 str[2] = 0; | |
1069 | |
1070 return (CLAMP(strtol(str, NULL, 16), 0, 0xFF) << 8); | |
1071 } | |
1072 | |
1073 GdkColor * | |
1074 skin_load_color(const gchar * path, const gchar * file, | |
1075 const gchar * section, const gchar * key, | |
1076 gchar * default_hex) | |
1077 { | |
1078 gchar *filename, *value; | |
1079 GdkColor *color = NULL; | |
1080 | |
1081 filename = find_file_recursively(path, file); | |
1082 if (filename || default_hex) { | |
1083 if (filename) { | |
1084 value = read_ini_string(filename, section, key); | |
1085 if (value == NULL) { | |
1086 value = g_strdup(default_hex); | |
1087 } | |
1088 } else { | |
1089 value = g_strdup(default_hex); | |
1090 } | |
1091 if (value) { | |
1092 gchar *ptr = value; | |
1093 gint len; | |
1094 | |
1095 color = g_new0(GdkColor, 1); | |
1096 g_strstrip(value); | |
1097 | |
1098 if (value[0] == '#') | |
1099 ptr++; | |
1100 len = strlen(ptr); | |
1101 /* | |
1102 * The handling of incomplete values is done this way | |
1103 * to maximize winamp compatibility | |
1104 */ | |
1105 if (len >= 6) { | |
1106 color->red = hex_chars_to_int(*ptr, *(ptr + 1)); | |
1107 ptr += 2; | |
1108 } | |
1109 if (len >= 4) { | |
1110 color->green = hex_chars_to_int(*ptr, *(ptr + 1)); | |
1111 ptr += 2; | |
1112 } | |
1113 if (len >= 2) | |
1114 color->blue = hex_chars_to_int(*ptr, *(ptr + 1)); | |
1115 | |
1116 gdk_color_alloc(gdk_window_get_colormap(playlistwin->window), | |
1117 color); | |
1118 g_free(value); | |
1119 } | |
1120 if (filename) | |
1121 g_free(filename); | |
1122 } | |
1123 return color; | |
1124 } | |
1125 | |
1126 | |
1127 | |
1128 GdkBitmap * | |
1129 skin_create_transparent_mask(const gchar * path, | |
1130 const gchar * file, | |
1131 const gchar * section, | |
1132 GdkWindow * window, | |
1133 gint width, | |
1134 gint height) | |
1135 { | |
1136 GdkBitmap *mask = NULL; | |
1137 GdkGC *gc = NULL; | |
1138 GdkColor pattern; | |
1139 GdkPoint *gpoints; | |
1140 | |
1141 gchar *filename = NULL; | |
1142 gboolean created_mask = FALSE; | |
1143 GArray *num, *point; | |
1144 guint i, j; | |
1145 gint k; | |
1146 | |
1147 if (path) | |
1148 filename = find_file_recursively(path, file); | |
1149 | |
1150 /* filename will be null if path wasn't set */ | |
1151 if (!filename) { | |
1152 return create_default_mask(window, width, height); | |
1153 } | |
1154 | |
1155 if ((num = read_ini_array(filename, section, "NumPoints")) == NULL) { | |
1156 g_free(filename); | |
1157 return NULL; | |
1158 } | |
1159 | |
1160 if ((point = read_ini_array(filename, section, "PointList")) == NULL) { | |
1161 g_array_free(num, TRUE); | |
1162 g_free(filename); | |
1163 return NULL; | |
1164 } | |
1165 | |
1166 mask = gdk_pixmap_new(window, width, height, 1); | |
1167 gc = gdk_gc_new(mask); | |
1168 | |
1169 pattern.pixel = 0; | |
1170 gdk_gc_set_foreground(gc, &pattern); | |
1171 gdk_draw_rectangle(mask, gc, TRUE, 0, 0, width, height); | |
1172 pattern.pixel = 1; | |
1173 gdk_gc_set_foreground(gc, &pattern); | |
1174 | |
1175 j = 0; | |
1176 for (i = 0; i < num->len; i++) { | |
1177 if ((int)(point->len - j) >= (g_array_index(num, gint, i) * 2)) { | |
1178 created_mask = TRUE; | |
1179 gpoints = g_new(GdkPoint, g_array_index(num, gint, i)); | |
1180 for (k = 0; k < g_array_index(num, gint, i); k++) { | |
1181 gpoints[k].x = g_array_index(point, gint, j + k * 2); | |
1182 gpoints[k].y = g_array_index(point, gint, j + k * 2 + 1); | |
1183 } | |
1184 j += k * 2; | |
1185 gdk_draw_polygon(mask, gc, TRUE, gpoints, | |
1186 g_array_index(num, gint, i)); | |
1187 g_free(gpoints); | |
1188 } | |
1189 } | |
1190 g_array_free(num, TRUE); | |
1191 g_array_free(point, TRUE); | |
1192 g_free(filename); | |
1193 | |
1194 if (!created_mask) | |
1195 gdk_draw_rectangle(mask, gc, TRUE, 0, 0, width, height); | |
1196 | |
1197 gdk_gc_destroy(gc); | |
1198 | |
1199 return mask; | |
1200 } | |
1201 | |
1202 void | |
1203 skin_load_viscolor(Skin * skin, const gchar * path, const gchar * basename) | |
1204 { | |
1670 | 1205 VFSFile *file; |
1653 | 1206 gint i, c; |
1207 gchar line[256], *filename; | |
1208 GArray *a; | |
1209 | |
1210 g_return_if_fail(skin != NULL); | |
1211 g_return_if_fail(path != NULL); | |
1212 g_return_if_fail(basename != NULL); | |
1213 | |
1214 skin_set_default_vis_color(skin); | |
1215 | |
1216 filename = find_file_recursively(path, basename); | |
1217 if (!filename) | |
1218 return; | |
1219 | |
1670 | 1220 if (!(file = vfs_fopen(filename, "r"))) { |
1653 | 1221 g_free(filename); |
1222 return; | |
1223 } | |
1224 | |
1225 g_free(filename); | |
1226 | |
1227 for (i = 0; i < 24; i++) { | |
1670 | 1228 if (vfs_fgets(line, 255, file)) { |
1653 | 1229 a = string_to_garray(line); |
1230 if (a->len > 2) { | |
1231 for (c = 0; c < 3; c++) | |
1232 skin->vis_color[i][c] = g_array_index(a, gint, c); | |
1233 } | |
1234 g_array_free(a, TRUE); | |
1235 } | |
1236 else | |
1237 break; | |
1238 } | |
1239 | |
1670 | 1240 vfs_fclose(file); |
1653 | 1241 } |
1242 | |
1243 #if 0 | |
1244 static void | |
1245 skin_numbers_generate_dash(Skin * skin) | |
1246 { | |
1247 GdkGC *gc; | |
1248 GdkPixmap *pixmap; | |
1249 SkinPixmap *numbers; | |
1250 | |
1251 g_return_if_fail(skin != NULL); | |
1252 | |
1253 numbers = &skin->pixmaps[SKIN_NUMBERS]; | |
1254 if (!numbers->pixmap || numbers->current_width < 99) | |
1255 return; | |
1256 | |
1257 gc = gdk_gc_new(numbers->pixmap); | |
1258 pixmap = gdk_pixmap_new(mainwin->window, 108, | |
1259 numbers->current_height, | |
1260 -1); | |
1261 | |
1262 skin_draw_pixmap(skin, pixmap, gc, SKIN_NUMBERS, 0, 0, 0, 0, 99, 13); | |
1263 skin_draw_pixmap(skin, pixmap, gc, SKIN_NUMBERS, 90, 0, 99, 0, 9, 13); | |
1264 skin_draw_pixmap(skin, pixmap, gc, SKIN_NUMBERS, 20, 6, 101, 6, 5, 1); | |
1265 | |
1266 g_object_unref(numbers->pixmap); | |
1267 g_object_unref(gc); | |
1268 | |
1269 numbers->pixmap = pixmap; | |
1270 numbers->current_width = 108; | |
1271 } | |
1272 #endif | |
1273 | |
1274 static void | |
1275 skin_load_cursor(Skin * skin, const gchar * dirname) | |
1276 { | |
1277 const gchar * basename = "normal.cur"; | |
1278 gchar * filename = NULL; | |
1279 GdkPixbuf * cursor_pixbuf = NULL; | |
1280 GdkPixbufAnimation * cursor_animated = NULL; | |
1281 GdkCursor * cursor_gdk = NULL; | |
1282 GError * error = NULL; | |
1283 | |
1284 filename = find_file_recursively(dirname, basename); | |
1285 | |
1286 if (filename && cfg.custom_cursors) { | |
1287 cursor_animated = gdk_pixbuf_animation_new_from_file(filename, &error); | |
1288 cursor_pixbuf = gdk_pixbuf_animation_get_static_image(cursor_animated); | |
1289 cursor_gdk = gdk_cursor_new_from_pixbuf(gdk_display_get_default(), | |
1290 cursor_pixbuf, 0, 0); | |
1291 } else { | |
1292 cursor_gdk = gdk_cursor_new(GDK_LEFT_PTR); | |
1293 } | |
1294 | |
1295 gdk_window_set_cursor(mainwin->window, cursor_gdk); | |
1296 gdk_window_set_cursor(playlistwin->window, cursor_gdk); | |
1297 gdk_window_set_cursor(equalizerwin->window, cursor_gdk); | |
1298 gdk_cursor_unref(cursor_gdk); | |
1299 } | |
1300 | |
1301 static void | |
1302 skin_load_pixmaps(Skin * skin, const gchar * path) | |
1303 { | |
1304 GdkPixmap *text_pm; | |
1305 guint i; | |
1306 | |
1307 for (i = 0; i < SKIN_PIXMAP_COUNT; i++) | |
1308 skin_load_pixmap_id(skin, i, path); | |
1309 | |
1310 text_pm = skin->pixmaps[SKIN_TEXT].pixmap; | |
1311 | |
1312 if (text_pm) | |
1313 skin_get_textcolors(text_pm, skin->textbg, skin->textfg); | |
1314 | |
1315 #if 0 | |
1316 if (skin->pixmaps[SKIN_NUMBERS].pixmap) | |
1317 skin_numbers_generate_dash(skin); | |
1318 #endif | |
1319 | |
1320 skin->colors[SKIN_PLEDIT_NORMAL] = | |
1321 skin_load_color(path, "pledit.txt", "text", "normal", "#2499ff"); | |
1322 skin->colors[SKIN_PLEDIT_CURRENT] = | |
1323 skin_load_color(path, "pledit.txt", "text", "current", "#ffeeff"); | |
1324 skin->colors[SKIN_PLEDIT_NORMALBG] = | |
1325 skin_load_color(path, "pledit.txt", "text", "normalbg", "#0a120a"); | |
1326 skin->colors[SKIN_PLEDIT_SELECTEDBG] = | |
1327 skin_load_color(path, "pledit.txt", "text", "selectedbg", "#0a124a"); | |
1328 | |
1329 skin_mask_create(skin, path, SKIN_MASK_MAIN, mainwin->window); | |
1330 skin_mask_create(skin, path, SKIN_MASK_MAIN_SHADE, mainwin->window); | |
1331 | |
1332 skin_mask_create(skin, path, SKIN_MASK_EQ, equalizerwin->window); | |
1333 skin_mask_create(skin, path, SKIN_MASK_EQ_SHADE, equalizerwin->window); | |
1334 | |
1335 skin_load_viscolor(skin, path, "viscolor.txt"); | |
1336 } | |
1337 | |
1338 static gboolean | |
1339 skin_load_nolock(Skin * skin, const gchar * path, gboolean force) | |
1340 { | |
1341 gchar *cpath; | |
1342 | |
1343 g_return_val_if_fail(skin != NULL, FALSE); | |
1344 g_return_val_if_fail(path != NULL, FALSE); | |
1345 REQUIRE_LOCK(skin->lock); | |
1346 | |
1347 if (!g_file_test(path, G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_DIR)) | |
1348 return FALSE; | |
1349 | |
1350 if (!force) { | |
1351 if (skin->path) | |
1352 if (!strcmp(skin->path, path)) | |
1353 return FALSE; | |
1354 } | |
1355 | |
1356 skin_current_num++; | |
1357 | |
1358 skin->path = g_strdup(path); | |
1359 | |
1360 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
|
1361 /* 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
|
1362 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
|
1363 |
1653 | 1364 skin_load_pixmaps(skin, path); |
1365 skin_load_cursor(skin, path); | |
1366 | |
1367 return TRUE; | |
1368 } | |
1369 | |
1370 if (!(cpath = archive_decompress(path))) { | |
1371 g_message("Unable to extract skin archive (%s)", path); | |
1372 return FALSE; | |
1373 } | |
1374 | |
1811
a6a248bfafc3
[svn] - create the windows during skin load process after the skin.hints has been loaded
nenolod
parents:
1804
diff
changeset
|
1375 /* 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
|
1376 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
|
1377 |
1653 | 1378 skin_load_pixmaps(skin, cpath); |
1379 skin_load_cursor(skin, cpath); | |
1380 | |
1381 del_directory(cpath); | |
1382 g_free(cpath); | |
1383 | |
1384 return TRUE; | |
1385 } | |
1386 | |
1387 void | |
1388 skin_install_skin(const gchar * path) | |
1389 { | |
1390 gchar *command; | |
1391 | |
1392 g_return_if_fail(path != NULL); | |
1393 | |
1394 command = g_strdup_printf("cp %s %s", path, bmp_paths[BMP_PATH_USER_SKIN_DIR]); | |
1395 if (system(command)) { | |
1396 g_message("Unable to install skin (%s) into user directory (%s)", | |
1397 path, bmp_paths[BMP_PATH_USER_SKIN_DIR]); | |
1398 } | |
1399 g_free(command); | |
1400 } | |
1401 | |
1402 | |
1403 gboolean | |
1404 skin_load(Skin * skin, const gchar * path) | |
1405 { | |
1406 gboolean error; | |
1407 | |
1408 g_return_val_if_fail(skin != NULL, FALSE); | |
1409 | |
1410 if (!path) | |
1411 return FALSE; | |
1412 | |
1413 skin_lock(skin); | |
1414 error = skin_load_nolock(skin, path, FALSE); | |
1415 skin_unlock(skin); | |
1416 | |
1417 return error; | |
1418 } | |
1419 | |
1420 gboolean | |
1421 skin_reload_forced(void) | |
1422 { | |
1423 gboolean error; | |
1424 | |
1425 skin_lock(bmp_active_skin); | |
1426 error = skin_load_nolock(bmp_active_skin, bmp_active_skin->path, TRUE); | |
1427 skin_unlock(bmp_active_skin); | |
1428 | |
1429 return error; | |
1430 } | |
1431 | |
1432 void | |
1433 skin_reload(Skin * skin) | |
1434 { | |
1435 g_return_if_fail(skin != NULL); | |
1436 skin_load_nolock(skin, skin->path, TRUE); | |
1437 } | |
1438 | |
1439 | |
1440 static SkinPixmap * | |
1441 skin_get_pixmap(Skin * skin, SkinPixmapId map_id) | |
1442 { | |
1443 g_return_val_if_fail(skin != NULL, NULL); | |
1444 g_return_val_if_fail(map_id < SKIN_PIXMAP_COUNT, NULL); | |
1445 | |
1446 return &skin->pixmaps[map_id]; | |
1447 } | |
1448 | |
1449 GdkBitmap * | |
1450 skin_get_mask(Skin * skin, SkinMaskId mi) | |
1451 { | |
1452 g_return_val_if_fail(skin != NULL, NULL); | |
1453 g_return_val_if_fail(mi < SKIN_PIXMAP_COUNT, NULL); | |
1454 | |
1455 return skin->masks[mi]; | |
1456 } | |
1457 | |
1458 GdkColor * | |
1459 skin_get_color(Skin * skin, SkinColorId color_id) | |
1460 { | |
1461 GdkColor *ret = NULL; | |
1462 | |
1463 g_return_val_if_fail(skin != NULL, NULL); | |
1464 | |
1465 switch (color_id) { | |
1466 case SKIN_TEXTBG: | |
1467 if (skin->pixmaps[SKIN_TEXT].pixmap) | |
1468 ret = skin->textbg; | |
1469 else | |
1470 ret = skin->def_textbg; | |
1471 break; | |
1472 case SKIN_TEXTFG: | |
1473 if (skin->pixmaps[SKIN_TEXT].pixmap) | |
1474 ret = skin->textfg; | |
1475 else | |
1476 ret = skin->def_textfg; | |
1477 break; | |
1478 default: | |
1479 if (color_id < SKIN_COLOR_COUNT) | |
1480 ret = skin->colors[color_id]; | |
1481 break; | |
1482 } | |
1483 return ret; | |
1484 } | |
1485 | |
1486 void | |
1487 skin_get_viscolor(Skin * skin, guchar vis_color[24][3]) | |
1488 { | |
1489 gint i; | |
1490 | |
1491 g_return_if_fail(skin != NULL); | |
1492 | |
1493 for (i = 0; i < 24; i++) { | |
1494 vis_color[i][0] = skin->vis_color[i][0]; | |
1495 vis_color[i][1] = skin->vis_color[i][1]; | |
1496 vis_color[i][2] = skin->vis_color[i][2]; | |
1497 } | |
1498 } | |
1499 | |
1500 gint | |
1501 skin_get_id(void) | |
1502 { | |
1503 return skin_current_num; | |
1504 } | |
1505 | |
1506 void | |
1507 skin_draw_pixmap(Skin * skin, GdkDrawable * drawable, GdkGC * gc, | |
1508 SkinPixmapId pixmap_id, | |
1509 gint xsrc, gint ysrc, gint xdest, gint ydest, | |
1510 gint width, gint height) | |
1511 { | |
1512 SkinPixmap *pixmap; | |
1513 | |
1514 g_return_if_fail(skin != NULL); | |
1515 | |
1516 pixmap = skin_get_pixmap(skin, pixmap_id); | |
1517 g_return_if_fail(pixmap != NULL); | |
1518 g_return_if_fail(pixmap->pixmap != NULL); | |
1519 | |
1520 if (xsrc > pixmap->width || ysrc > pixmap->height) | |
1521 return; | |
1522 | |
1523 width = MIN(width, pixmap->width - xsrc); | |
1524 height = MIN(height, pixmap->height - ysrc); | |
1525 gdk_draw_pixmap(drawable, gc, pixmap->pixmap, xsrc, ysrc, | |
1526 xdest, ydest, width, height); | |
1527 } | |
1528 | |
1529 void | |
1530 skin_get_eq_spline_colors(Skin * skin, guint32 colors[19]) | |
1531 { | |
1532 gint i; | |
1533 GdkPixmap *pixmap; | |
1534 GdkImage *img; | |
1535 SkinPixmap *eqmainpm; | |
1536 | |
1537 g_return_if_fail(skin != NULL); | |
1538 | |
1539 eqmainpm = &skin->pixmaps[SKIN_EQMAIN]; | |
1540 if (eqmainpm->pixmap && | |
1541 eqmainpm->current_width >= 116 && eqmainpm->current_height >= 313) | |
1542 pixmap = eqmainpm->pixmap; | |
1543 else | |
1544 return; | |
1545 | |
1546 if (!GDK_IS_DRAWABLE(pixmap)) | |
1547 return; | |
1548 | |
1549 if (!(img = gdk_drawable_get_image(pixmap, 115, 294, 1, 19))) | |
1550 return; | |
1551 | |
1552 for (i = 0; i < 19; i++) | |
1553 colors[i] = gdk_image_get_pixel(img, 0, i); | |
1554 | |
1555 gdk_image_destroy(img); | |
1556 } | |
1557 | |
1558 | |
1559 static void | |
1560 skin_draw_playlistwin_frame_top(Skin * skin, | |
1561 GdkDrawable * drawable, | |
1562 GdkGC * gc, | |
1563 gint width, gint height, gboolean focus) | |
1564 { | |
1565 /* The title bar skin consists of 2 sets of 4 images, 1 set | |
1566 * for focused state and the other for unfocused. The 4 images | |
1567 * are: | |
1568 * | |
1569 * a. right corner (25,20) | |
1570 * b. left corner (25,20) | |
1571 * c. tiler (25,20) | |
1572 * d. title (100,20) | |
1573 * | |
1574 * min allowed width = 100+25+25 = 150 | |
1575 */ | |
1576 | |
1577 gint i, y, c; | |
1578 | |
1579 /* get y offset of the pixmap set to use */ | |
1580 if (focus) | |
1581 y = 0; | |
1582 else | |
1583 y = 21; | |
1584 | |
1585 /* left corner */ | |
1586 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 0, y, 0, 0, 25, 20); | |
1587 | |
1588 /* titlebar title */ | |
1589 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 26, y, | |
1590 (width - 100) / 2, 0, 100, 20); | |
1591 | |
1592 /* titlebar right corner */ | |
1593 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 153, y, | |
1594 width - 25, 0, 25, 20); | |
1595 | |
1596 /* tile draw the remaining frame */ | |
1597 | |
1598 /* compute tile count */ | |
1599 c = (width - (100 + 25 + 25)) / 25; | |
1600 | |
1601 for (i = 0; i < c / 2; i++) { | |
1602 /* left of title */ | |
1603 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y, | |
1604 25 + i * 25, 0, 25, 20); | |
1605 | |
1606 /* right of title */ | |
1607 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y, | |
1608 (width + 100) / 2 + i * 25, 0, 25, 20); | |
1609 } | |
1610 | |
1611 if (c & 1) { | |
1612 /* Odd tile count, so one remaining to draw. Here we split | |
1613 * it into two and draw half on either side of the title */ | |
1614 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y, | |
1615 ((c / 2) * 25) + 25, 0, 12, 20); | |
1616 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y, | |
1617 (width / 2) + ((c / 2) * 25) + 50, 0, 13, 20); | |
1618 } | |
1619 } | |
1620 | |
1621 static void | |
1622 skin_draw_playlistwin_frame_bottom(Skin * skin, | |
1623 GdkDrawable * drawable, | |
1624 GdkGC * gc, | |
1625 gint width, gint height, gboolean focus) | |
1626 { | |
1627 /* The bottom frame skin consists of 1 set of 4 images. The 4 | |
1628 * images are: | |
1629 * | |
1630 * a. left corner with menu buttons (125,38) | |
1631 * b. visualization window (75,38) | |
1632 * c. right corner with play buttons (150,38) | |
1633 * d. frame tile (25,38) | |
1634 * | |
1635 * (min allowed width = 125+150+25=300 | |
1636 */ | |
1637 | |
1638 gint i, c; | |
1639 | |
1640 /* bottom left corner (menu buttons) */ | |
1641 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 0, 72, | |
1642 0, height - 38, 125, 38); | |
1643 | |
1644 c = (width - 275) / 25; | |
1645 | |
1646 /* draw visualization window, if width allows */ | |
1647 if (c >= 3) { | |
1648 c -= 3; | |
1649 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 205, 0, | |
1650 width - (150 + 75), height - 38, 75, 38); | |
1651 } | |
1652 | |
1653 /* Bottom right corner (playbuttons etc) */ | |
1654 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, | |
1655 126, 72, width - 150, height - 38, 150, 38); | |
1656 | |
1657 /* Tile draw the remaining undrawn portions */ | |
1658 for (i = 0; i < c; i++) | |
1659 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 179, 0, | |
1660 125 + i * 25, height - 38, 25, 38); | |
1661 } | |
1662 | |
1663 static void | |
1664 skin_draw_playlistwin_frame_sides(Skin * skin, | |
1665 GdkDrawable * drawable, | |
1666 GdkGC * gc, | |
1667 gint width, gint height, gboolean focus) | |
1668 { | |
1669 /* The side frames consist of 2 tile images. 1 for the left, 1 for | |
1670 * the right. | |
1671 * a. left (12,29) | |
1672 * b. right (19,29) | |
1673 */ | |
1674 | |
1675 gint i; | |
1676 | |
1677 /* frame sides */ | |
1678 for (i = 0; i < (height - (20 + 38)) / 29; i++) { | |
1679 /* left */ | |
1680 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 0, 42, | |
1681 0, 20 + i * 29, 12, 29); | |
1682 | |
1683 /* right */ | |
1684 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 32, 42, | |
1685 width - 19, 20 + i * 29, 19, 29); | |
1686 } | |
1687 } | |
1688 | |
1689 | |
1690 void | |
1691 skin_draw_playlistwin_frame(Skin * skin, | |
1692 GdkDrawable * drawable, GdkGC * gc, | |
1693 gint width, gint height, gboolean focus) | |
1694 { | |
1695 skin_draw_playlistwin_frame_top(skin, drawable, gc, width, height, focus); | |
1696 skin_draw_playlistwin_frame_bottom(skin, drawable, gc, width, height, | |
1697 focus); | |
1698 skin_draw_playlistwin_frame_sides(skin, drawable, gc, width, height, | |
1699 focus); | |
1700 } | |
1701 | |
1702 | |
1703 void | |
1704 skin_draw_playlistwin_shaded(Skin * skin, | |
1705 GdkDrawable * drawable, GdkGC * gc, | |
1706 gint width, gboolean focus) | |
1707 { | |
1708 /* The shade mode titlebar skin consists of 4 images: | |
1709 * a) left corner offset (72,42) size (25,14) | |
1710 * b) right corner, focused offset (99,57) size (50,14) | |
1711 * c) right corner, unfocused offset (99,42) size (50,14) | |
1712 * d) bar tile offset (72,57) size (25,14) | |
1713 */ | |
1714 | |
1715 gint i; | |
1716 | |
1717 /* left corner */ | |
1718 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 72, 42, 0, 0, 25, 14); | |
1719 | |
1720 /* bar tile */ | |
1721 for (i = 0; i < (width - 75) / 25; i++) | |
1722 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 72, 57, | |
1723 (i * 25) + 25, 0, 25, 14); | |
1724 | |
1725 /* right corner */ | |
1726 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 99, focus ? 57 : 42, | |
1727 width - 50, 0, 50, 14); | |
1728 } | |
1729 | |
1730 | |
1731 void | |
1732 skin_draw_mainwin_titlebar(Skin * skin, | |
1733 GdkDrawable * drawable, GdkGC * gc, | |
1734 gboolean shaded, gboolean focus) | |
1735 { | |
1736 /* The titlebar skin consists of 2 sets of 2 images, one for for | |
1737 * shaded and the other for unshaded mode, giving a total of 4. | |
1738 * The images are exactly 275x14 pixels, aligned and arranged | |
1739 * vertically on each other in the pixmap in the following order: | |
1740 * | |
1741 * a) unshaded, focused offset (27, 0) | |
1742 * b) unshaded, unfocused offset (27, 15) | |
1743 * c) shaded, focused offset (27, 29) | |
1744 * d) shaded, unfocused offset (27, 42) | |
1745 */ | |
1746 | |
1747 gint y_offset; | |
1748 | |
1749 if (shaded) { | |
1750 if (focus) | |
1751 y_offset = 29; | |
1752 else | |
1753 y_offset = 42; | |
1754 } | |
1755 else { | |
1756 if (focus) | |
1757 y_offset = 0; | |
1758 else | |
1759 y_offset = 15; | |
1760 } | |
1761 | |
1762 skin_draw_pixmap(skin, drawable, gc, SKIN_TITLEBAR, 27, y_offset, | |
1763 0, 0, MAINWIN_WIDTH, MAINWIN_TITLEBAR_HEIGHT); | |
1764 } |