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