Mercurial > audlegacy
annotate audacious/widgets/skin.c @ 2270:50dea14e2fa3 trunk
[svn] Serbian language upadated
author | kustodian |
---|---|
date | Thu, 04 Jan 2007 14:55:34 -0800 |
parents | 1148bfa60fd5 |
children |
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 | |
2236 | 36 #include "ui_equalizer.h" |
1653 | 37 #include "main.h" |
38 #include "ui_playlist.h" | |
2244 | 39 #include "ui_skinselector.h" |
1653 | 40 #include "util.h" |
41 | |
42 #include "debug.h" | |
43 | |
44 #include "platform/smartinclude.h" | |
2148 | 45 #include "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); | |
2140
299651a8f107
[svn] - made playlistwin_update_list depend on passed Playlist* instead of blindly using playlist_get_active(); this solves many locking issues with multiple playlists, but SHOULD be reviewed in every place playlistwin_update_list is used; added a playlist_new_from_selected() call too
giacomo
parents:
2061
diff
changeset
|
179 playlistwin_update_list(playlist_get_active()); |
1653 | 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 { | |
2186 | 302 GdkPixbuf *pixbuf, *pixbuf2; |
1653 | 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 | |
2186 | 326 pixbuf2 = audacious_create_colorized_pixbuf(pixbuf, cfg.colorize_r, cfg.colorize_g, cfg.colorize_b); |
327 g_object_unref(pixbuf); | |
328 | |
329 gdk_draw_pixbuf(pixmap, mainwin_gc, pixbuf2, 0, 0, 0, 0, width, height, | |
2163 | 330 GDK_RGB_DITHER_MAX, 0, 0); |
2186 | 331 g_object_unref(pixbuf2); |
1653 | 332 |
333 return pixmap; | |
334 } | |
335 | |
336 static gboolean | |
337 skin_load_pixmap_id(Skin * skin, SkinPixmapId id, const gchar * path_p) | |
338 { | |
339 const gchar *path; | |
340 gchar *filename; | |
341 gint width, height; | |
342 const SkinPixmapIdMapping *pixmap_id_mapping; | |
343 GdkPixmap *gpm; | |
344 SkinPixmap *pm = NULL; | |
345 gchar *basenames[EXTENSION_TARGETS * 2 + 1]; /* alternate basenames */ | |
346 gint i, y; | |
347 | |
348 g_return_val_if_fail(skin != NULL, FALSE); | |
349 g_return_val_if_fail(id < SKIN_PIXMAP_COUNT, FALSE); | |
350 | |
351 pixmap_id_mapping = skin_pixmap_id_lookup(id); | |
352 g_return_val_if_fail(pixmap_id_mapping != NULL, FALSE); | |
353 | |
354 memset(&basenames, 0, sizeof(basenames)); | |
355 | |
356 for (i = 0, y = 0; i < EXTENSION_TARGETS; i++, y++) | |
357 { | |
358 basenames[y] = g_strdup_printf("%s.%s", pixmap_id_mapping->name, | |
359 ext_targets[i]); | |
360 | |
361 if (pixmap_id_mapping->alt_name) | |
362 basenames[++y] = g_strdup_printf("%s.%s", | |
363 pixmap_id_mapping->alt_name, ext_targets[i]); | |
364 } | |
365 | |
366 path = path_p ? path_p : skin->path; | |
367 filename = skin_pixmap_locate(path, basenames); | |
368 | |
369 for (i = 0; basenames[i] != NULL; i++) | |
370 { | |
371 g_free(basenames[i]); | |
372 basenames[i] = NULL; | |
373 } | |
374 | |
375 if (!(gpm = pixmap_new_from_file(filename))) { | |
376 g_warning("loading of %s failed", filename); | |
377 g_free(filename); | |
378 return FALSE; | |
379 } | |
380 | |
381 g_free(filename); | |
382 | |
383 gdk_drawable_get_size(GDK_DRAWABLE(gpm), &width, &height); | |
384 pm = &skin->pixmaps[id]; | |
385 pm->pixmap = gpm; | |
386 pm->width = width; | |
387 pm->height = height; | |
388 pm->current_width = width; | |
389 pm->current_height = height; | |
390 | |
391 return TRUE; | |
392 } | |
393 | |
394 void | |
395 skin_mask_create(Skin * skin, | |
396 const gchar * path, | |
397 gint id, | |
398 GdkWindow * window) | |
399 { | |
400 skin->masks[id] = | |
401 skin_create_transparent_mask(path, "region.txt", | |
402 skin_mask_info[id].inistr, window, | |
403 skin_mask_info[id].width, | |
1938 | 404 skin_mask_info[id].height, FALSE); |
405 | |
406 skin->ds_masks[id] = | |
407 skin_create_transparent_mask(path, "region.txt", | |
408 skin_mask_info[id].inistr, window, | |
409 skin_mask_info[id].width * 2, | |
410 skin_mask_info[id].height * 2, TRUE); | |
1653 | 411 } |
412 | |
413 static void | |
414 skin_setup_masks(Skin * skin) | |
415 { | |
416 GdkBitmap *mask; | |
417 | |
418 if (cfg.show_wm_decorations) | |
419 return; | |
420 | |
421 if (cfg.player_visible) { | |
422 mask = skin_get_mask(skin, SKIN_MASK_MAIN + cfg.player_shaded); | |
423 gtk_widget_shape_combine_mask(mainwin, mask, 0, 0); | |
424 } | |
425 | |
426 mask = skin_get_mask(skin, SKIN_MASK_EQ + cfg.equalizer_shaded); | |
427 gtk_widget_shape_combine_mask(equalizerwin, mask, 0, 0); | |
428 } | |
429 | |
430 static GdkBitmap * | |
431 create_default_mask(GdkWindow * parent, gint w, gint h) | |
432 { | |
433 GdkBitmap *ret; | |
434 GdkGC *gc; | |
435 GdkColor pattern; | |
436 | |
437 ret = gdk_pixmap_new(parent, w, h, 1); | |
438 gc = gdk_gc_new(ret); | |
439 pattern.pixel = 1; | |
440 gdk_gc_set_foreground(gc, &pattern); | |
441 gdk_draw_rectangle(ret, gc, TRUE, 0, 0, w, h); | |
2163 | 442 g_object_unref(gc); |
1653 | 443 |
444 return ret; | |
445 } | |
446 | |
447 static void | |
448 skin_query_color(GdkColormap * cm, GdkColor * c) | |
449 { | |
450 #ifdef GDK_WINDOWING_X11 | |
451 XColor xc = { 0,0,0,0,0,0 }; | |
452 | |
453 xc.pixel = c->pixel; | |
454 XQueryColor(GDK_COLORMAP_XDISPLAY(cm), GDK_COLORMAP_XCOLORMAP(cm), &xc); | |
455 c->red = xc.red; | |
456 c->green = xc.green; | |
457 c->blue = xc.blue; | |
458 #else | |
459 /* do nothing. see what breaks? */ | |
460 #endif | |
461 } | |
462 | |
463 static glong | |
464 skin_calc_luminance(GdkColor * c) | |
465 { | |
466 return (0.212671 * c->red + 0.715160 * c->green + 0.072169 * c->blue); | |
467 } | |
468 | |
469 static void | |
470 skin_get_textcolors(GdkPixmap * text, GdkColor * bgc, GdkColor * fgc) | |
471 { | |
472 /* | |
473 * Try to extract reasonable background and foreground colors | |
474 * from the font pixmap | |
475 */ | |
476 | |
477 GdkImage *gi; | |
478 GdkColormap *cm; | |
479 gint i; | |
480 | |
481 g_return_if_fail(text != NULL); | |
2164
9d38094655df
[svn] - fix the positioning of an assertion to a place where it would actually
nenolod
parents:
2163
diff
changeset
|
482 g_return_if_fail(GDK_IS_WINDOW(playlistwin->window)); |
1653 | 483 |
484 /* Get the first line of text */ | |
485 gi = gdk_drawable_get_image(text, 0, 0, 152, 6); | |
2164
9d38094655df
[svn] - fix the positioning of an assertion to a place where it would actually
nenolod
parents:
2163
diff
changeset
|
486 cm = gdk_drawable_get_colormap(playlistwin->window); |
1653 | 487 |
488 for (i = 0; i < 6; i++) { | |
489 GdkColor c; | |
490 gint x; | |
491 glong d, max_d; | |
492 | |
493 /* Get a pixel from the middle of the space character */ | |
494 bgc[i].pixel = gdk_image_get_pixel(gi, 151, i); | |
495 skin_query_color(cm, &bgc[i]); | |
496 | |
497 max_d = 0; | |
498 for (x = 1; x < 150; x++) { | |
499 c.pixel = gdk_image_get_pixel(gi, x, i); | |
500 skin_query_color(cm, &c); | |
501 | |
502 d = labs(skin_calc_luminance(&c) - skin_calc_luminance(&bgc[i])); | |
503 if (d > max_d) { | |
504 memcpy(&fgc[i], &c, sizeof(GdkColor)); | |
505 max_d = d; | |
506 } | |
507 } | |
508 } | |
2163 | 509 g_object_unref(gi); |
1653 | 510 } |
511 | |
512 gboolean | |
513 init_skins(const gchar * path) | |
514 { | |
515 bmp_active_skin = skin_new(); | |
516 | |
517 if (!bmp_active_skin_load(path)) { | |
518 /* FIXME: Oddly, g_message() causes a crash if path is NULL on | |
519 * Solaris (see bug #165) */ | |
520 if (path) | |
521 g_message("Unable to load skin (%s), trying default...", path); | |
522 | |
523 /* can't load configured skin, retry with default */ | |
524 if (!bmp_active_skin_load(BMP_DEFAULT_SKIN_PATH)) { | |
525 g_message("Unable to load default skin (%s)! Giving up.", | |
526 BMP_DEFAULT_SKIN_PATH); | |
527 return FALSE; | |
528 } | |
529 } | |
530 | |
531 if (cfg.random_skin_on_play) | |
532 skinlist_update(); | |
533 | |
534 return TRUE; | |
535 } | |
536 | |
537 /* | |
538 * Opens and parses a skin's hints file. | |
539 * Hints files are somewhat like "scripts" in Winamp3/5. | |
540 * We'll probably add scripts to it next. | |
541 */ | |
542 void | |
543 skin_parse_hints(Skin * skin, gchar *path_p) | |
544 { | |
545 gchar *filename, *tmp; | |
546 | |
547 path_p = path_p ? path_p : skin->path; | |
548 | |
549 filename = find_file_recursively(path_p, "skin.hints"); | |
550 | |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
551 skin->properties.mainwin_othertext = FALSE; |
1653 | 552 tmp = read_ini_string(filename, "skin", "mainwinOthertext"); |
553 | |
554 if (tmp != NULL) | |
1772
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
555 { |
1653 | 556 skin->properties.mainwin_othertext = atoi(tmp); |
1772
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
557 g_free(tmp); |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
558 } |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
559 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
560 skin->properties.mainwin_vis_x = 24; |
1772
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
561 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
|
562 |
1772
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
563 if (tmp != NULL) |
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 skin->properties.mainwin_vis_x = atoi(tmp); |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
566 g_free(tmp); |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
567 } |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
568 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
569 skin->properties.mainwin_vis_y = 43; |
1772
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
570 tmp = read_ini_string(filename, "skin", "mainwinVisY"); |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
571 |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
572 if (tmp != NULL) |
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 skin->properties.mainwin_vis_y = atoi(tmp); |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
575 g_free(tmp); |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
576 } |
cb216af25b55
[svn] - framework for repositioning the vis element on the skin.
nenolod
parents:
1751
diff
changeset
|
577 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
578 skin->properties.mainwin_vis_width = 76; |
1780
be1de1dd7262
[svn] - implement [skin.hints:mainwinVisWidth] property.
nenolod
parents:
1779
diff
changeset
|
579 tmp = read_ini_string(filename, "skin", "mainwinVisWidth"); |
be1de1dd7262
[svn] - implement [skin.hints:mainwinVisWidth] property.
nenolod
parents:
1779
diff
changeset
|
580 |
be1de1dd7262
[svn] - implement [skin.hints:mainwinVisWidth] property.
nenolod
parents:
1779
diff
changeset
|
581 if (tmp != NULL) |
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 skin->properties.mainwin_vis_width = atoi(tmp); |
be1de1dd7262
[svn] - implement [skin.hints:mainwinVisWidth] property.
nenolod
parents:
1779
diff
changeset
|
584 g_free(tmp); |
be1de1dd7262
[svn] - implement [skin.hints:mainwinVisWidth] property.
nenolod
parents:
1779
diff
changeset
|
585 } |
be1de1dd7262
[svn] - implement [skin.hints:mainwinVisWidth] property.
nenolod
parents:
1779
diff
changeset
|
586 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
587 skin->properties.mainwin_text_x = 112; |
1773 | 588 tmp = read_ini_string(filename, "skin", "mainwinTextX"); |
589 | |
590 if (tmp != NULL) | |
591 { | |
592 skin->properties.mainwin_text_x = atoi(tmp); | |
593 g_free(tmp); | |
594 } | |
595 | |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
596 skin->properties.mainwin_text_y = 27; |
1773 | 597 tmp = read_ini_string(filename, "skin", "mainwinTextY"); |
598 | |
599 if (tmp != NULL) | |
600 { | |
601 skin->properties.mainwin_text_y = atoi(tmp); | |
602 g_free(tmp); | |
603 } | |
604 | |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
605 skin->properties.mainwin_text_width = 153; |
1777
17e38b5c8e2f
[svn] - support for the [skin.hints:mainwinTextWidth] property.
nenolod
parents:
1773
diff
changeset
|
606 tmp = read_ini_string(filename, "skin", "mainwinTextWidth"); |
17e38b5c8e2f
[svn] - support for the [skin.hints:mainwinTextWidth] property.
nenolod
parents:
1773
diff
changeset
|
607 |
17e38b5c8e2f
[svn] - support for the [skin.hints:mainwinTextWidth] property.
nenolod
parents:
1773
diff
changeset
|
608 if (tmp != NULL) |
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 skin->properties.mainwin_text_width = atoi(tmp); |
17e38b5c8e2f
[svn] - support for the [skin.hints:mainwinTextWidth] property.
nenolod
parents:
1773
diff
changeset
|
611 g_free(tmp); |
17e38b5c8e2f
[svn] - support for the [skin.hints:mainwinTextWidth] property.
nenolod
parents:
1773
diff
changeset
|
612 } |
17e38b5c8e2f
[svn] - support for the [skin.hints:mainwinTextWidth] property.
nenolod
parents:
1773
diff
changeset
|
613 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
614 skin->properties.mainwin_infobar_x = 112; |
1773 | 615 tmp = read_ini_string(filename, "skin", "mainwinInfoBarX"); |
616 | |
617 if (tmp != NULL) | |
618 { | |
619 skin->properties.mainwin_infobar_x = atoi(tmp); | |
620 g_free(tmp); | |
621 } | |
622 | |
1814 | 623 skin->properties.mainwin_infobar_y = 43; |
1773 | 624 tmp = read_ini_string(filename, "skin", "mainwinInfoBarY"); |
625 | |
626 if (tmp != NULL) | |
627 { | |
628 skin->properties.mainwin_infobar_y = atoi(tmp); | |
629 g_free(tmp); | |
630 } | |
631 | |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
632 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
|
633 tmp = read_ini_string(filename, "skin", "mainwinNumber0X"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
634 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
635 if (tmp != NULL) |
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 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
|
638 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
639 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
640 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
641 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
|
642 tmp = read_ini_string(filename, "skin", "mainwinNumber0Y"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
643 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
644 if (tmp != NULL) |
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 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
|
647 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
648 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
649 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
650 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
|
651 tmp = read_ini_string(filename, "skin", "mainwinNumber1X"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
652 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
653 if (tmp != NULL) |
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 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
|
656 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
657 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
658 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
659 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
|
660 tmp = read_ini_string(filename, "skin", "mainwinNumber1Y"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
661 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
662 if (tmp != NULL) |
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 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
|
665 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
666 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
667 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
668 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
|
669 tmp = read_ini_string(filename, "skin", "mainwinNumber2X"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
670 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
671 if (tmp != NULL) |
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 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
|
674 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
675 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
676 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
677 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
|
678 tmp = read_ini_string(filename, "skin", "mainwinNumber2Y"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
679 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
680 if (tmp != NULL) |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
681 { |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
682 skin->properties.mainwin_number_2_y = atoi(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
683 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
684 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
685 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
686 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
|
687 tmp = read_ini_string(filename, "skin", "mainwinNumber3X"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
688 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
689 if (tmp != NULL) |
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 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
|
692 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
693 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
694 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
695 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
|
696 tmp = read_ini_string(filename, "skin", "mainwinNumber3Y"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
697 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
698 if (tmp != NULL) |
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 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
|
701 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
702 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
703 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
704 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
|
705 tmp = read_ini_string(filename, "skin", "mainwinNumber4X"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
706 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
707 if (tmp != NULL) |
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 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
|
710 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
711 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
712 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
713 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
|
714 tmp = read_ini_string(filename, "skin", "mainwinNumber4Y"); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
715 |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
716 if (tmp != NULL) |
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 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
|
719 g_free(tmp); |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
720 } |
1d3d05c541d3
[svn] - support for: [skin.hints:mainwinNumber(0-4)(X,Y)] properties.
nenolod
parents:
1777
diff
changeset
|
721 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
722 skin->properties.mainwin_playstatus_x = 24; |
1779
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
723 tmp = read_ini_string(filename, "skin", "mainwinPlayStatusX"); |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
724 |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
725 if (tmp != NULL) |
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 skin->properties.mainwin_playstatus_x = atoi(tmp); |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
728 g_free(tmp); |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
729 } |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
730 |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
731 skin->properties.mainwin_playstatus_y = 28; |
1779
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
732 tmp = read_ini_string(filename, "skin", "mainwinPlayStatusY"); |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
733 |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
734 if (tmp != NULL) |
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 skin->properties.mainwin_playstatus_y = atoi(tmp); |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
737 g_free(tmp); |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
738 } |
87d4da9b31ea
[svn] - implement [skin.hints:mainwinPlayStatus(X,Y)] properties.
nenolod
parents:
1778
diff
changeset
|
739 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
740 skin->properties.mainwin_menurow_visible = TRUE; |
1784 | 741 tmp = read_ini_string(filename, "skin", "mainwinMenurowVisible"); |
742 | |
743 if (tmp != NULL) | |
744 { | |
745 skin->properties.mainwin_menurow_visible = atoi(tmp); | |
746 g_free(tmp); | |
747 } | |
748 | |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
749 skin->properties.mainwin_volume_x = 107; |
1786 | 750 tmp = read_ini_string(filename, "skin", "mainwinVolumeX"); |
751 | |
752 if (tmp != NULL) | |
753 { | |
754 skin->properties.mainwin_volume_x = atoi(tmp); | |
755 g_free(tmp); | |
756 } | |
757 | |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
758 skin->properties.mainwin_volume_y = 57; |
1786 | 759 tmp = read_ini_string(filename, "skin", "mainwinVolumeY"); |
760 | |
761 if (tmp != NULL) | |
762 { | |
763 skin->properties.mainwin_volume_y = atoi(tmp); | |
764 g_free(tmp); | |
765 } | |
766 | |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
767 skin->properties.mainwin_balance_x = 177; |
1786 | 768 tmp = read_ini_string(filename, "skin", "mainwinBalanceX"); |
769 | |
770 if (tmp != NULL) | |
771 { | |
772 skin->properties.mainwin_balance_x = atoi(tmp); | |
773 g_free(tmp); | |
774 } | |
775 | |
1815 | 776 skin->properties.mainwin_balance_y = 57; |
1786 | 777 tmp = read_ini_string(filename, "skin", "mainwinBalanceY"); |
778 | |
779 if (tmp != NULL) | |
780 { | |
781 skin->properties.mainwin_balance_y = atoi(tmp); | |
782 g_free(tmp); | |
783 } | |
784 | |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
785 skin->properties.mainwin_position_x = 16; |
1786 | 786 tmp = read_ini_string(filename, "skin", "mainwinPositionX"); |
787 | |
788 if (tmp != NULL) | |
789 { | |
790 skin->properties.mainwin_position_x = atoi(tmp); | |
791 g_free(tmp); | |
792 } | |
793 | |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
794 skin->properties.mainwin_position_y = 72; |
1788
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
795 tmp = read_ini_string(filename, "skin", "mainwinPositionY"); |
1786 | 796 |
797 if (tmp != NULL) | |
798 { | |
799 skin->properties.mainwin_position_y = atoi(tmp); | |
800 g_free(tmp); | |
801 } | |
802 | |
1813
97e060182873
[svn] - default values for all properties (fixes wa2 skins/amsf 1.0 skins)
nenolod
parents:
1811
diff
changeset
|
803 skin->properties.mainwin_othertext_is_status = FALSE; |
1788
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
804 tmp = read_ini_string(filename, "skin", "mainwinOthertextIsStatus"); |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
805 |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
806 if (tmp != NULL) |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
807 { |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
808 skin->properties.mainwin_othertext_is_status = atoi(tmp); |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
809 g_free(tmp); |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
810 } |
80b6282a31ae
[svn] - implement mainwinOthertextIsStatus property.
nenolod
parents:
1786
diff
changeset
|
811 |
1867
bddfba95af47
[svn] - fix another regression where mainwin_othertext_visible is TRUE even though the skin doesn't want
nenolod
parents:
1865
diff
changeset
|
812 skin->properties.mainwin_othertext_visible = skin->properties.mainwin_othertext; |
1792
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
813 tmp = read_ini_string(filename, "skin", "mainwinOthertextVisible"); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
814 |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
815 if (tmp != NULL) |
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 skin->properties.mainwin_othertext_visible = atoi(tmp); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
818 g_free(tmp); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
819 } |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
820 |
1865
431934637721
[svn] - for fucks sake, properties::mainwin_text_visible should be initialised to TRUE
nenolod
parents:
1857
diff
changeset
|
821 skin->properties.mainwin_text_visible = TRUE; |
1792
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
822 tmp = read_ini_string(filename, "skin", "mainwinTextVisible"); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
823 |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
824 if (tmp != NULL) |
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 skin->properties.mainwin_text_visible = atoi(tmp); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
827 g_free(tmp); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
828 } |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
829 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
830 skin->properties.mainwin_vis_visible = TRUE; |
1792
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
831 tmp = read_ini_string(filename, "skin", "mainwinVisVisible"); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
832 |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
833 if (tmp != NULL) |
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 skin->properties.mainwin_vis_visible = atoi(tmp); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
836 g_free(tmp); |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
837 } |
b8f082ddd9f1
[svn] - implement mainwinTextVisible, mainwinVisVisible, mainwinOthertextVisible hints
nenolod
parents:
1788
diff
changeset
|
838 |
1816 | 839 skin->properties.mainwin_previous_x = 16; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
840 tmp = read_ini_string(filename, "skin", "mainwinPreviousX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
841 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
842 if (tmp != NULL) |
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 skin->properties.mainwin_previous_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
845 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
846 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
847 |
1816 | 848 skin->properties.mainwin_previous_y = 88; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
849 tmp = read_ini_string(filename, "skin", "mainwinPreviousY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
850 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
851 if (tmp != NULL) |
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 skin->properties.mainwin_previous_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
854 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
855 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
856 |
1816 | 857 skin->properties.mainwin_play_x = 39; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
858 tmp = read_ini_string(filename, "skin", "mainwinPlayX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
859 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
860 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
861 { |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
862 skin->properties.mainwin_play_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
863 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
864 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
865 |
1816 | 866 skin->properties.mainwin_play_y = 88; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
867 tmp = read_ini_string(filename, "skin", "mainwinPlayY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
868 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
869 if (tmp != NULL) |
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 skin->properties.mainwin_play_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
872 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
873 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
874 |
1816 | 875 skin->properties.mainwin_pause_x = 62; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
876 tmp = read_ini_string(filename, "skin", "mainwinPauseX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
877 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
878 if (tmp != NULL) |
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 skin->properties.mainwin_pause_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
881 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
882 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
883 |
1816 | 884 skin->properties.mainwin_pause_y = 88; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
885 tmp = read_ini_string(filename, "skin", "mainwinPauseY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
886 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
887 if (tmp != NULL) |
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 skin->properties.mainwin_pause_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
890 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
891 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
892 |
1816 | 893 skin->properties.mainwin_stop_x = 85; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
894 tmp = read_ini_string(filename, "skin", "mainwinStopX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
895 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
896 if (tmp != NULL) |
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 skin->properties.mainwin_stop_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
899 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
900 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
901 |
1816 | 902 skin->properties.mainwin_stop_y = 88; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
903 tmp = read_ini_string(filename, "skin", "mainwinStopY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
904 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
905 if (tmp != NULL) |
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 skin->properties.mainwin_stop_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
908 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
909 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
910 |
1816 | 911 skin->properties.mainwin_next_x = 108; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
912 tmp = read_ini_string(filename, "skin", "mainwinNextX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
913 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
914 if (tmp != NULL) |
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 skin->properties.mainwin_next_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
917 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
918 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
919 |
1816 | 920 skin->properties.mainwin_next_y = 88; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
921 tmp = read_ini_string(filename, "skin", "mainwinNextY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
922 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
923 if (tmp != NULL) |
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 skin->properties.mainwin_next_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
926 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
927 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
928 |
1816 | 929 skin->properties.mainwin_eject_x = 136; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
930 tmp = read_ini_string(filename, "skin", "mainwinEjectX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
931 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
932 if (tmp != NULL) |
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 skin->properties.mainwin_eject_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
935 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
936 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
937 |
2061
a7fd7f5f8333
[svn] - mainwinEjectY's default value should be 89, not 88.
nenolod
parents:
2016
diff
changeset
|
938 skin->properties.mainwin_eject_y = 89; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
939 tmp = read_ini_string(filename, "skin", "mainwinEjectY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
940 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
941 if (tmp != NULL) |
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 skin->properties.mainwin_eject_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
944 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
945 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
946 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
947 skin->properties.mainwin_width = 275; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
948 tmp = read_ini_string(filename, "skin", "mainwinWidth"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
949 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
950 if (tmp != NULL) |
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 skin->properties.mainwin_width = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
953 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
954 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
955 |
1849
d8791a0b2902
[svn] - change skin_mask_info[] if the player sizes change.
nenolod
parents:
1848
diff
changeset
|
956 /* 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
|
957 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
|
958 |
2238 | 959 skin->properties.mainwin_height = 116; |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
960 tmp = read_ini_string(filename, "skin", "mainwinHeight"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
961 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
962 if (tmp != NULL) |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
963 { |
2238 | 964 skin->properties.mainwin_height = atoi(tmp); |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
965 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
966 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
967 |
1849
d8791a0b2902
[svn] - change skin_mask_info[] if the player sizes change.
nenolod
parents:
1848
diff
changeset
|
968 /* XXX: use of skin_mask_info here is bad */ |
2238 | 969 skin_mask_info[0].height = skin->properties.mainwin_height; |
1849
d8791a0b2902
[svn] - change skin_mask_info[] if the player sizes change.
nenolod
parents:
1848
diff
changeset
|
970 |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
971 skin->properties.mainwin_about_x = 247; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
972 tmp = read_ini_string(filename, "skin", "mainwinAboutX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
973 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
974 if (tmp != NULL) |
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 skin->properties.mainwin_about_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
977 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
978 } |
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 skin->properties.mainwin_about_y = 83; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
981 tmp = read_ini_string(filename, "skin", "mainwinAboutY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
982 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
983 if (tmp != NULL) |
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 skin->properties.mainwin_about_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
986 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
987 } |
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 skin->properties.mainwin_shuffle_x = 164; |
2243 | 990 tmp = read_ini_string(filename, "skin", "mainwinShuffleX"); |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
991 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
992 if (tmp != NULL) |
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 skin->properties.mainwin_shuffle_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
995 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
996 } |
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 skin->properties.mainwin_shuffle_y = 89; |
2243 | 999 tmp = read_ini_string(filename, "skin", "mainwinShuffleY"); |
1804
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1000 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1001 if (tmp != NULL) |
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 skin->properties.mainwin_shuffle_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1004 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1005 } |
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 skin->properties.mainwin_repeat_x = 210; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1008 tmp = read_ini_string(filename, "skin", "mainwinRepeatX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1009 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1010 if (tmp != NULL) |
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 skin->properties.mainwin_repeat_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1013 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1014 } |
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 skin->properties.mainwin_repeat_y = 89; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1017 tmp = read_ini_string(filename, "skin", "mainwinRepeatY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1018 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1019 if (tmp != NULL) |
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 skin->properties.mainwin_repeat_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1022 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1023 } |
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 skin->properties.mainwin_eqbutton_x = 219; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1026 tmp = read_ini_string(filename, "skin", "mainwinEQButtonX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1027 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1028 if (tmp != NULL) |
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 skin->properties.mainwin_eqbutton_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1031 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1032 } |
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 skin->properties.mainwin_eqbutton_y = 58; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1035 tmp = read_ini_string(filename, "skin", "mainwinEQButtonY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1036 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1037 if (tmp != NULL) |
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 skin->properties.mainwin_eqbutton_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1040 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1041 } |
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 skin->properties.mainwin_plbutton_x = 242; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1044 tmp = read_ini_string(filename, "skin", "mainwinPLButtonX"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1045 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1046 if (tmp != NULL) |
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 skin->properties.mainwin_plbutton_x = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1049 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1050 } |
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 skin->properties.mainwin_plbutton_y = 58; |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1053 tmp = read_ini_string(filename, "skin", "mainwinPLButtonY"); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1054 |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1055 if (tmp != NULL) |
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 skin->properties.mainwin_plbutton_y = atoi(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1058 g_free(tmp); |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1059 } |
e0e46bce806e
[svn] - mainwinEQButtonX, mainwinEQButtonY, mainwinPLButtonX, mainwinPLButtonY, mainwinAboutX,
nenolod
parents:
1796
diff
changeset
|
1060 |
1836
a1089ea6f436
[svn] - implement textboxBitmapFontWidth and textboxBitmapFontHeight for defining the size of a cell in the textbox character grid
nenolod
parents:
1833
diff
changeset
|
1061 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
|
1062 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
|
1063 |
a1089ea6f436
[svn] - implement textboxBitmapFontWidth and textboxBitmapFontHeight for defining the size of a cell in the textbox character grid
nenolod
parents:
1833
diff
changeset
|
1064 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
|
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 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
|
1067 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
|
1068 } |
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 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
|
1071 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
|
1072 |
a1089ea6f436
[svn] - implement textboxBitmapFontWidth and textboxBitmapFontHeight for defining the size of a cell in the textbox character grid
nenolod
parents:
1833
diff
changeset
|
1073 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
|
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 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
|
1076 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
|
1077 } |
a1089ea6f436
[svn] - implement textboxBitmapFontWidth and textboxBitmapFontHeight for defining the size of a cell in the textbox character grid
nenolod
parents:
1833
diff
changeset
|
1078 |
1857
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1079 skin->properties.mainwin_minimize_x = 244; |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1080 tmp = read_ini_string(filename, "skin", "mainwinMinimizeX"); |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1081 |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1082 if (tmp != NULL) |
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 skin->properties.mainwin_minimize_x = atoi(tmp); |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1085 g_free(tmp); |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1086 } |
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 skin->properties.mainwin_minimize_y = 3; |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1089 tmp = read_ini_string(filename, "skin", "mainwinMinimizeY"); |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1090 |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1091 if (tmp != NULL) |
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 skin->properties.mainwin_minimize_y = atoi(tmp); |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1094 g_free(tmp); |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1095 } |
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 skin->properties.mainwin_shade_x = 254; |
2243 | 1098 tmp = read_ini_string(filename, "skin", "mainwinShadeX"); |
1857
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1099 |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1100 if (tmp != NULL) |
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 skin->properties.mainwin_shade_x = atoi(tmp); |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1103 g_free(tmp); |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1104 } |
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 skin->properties.mainwin_shade_y = 3; |
2243 | 1107 tmp = read_ini_string(filename, "skin", "mainwinShadeY"); |
1857
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1108 |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1109 if (tmp != NULL) |
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 skin->properties.mainwin_shade_y = atoi(tmp); |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1112 g_free(tmp); |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1113 } |
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 skin->properties.mainwin_close_x = 264; |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1116 tmp = read_ini_string(filename, "skin", "mainwinCloseX"); |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1117 |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1118 if (tmp != NULL) |
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 skin->properties.mainwin_close_x = atoi(tmp); |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1121 g_free(tmp); |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1122 } |
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 skin->properties.mainwin_close_y = 3; |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1125 tmp = read_ini_string(filename, "skin", "mainwinCloseY"); |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1126 |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1127 if (tmp != NULL) |
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 skin->properties.mainwin_close_y = atoi(tmp); |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1130 g_free(tmp); |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1131 } |
2ed05cc57194
[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY
nenolod
parents:
1850
diff
changeset
|
1132 |
1833 | 1133 if (filename != NULL) |
1134 g_free(filename); | |
1653 | 1135 } |
1136 | |
1137 static guint | |
1138 hex_chars_to_int(gchar hi, gchar lo) | |
1139 { | |
1140 /* | |
1141 * Converts a value in the range 0x00-0xFF | |
1142 * to a integer in the range 0-65535 | |
1143 */ | |
1144 gchar str[3]; | |
1145 | |
1146 str[0] = hi; | |
1147 str[1] = lo; | |
1148 str[2] = 0; | |
1149 | |
1150 return (CLAMP(strtol(str, NULL, 16), 0, 0xFF) << 8); | |
1151 } | |
1152 | |
1153 GdkColor * | |
1154 skin_load_color(const gchar * path, const gchar * file, | |
1155 const gchar * section, const gchar * key, | |
1156 gchar * default_hex) | |
1157 { | |
1158 gchar *filename, *value; | |
1159 GdkColor *color = NULL; | |
1160 | |
1161 filename = find_file_recursively(path, file); | |
1162 if (filename || default_hex) { | |
1163 if (filename) { | |
1164 value = read_ini_string(filename, section, key); | |
1165 if (value == NULL) { | |
1166 value = g_strdup(default_hex); | |
1167 } | |
1168 } else { | |
1169 value = g_strdup(default_hex); | |
1170 } | |
1171 if (value) { | |
1172 gchar *ptr = value; | |
1173 gint len; | |
1174 | |
1175 color = g_new0(GdkColor, 1); | |
1176 g_strstrip(value); | |
1177 | |
1178 if (value[0] == '#') | |
1179 ptr++; | |
1180 len = strlen(ptr); | |
1181 /* | |
1182 * The handling of incomplete values is done this way | |
1183 * to maximize winamp compatibility | |
1184 */ | |
1185 if (len >= 6) { | |
1186 color->red = hex_chars_to_int(*ptr, *(ptr + 1)); | |
1187 ptr += 2; | |
1188 } | |
1189 if (len >= 4) { | |
1190 color->green = hex_chars_to_int(*ptr, *(ptr + 1)); | |
1191 ptr += 2; | |
1192 } | |
1193 if (len >= 2) | |
1194 color->blue = hex_chars_to_int(*ptr, *(ptr + 1)); | |
1195 | |
2164
9d38094655df
[svn] - fix the positioning of an assertion to a place where it would actually
nenolod
parents:
2163
diff
changeset
|
1196 gdk_colormap_alloc_color(gdk_drawable_get_colormap(playlistwin->window), |
9d38094655df
[svn] - fix the positioning of an assertion to a place where it would actually
nenolod
parents:
2163
diff
changeset
|
1197 color, TRUE, TRUE); |
1653 | 1198 g_free(value); |
1199 } | |
1200 if (filename) | |
1201 g_free(filename); | |
1202 } | |
1203 return color; | |
1204 } | |
1205 | |
1206 | |
1207 | |
1208 GdkBitmap * | |
1209 skin_create_transparent_mask(const gchar * path, | |
1210 const gchar * file, | |
1211 const gchar * section, | |
1212 GdkWindow * window, | |
1213 gint width, | |
1938 | 1214 gint height, gboolean doublesize) |
1653 | 1215 { |
1216 GdkBitmap *mask = NULL; | |
1217 GdkGC *gc = NULL; | |
1218 GdkColor pattern; | |
1219 GdkPoint *gpoints; | |
1220 | |
1221 gchar *filename = NULL; | |
1222 gboolean created_mask = FALSE; | |
1223 GArray *num, *point; | |
1224 guint i, j; | |
1225 gint k; | |
1226 | |
1227 if (path) | |
1228 filename = find_file_recursively(path, file); | |
1229 | |
1230 /* filename will be null if path wasn't set */ | |
1231 if (!filename) { | |
1232 return create_default_mask(window, width, height); | |
1233 } | |
1234 | |
1235 if ((num = read_ini_array(filename, section, "NumPoints")) == NULL) { | |
1236 g_free(filename); | |
1237 return NULL; | |
1238 } | |
1239 | |
1240 if ((point = read_ini_array(filename, section, "PointList")) == NULL) { | |
1241 g_array_free(num, TRUE); | |
1242 g_free(filename); | |
1243 return NULL; | |
1244 } | |
1245 | |
1246 mask = gdk_pixmap_new(window, width, height, 1); | |
1247 gc = gdk_gc_new(mask); | |
1248 | |
1249 pattern.pixel = 0; | |
1250 gdk_gc_set_foreground(gc, &pattern); | |
1251 gdk_draw_rectangle(mask, gc, TRUE, 0, 0, width, height); | |
1252 pattern.pixel = 1; | |
1253 gdk_gc_set_foreground(gc, &pattern); | |
1254 | |
1255 j = 0; | |
1256 for (i = 0; i < num->len; i++) { | |
1257 if ((int)(point->len - j) >= (g_array_index(num, gint, i) * 2)) { | |
1258 created_mask = TRUE; | |
1259 gpoints = g_new(GdkPoint, g_array_index(num, gint, i)); | |
1260 for (k = 0; k < g_array_index(num, gint, i); k++) { | |
1938 | 1261 gpoints[k].x = |
1262 g_array_index(point, gint, j + k * 2) * (1 + doublesize); | |
1263 gpoints[k].y = | |
1264 g_array_index(point, gint, | |
1265 j + k * 2 + 1) * (1 + doublesize); | |
1653 | 1266 } |
1267 j += k * 2; | |
1268 gdk_draw_polygon(mask, gc, TRUE, gpoints, | |
1269 g_array_index(num, gint, i)); | |
1270 g_free(gpoints); | |
1271 } | |
1272 } | |
1273 g_array_free(num, TRUE); | |
1274 g_array_free(point, TRUE); | |
1275 g_free(filename); | |
1276 | |
1277 if (!created_mask) | |
1278 gdk_draw_rectangle(mask, gc, TRUE, 0, 0, width, height); | |
1279 | |
2163 | 1280 g_object_unref(gc); |
1653 | 1281 |
1282 return mask; | |
1283 } | |
1284 | |
1285 void | |
1286 skin_load_viscolor(Skin * skin, const gchar * path, const gchar * basename) | |
1287 { | |
1670 | 1288 VFSFile *file; |
1653 | 1289 gint i, c; |
1290 gchar line[256], *filename; | |
1291 GArray *a; | |
1292 | |
1293 g_return_if_fail(skin != NULL); | |
1294 g_return_if_fail(path != NULL); | |
1295 g_return_if_fail(basename != NULL); | |
1296 | |
1297 skin_set_default_vis_color(skin); | |
1298 | |
1299 filename = find_file_recursively(path, basename); | |
1300 if (!filename) | |
1301 return; | |
1302 | |
1670 | 1303 if (!(file = vfs_fopen(filename, "r"))) { |
1653 | 1304 g_free(filename); |
1305 return; | |
1306 } | |
1307 | |
1308 g_free(filename); | |
1309 | |
1310 for (i = 0; i < 24; i++) { | |
1670 | 1311 if (vfs_fgets(line, 255, file)) { |
1653 | 1312 a = string_to_garray(line); |
1313 if (a->len > 2) { | |
1314 for (c = 0; c < 3; c++) | |
1315 skin->vis_color[i][c] = g_array_index(a, gint, c); | |
1316 } | |
1317 g_array_free(a, TRUE); | |
1318 } | |
1319 else | |
1320 break; | |
1321 } | |
1322 | |
1670 | 1323 vfs_fclose(file); |
1653 | 1324 } |
1325 | |
1326 #if 0 | |
1327 static void | |
1328 skin_numbers_generate_dash(Skin * skin) | |
1329 { | |
1330 GdkGC *gc; | |
1331 GdkPixmap *pixmap; | |
1332 SkinPixmap *numbers; | |
1333 | |
1334 g_return_if_fail(skin != NULL); | |
1335 | |
1336 numbers = &skin->pixmaps[SKIN_NUMBERS]; | |
1337 if (!numbers->pixmap || numbers->current_width < 99) | |
1338 return; | |
1339 | |
1340 gc = gdk_gc_new(numbers->pixmap); | |
1341 pixmap = gdk_pixmap_new(mainwin->window, 108, | |
1342 numbers->current_height, | |
1343 -1); | |
1344 | |
1345 skin_draw_pixmap(skin, pixmap, gc, SKIN_NUMBERS, 0, 0, 0, 0, 99, 13); | |
1346 skin_draw_pixmap(skin, pixmap, gc, SKIN_NUMBERS, 90, 0, 99, 0, 9, 13); | |
1347 skin_draw_pixmap(skin, pixmap, gc, SKIN_NUMBERS, 20, 6, 101, 6, 5, 1); | |
1348 | |
1349 g_object_unref(numbers->pixmap); | |
1350 g_object_unref(gc); | |
1351 | |
1352 numbers->pixmap = pixmap; | |
1353 numbers->current_width = 108; | |
1354 } | |
1355 #endif | |
1356 | |
1357 static void | |
1358 skin_load_cursor(Skin * skin, const gchar * dirname) | |
1359 { | |
1360 const gchar * basename = "normal.cur"; | |
1361 gchar * filename = NULL; | |
1362 GdkPixbuf * cursor_pixbuf = NULL; | |
1363 GdkPixbufAnimation * cursor_animated = NULL; | |
1364 GdkCursor * cursor_gdk = NULL; | |
1365 GError * error = NULL; | |
1366 | |
1367 filename = find_file_recursively(dirname, basename); | |
1368 | |
1369 if (filename && cfg.custom_cursors) { | |
1370 cursor_animated = gdk_pixbuf_animation_new_from_file(filename, &error); | |
1371 cursor_pixbuf = gdk_pixbuf_animation_get_static_image(cursor_animated); | |
1372 cursor_gdk = gdk_cursor_new_from_pixbuf(gdk_display_get_default(), | |
1373 cursor_pixbuf, 0, 0); | |
1374 } else { | |
1375 cursor_gdk = gdk_cursor_new(GDK_LEFT_PTR); | |
1376 } | |
1377 | |
1378 gdk_window_set_cursor(mainwin->window, cursor_gdk); | |
1379 gdk_window_set_cursor(playlistwin->window, cursor_gdk); | |
1380 gdk_window_set_cursor(equalizerwin->window, cursor_gdk); | |
1381 gdk_cursor_unref(cursor_gdk); | |
1382 } | |
1383 | |
1384 static void | |
1385 skin_load_pixmaps(Skin * skin, const gchar * path) | |
1386 { | |
1387 GdkPixmap *text_pm; | |
1388 guint i; | |
1389 | |
1390 for (i = 0; i < SKIN_PIXMAP_COUNT; i++) | |
1391 skin_load_pixmap_id(skin, i, path); | |
1392 | |
1393 text_pm = skin->pixmaps[SKIN_TEXT].pixmap; | |
1394 | |
1395 if (text_pm) | |
1396 skin_get_textcolors(text_pm, skin->textbg, skin->textfg); | |
1397 | |
1398 #if 0 | |
1399 if (skin->pixmaps[SKIN_NUMBERS].pixmap) | |
1400 skin_numbers_generate_dash(skin); | |
1401 #endif | |
1402 | |
1403 skin->colors[SKIN_PLEDIT_NORMAL] = | |
1404 skin_load_color(path, "pledit.txt", "text", "normal", "#2499ff"); | |
1405 skin->colors[SKIN_PLEDIT_CURRENT] = | |
1406 skin_load_color(path, "pledit.txt", "text", "current", "#ffeeff"); | |
1407 skin->colors[SKIN_PLEDIT_NORMALBG] = | |
1408 skin_load_color(path, "pledit.txt", "text", "normalbg", "#0a120a"); | |
1409 skin->colors[SKIN_PLEDIT_SELECTEDBG] = | |
1410 skin_load_color(path, "pledit.txt", "text", "selectedbg", "#0a124a"); | |
1411 | |
1412 skin_mask_create(skin, path, SKIN_MASK_MAIN, mainwin->window); | |
1413 skin_mask_create(skin, path, SKIN_MASK_MAIN_SHADE, mainwin->window); | |
1414 | |
1415 skin_mask_create(skin, path, SKIN_MASK_EQ, equalizerwin->window); | |
1416 skin_mask_create(skin, path, SKIN_MASK_EQ_SHADE, equalizerwin->window); | |
1417 | |
1418 skin_load_viscolor(skin, path, "viscolor.txt"); | |
1419 } | |
1420 | |
1421 static gboolean | |
1422 skin_load_nolock(Skin * skin, const gchar * path, gboolean force) | |
1423 { | |
1424 gchar *cpath; | |
1425 | |
1426 g_return_val_if_fail(skin != NULL, FALSE); | |
1427 g_return_val_if_fail(path != NULL, FALSE); | |
1428 REQUIRE_LOCK(skin->lock); | |
1429 | |
1430 if (!g_file_test(path, G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_DIR)) | |
1431 return FALSE; | |
1432 | |
1433 if (!force) { | |
1434 if (skin->path) | |
1435 if (!strcmp(skin->path, path)) | |
1436 return FALSE; | |
1437 } | |
1438 | |
1439 skin_current_num++; | |
1440 | |
1441 skin->path = g_strdup(path); | |
1442 | |
1443 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
|
1444 /* 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
|
1445 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
|
1446 |
1653 | 1447 skin_load_pixmaps(skin, path); |
1448 skin_load_cursor(skin, path); | |
1449 | |
1450 return TRUE; | |
1451 } | |
1452 | |
1453 if (!(cpath = archive_decompress(path))) { | |
1454 g_message("Unable to extract skin archive (%s)", path); | |
1455 return FALSE; | |
1456 } | |
1457 | |
1811
a6a248bfafc3
[svn] - create the windows during skin load process after the skin.hints has been loaded
nenolod
parents:
1804
diff
changeset
|
1458 /* 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
|
1459 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
|
1460 |
1653 | 1461 skin_load_pixmaps(skin, cpath); |
1462 skin_load_cursor(skin, cpath); | |
1463 | |
1464 del_directory(cpath); | |
1465 g_free(cpath); | |
1466 | |
1467 return TRUE; | |
1468 } | |
1469 | |
1470 void | |
1471 skin_install_skin(const gchar * path) | |
1472 { | |
1473 gchar *command; | |
1474 | |
1475 g_return_if_fail(path != NULL); | |
1476 | |
1477 command = g_strdup_printf("cp %s %s", path, bmp_paths[BMP_PATH_USER_SKIN_DIR]); | |
1478 if (system(command)) { | |
1479 g_message("Unable to install skin (%s) into user directory (%s)", | |
1480 path, bmp_paths[BMP_PATH_USER_SKIN_DIR]); | |
1481 } | |
1482 g_free(command); | |
1483 } | |
1484 | |
1485 | |
1486 gboolean | |
1487 skin_load(Skin * skin, const gchar * path) | |
1488 { | |
1489 gboolean error; | |
1490 | |
1491 g_return_val_if_fail(skin != NULL, FALSE); | |
1492 | |
1493 if (!path) | |
1494 return FALSE; | |
1495 | |
1496 skin_lock(skin); | |
1497 error = skin_load_nolock(skin, path, FALSE); | |
1498 skin_unlock(skin); | |
1499 | |
1500 return error; | |
1501 } | |
1502 | |
1503 gboolean | |
1504 skin_reload_forced(void) | |
1505 { | |
1506 gboolean error; | |
1507 | |
1508 skin_lock(bmp_active_skin); | |
1509 error = skin_load_nolock(bmp_active_skin, bmp_active_skin->path, TRUE); | |
1510 skin_unlock(bmp_active_skin); | |
1511 | |
1512 return error; | |
1513 } | |
1514 | |
1515 void | |
1516 skin_reload(Skin * skin) | |
1517 { | |
1518 g_return_if_fail(skin != NULL); | |
1519 skin_load_nolock(skin, skin->path, TRUE); | |
1520 } | |
1521 | |
1522 | |
1523 static SkinPixmap * | |
1524 skin_get_pixmap(Skin * skin, SkinPixmapId map_id) | |
1525 { | |
1526 g_return_val_if_fail(skin != NULL, NULL); | |
1527 g_return_val_if_fail(map_id < SKIN_PIXMAP_COUNT, NULL); | |
1528 | |
1529 return &skin->pixmaps[map_id]; | |
1530 } | |
1531 | |
1532 GdkBitmap * | |
1533 skin_get_mask(Skin * skin, SkinMaskId mi) | |
1534 { | |
1938 | 1535 GdkBitmap **masks; |
1536 | |
1653 | 1537 g_return_val_if_fail(skin != NULL, NULL); |
1538 g_return_val_if_fail(mi < SKIN_PIXMAP_COUNT, NULL); | |
1539 | |
1938 | 1540 masks = cfg.doublesize ? skin->ds_masks : skin->masks; |
1541 return masks[mi]; | |
1653 | 1542 } |
1543 | |
1544 GdkColor * | |
1545 skin_get_color(Skin * skin, SkinColorId color_id) | |
1546 { | |
1547 GdkColor *ret = NULL; | |
1548 | |
1549 g_return_val_if_fail(skin != NULL, NULL); | |
1550 | |
1551 switch (color_id) { | |
1552 case SKIN_TEXTBG: | |
1553 if (skin->pixmaps[SKIN_TEXT].pixmap) | |
1554 ret = skin->textbg; | |
1555 else | |
1556 ret = skin->def_textbg; | |
1557 break; | |
1558 case SKIN_TEXTFG: | |
1559 if (skin->pixmaps[SKIN_TEXT].pixmap) | |
1560 ret = skin->textfg; | |
1561 else | |
1562 ret = skin->def_textfg; | |
1563 break; | |
1564 default: | |
1565 if (color_id < SKIN_COLOR_COUNT) | |
1566 ret = skin->colors[color_id]; | |
1567 break; | |
1568 } | |
1569 return ret; | |
1570 } | |
1571 | |
1572 void | |
1573 skin_get_viscolor(Skin * skin, guchar vis_color[24][3]) | |
1574 { | |
1575 gint i; | |
1576 | |
1577 g_return_if_fail(skin != NULL); | |
1578 | |
1579 for (i = 0; i < 24; i++) { | |
1580 vis_color[i][0] = skin->vis_color[i][0]; | |
1581 vis_color[i][1] = skin->vis_color[i][1]; | |
1582 vis_color[i][2] = skin->vis_color[i][2]; | |
1583 } | |
1584 } | |
1585 | |
1586 gint | |
1587 skin_get_id(void) | |
1588 { | |
1589 return skin_current_num; | |
1590 } | |
1591 | |
1592 void | |
1593 skin_draw_pixmap(Skin * skin, GdkDrawable * drawable, GdkGC * gc, | |
1594 SkinPixmapId pixmap_id, | |
1595 gint xsrc, gint ysrc, gint xdest, gint ydest, | |
1596 gint width, gint height) | |
1597 { | |
1598 SkinPixmap *pixmap; | |
1599 | |
1600 g_return_if_fail(skin != NULL); | |
1601 | |
1602 pixmap = skin_get_pixmap(skin, pixmap_id); | |
1603 g_return_if_fail(pixmap != NULL); | |
1604 g_return_if_fail(pixmap->pixmap != NULL); | |
1605 | |
1606 if (xsrc > pixmap->width || ysrc > pixmap->height) | |
1607 return; | |
1608 | |
1609 width = MIN(width, pixmap->width - xsrc); | |
1610 height = MIN(height, pixmap->height - ysrc); | |
2162
48c8ecbfb282
[svn] - remove deprecated symbol warnings for gdk_draw_pixmap
nenolod
parents:
2148
diff
changeset
|
1611 gdk_draw_drawable(drawable, gc, pixmap->pixmap, xsrc, ysrc, |
48c8ecbfb282
[svn] - remove deprecated symbol warnings for gdk_draw_pixmap
nenolod
parents:
2148
diff
changeset
|
1612 xdest, ydest, width, height); |
1653 | 1613 } |
1614 | |
1615 void | |
1616 skin_get_eq_spline_colors(Skin * skin, guint32 colors[19]) | |
1617 { | |
1618 gint i; | |
1619 GdkPixmap *pixmap; | |
1620 GdkImage *img; | |
1621 SkinPixmap *eqmainpm; | |
1622 | |
1623 g_return_if_fail(skin != NULL); | |
1624 | |
1625 eqmainpm = &skin->pixmaps[SKIN_EQMAIN]; | |
1626 if (eqmainpm->pixmap && | |
1627 eqmainpm->current_width >= 116 && eqmainpm->current_height >= 313) | |
1628 pixmap = eqmainpm->pixmap; | |
1629 else | |
1630 return; | |
1631 | |
1632 if (!GDK_IS_DRAWABLE(pixmap)) | |
1633 return; | |
1634 | |
1635 if (!(img = gdk_drawable_get_image(pixmap, 115, 294, 1, 19))) | |
1636 return; | |
1637 | |
1638 for (i = 0; i < 19; i++) | |
1639 colors[i] = gdk_image_get_pixel(img, 0, i); | |
1640 | |
2163 | 1641 g_object_unref(img); |
1653 | 1642 } |
1643 | |
1644 | |
1645 static void | |
1646 skin_draw_playlistwin_frame_top(Skin * skin, | |
1647 GdkDrawable * drawable, | |
1648 GdkGC * gc, | |
1649 gint width, gint height, gboolean focus) | |
1650 { | |
1651 /* The title bar skin consists of 2 sets of 4 images, 1 set | |
1652 * for focused state and the other for unfocused. The 4 images | |
1653 * are: | |
1654 * | |
1655 * a. right corner (25,20) | |
1656 * b. left corner (25,20) | |
1657 * c. tiler (25,20) | |
1658 * d. title (100,20) | |
1659 * | |
1660 * min allowed width = 100+25+25 = 150 | |
1661 */ | |
1662 | |
1663 gint i, y, c; | |
1664 | |
1665 /* get y offset of the pixmap set to use */ | |
1666 if (focus) | |
1667 y = 0; | |
1668 else | |
1669 y = 21; | |
1670 | |
1671 /* left corner */ | |
1672 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 0, y, 0, 0, 25, 20); | |
1673 | |
1674 /* titlebar title */ | |
1675 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 26, y, | |
1676 (width - 100) / 2, 0, 100, 20); | |
1677 | |
1678 /* titlebar right corner */ | |
1679 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 153, y, | |
1680 width - 25, 0, 25, 20); | |
1681 | |
1682 /* tile draw the remaining frame */ | |
1683 | |
1684 /* compute tile count */ | |
1685 c = (width - (100 + 25 + 25)) / 25; | |
1686 | |
1687 for (i = 0; i < c / 2; i++) { | |
1688 /* left of title */ | |
1689 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y, | |
1690 25 + i * 25, 0, 25, 20); | |
1691 | |
1692 /* right of title */ | |
1693 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y, | |
1694 (width + 100) / 2 + i * 25, 0, 25, 20); | |
1695 } | |
1696 | |
1697 if (c & 1) { | |
1698 /* Odd tile count, so one remaining to draw. Here we split | |
1699 * it into two and draw half on either side of the title */ | |
1700 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y, | |
1701 ((c / 2) * 25) + 25, 0, 12, 20); | |
1702 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y, | |
1703 (width / 2) + ((c / 2) * 25) + 50, 0, 13, 20); | |
1704 } | |
1705 } | |
1706 | |
1707 static void | |
1708 skin_draw_playlistwin_frame_bottom(Skin * skin, | |
1709 GdkDrawable * drawable, | |
1710 GdkGC * gc, | |
1711 gint width, gint height, gboolean focus) | |
1712 { | |
1713 /* The bottom frame skin consists of 1 set of 4 images. The 4 | |
1714 * images are: | |
1715 * | |
1716 * a. left corner with menu buttons (125,38) | |
1717 * b. visualization window (75,38) | |
1718 * c. right corner with play buttons (150,38) | |
1719 * d. frame tile (25,38) | |
1720 * | |
1721 * (min allowed width = 125+150+25=300 | |
1722 */ | |
1723 | |
1724 gint i, c; | |
1725 | |
1726 /* bottom left corner (menu buttons) */ | |
1727 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 0, 72, | |
1728 0, height - 38, 125, 38); | |
1729 | |
1730 c = (width - 275) / 25; | |
1731 | |
1732 /* draw visualization window, if width allows */ | |
1733 if (c >= 3) { | |
1734 c -= 3; | |
1735 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 205, 0, | |
1736 width - (150 + 75), height - 38, 75, 38); | |
1737 } | |
1738 | |
1739 /* Bottom right corner (playbuttons etc) */ | |
1740 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, | |
1741 126, 72, width - 150, height - 38, 150, 38); | |
1742 | |
1743 /* Tile draw the remaining undrawn portions */ | |
1744 for (i = 0; i < c; i++) | |
1745 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 179, 0, | |
1746 125 + i * 25, height - 38, 25, 38); | |
1747 } | |
1748 | |
1749 static void | |
1750 skin_draw_playlistwin_frame_sides(Skin * skin, | |
1751 GdkDrawable * drawable, | |
1752 GdkGC * gc, | |
1753 gint width, gint height, gboolean focus) | |
1754 { | |
1755 /* The side frames consist of 2 tile images. 1 for the left, 1 for | |
1756 * the right. | |
1757 * a. left (12,29) | |
1758 * b. right (19,29) | |
1759 */ | |
1760 | |
1761 gint i; | |
1762 | |
1763 /* frame sides */ | |
1764 for (i = 0; i < (height - (20 + 38)) / 29; i++) { | |
1765 /* left */ | |
1766 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 0, 42, | |
1767 0, 20 + i * 29, 12, 29); | |
1768 | |
1769 /* right */ | |
1770 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 32, 42, | |
1771 width - 19, 20 + i * 29, 19, 29); | |
1772 } | |
1773 } | |
1774 | |
1775 | |
1776 void | |
1777 skin_draw_playlistwin_frame(Skin * skin, | |
1778 GdkDrawable * drawable, GdkGC * gc, | |
1779 gint width, gint height, gboolean focus) | |
1780 { | |
1781 skin_draw_playlistwin_frame_top(skin, drawable, gc, width, height, focus); | |
1782 skin_draw_playlistwin_frame_bottom(skin, drawable, gc, width, height, | |
1783 focus); | |
1784 skin_draw_playlistwin_frame_sides(skin, drawable, gc, width, height, | |
1785 focus); | |
1786 } | |
1787 | |
1788 | |
1789 void | |
1790 skin_draw_playlistwin_shaded(Skin * skin, | |
1791 GdkDrawable * drawable, GdkGC * gc, | |
1792 gint width, gboolean focus) | |
1793 { | |
1794 /* The shade mode titlebar skin consists of 4 images: | |
1795 * a) left corner offset (72,42) size (25,14) | |
1796 * b) right corner, focused offset (99,57) size (50,14) | |
1797 * c) right corner, unfocused offset (99,42) size (50,14) | |
1798 * d) bar tile offset (72,57) size (25,14) | |
1799 */ | |
1800 | |
1801 gint i; | |
1802 | |
1803 /* left corner */ | |
1804 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 72, 42, 0, 0, 25, 14); | |
1805 | |
1806 /* bar tile */ | |
1807 for (i = 0; i < (width - 75) / 25; i++) | |
1808 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 72, 57, | |
1809 (i * 25) + 25, 0, 25, 14); | |
1810 | |
1811 /* right corner */ | |
2016
917903e2fc1c
[svn] - fix a bug regarding shaded mode in the playlist editor where
nenolod
parents:
1938
diff
changeset
|
1812 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 99, focus ? 42 : 57, |
1653 | 1813 width - 50, 0, 50, 14); |
1814 } | |
1815 | |
1816 | |
1817 void | |
1818 skin_draw_mainwin_titlebar(Skin * skin, | |
1819 GdkDrawable * drawable, GdkGC * gc, | |
1820 gboolean shaded, gboolean focus) | |
1821 { | |
1822 /* The titlebar skin consists of 2 sets of 2 images, one for for | |
1823 * shaded and the other for unshaded mode, giving a total of 4. | |
1824 * The images are exactly 275x14 pixels, aligned and arranged | |
1825 * vertically on each other in the pixmap in the following order: | |
1826 * | |
1827 * a) unshaded, focused offset (27, 0) | |
1828 * b) unshaded, unfocused offset (27, 15) | |
1829 * c) shaded, focused offset (27, 29) | |
1830 * d) shaded, unfocused offset (27, 42) | |
1831 */ | |
1832 | |
1833 gint y_offset; | |
1834 | |
1835 if (shaded) { | |
1836 if (focus) | |
1837 y_offset = 29; | |
1838 else | |
1839 y_offset = 42; | |
1840 } | |
1841 else { | |
1842 if (focus) | |
1843 y_offset = 0; | |
1844 else | |
1845 y_offset = 15; | |
1846 } | |
1847 | |
1848 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
|
1849 0, 0, bmp_active_skin->properties.mainwin_width, MAINWIN_TITLEBAR_HEIGHT); |
1653 | 1850 } |