annotate audacious/widgets/skin.c @ 1857:2ed05cc57194 trunk

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