annotate src/audacious/ui_skin.c @ 4541:d8920be7275a

set default scale_factor to 2.0, custom scale factor can be manually specified in config file anyway; use GDK_INTERP_NEAREST and GDK_RGB_DITHER_NONE when drawing scaled widgets
author Tomasz Mon <desowin@gmail.com>
date Mon, 12 May 2008 00:13:38 +0200
parents 246244ead30e
children d09dd0960a6a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4508
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1 /* Audacious
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2 * Copyright (C) 2005-2007 Audacious development team.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
3 *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
4 * BMP - Cross-platform multimedia player
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
5 * Copyright (C) 2003-2004 BMP development team.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
6 *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
7 * Based on XMMS:
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
8 * Copyright (C) 1998-2003 XMMS development team.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
9 *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
12 * the Free Software Foundation; under version 3 of the License.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
13 *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
17 * GNU General Public License for more details.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
18 *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
20 * along with this program. If not, see <http://www.gnu.org/licenses>.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
21 *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
22 * The Audacious team does not consider modular code linking to
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
23 * Audacious or using our public API to be a derived work.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
24 */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
25
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
26 /*#define AUD_DEBUG*/
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
27 #ifdef HAVE_CONFIG_H
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
28 # include "config.h"
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
29 #endif
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
30
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
31 /* TODO: enforce default sizes! */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
32
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
33 #include <glib.h>
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
34 #include <stdio.h>
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
35 #include <stdlib.h>
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
36 #include <string.h>
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
37 #include <ctype.h>
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
38
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
39 #include "ui_skin.h"
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
40 #include "ui_equalizer.h"
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
41 #include "main.h"
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
42 #include "ui_playlist.h"
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
43 #include "ui_skinselector.h"
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
44 #include "util.h"
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
45
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
46 #include "debug.h"
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
47
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
48 #include "platform/smartinclude.h"
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
49 #include "vfs.h"
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
50
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
51 #include "ui_skinned_window.h"
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
52 #include "ui_skinned_button.h"
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
53 #include "ui_skinned_number.h"
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
54 #include "ui_skinned_horizontal_slider.h"
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
55 #include "ui_skinned_playstatus.h"
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
56
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
57 #define EXTENSION_TARGETS 7
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
58
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
59 static gchar *ext_targets[EXTENSION_TARGETS] =
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
60 { "bmp", "xpm", "png", "svg", "gif", "jpg", "jpeg" };
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
61
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
62 struct _SkinPixmapIdMapping {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
63 SkinPixmapId id;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
64 const gchar *name;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
65 const gchar *alt_name;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
66 gint width, height;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
67 };
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
68
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
69 struct _SkinMaskInfo {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
70 gint width, height;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
71 gchar *inistr;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
72 };
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
73
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
74 typedef struct _SkinPixmapIdMapping SkinPixmapIdMapping;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
75 typedef struct _SkinMaskInfo SkinMaskInfo;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
76
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
77
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
78 Skin *aud_active_skin = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
79
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
80 static gint skin_current_num;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
81
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
82 static SkinMaskInfo skin_mask_info[] = {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
83 {275, 116, "Normal"},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
84 {275, 16, "WindowShade"},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
85 {275, 116, "Equalizer"},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
86 {275, 16, "EqualizerWS"}
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
87 };
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
88
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
89 static SkinPixmapIdMapping skin_pixmap_id_map[] = {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
90 {SKIN_MAIN, "main", NULL, 0, 0},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
91 {SKIN_CBUTTONS, "cbuttons", NULL, 0, 0},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
92 {SKIN_SHUFREP, "shufrep", NULL, 0, 0},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
93 {SKIN_TEXT, "text", NULL, 0, 0},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
94 {SKIN_TITLEBAR, "titlebar", NULL, 0, 0},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
95 {SKIN_VOLUME, "volume", NULL, 0, 0},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
96 {SKIN_BALANCE, "balance", "volume", 0, 0},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
97 {SKIN_MONOSTEREO, "monoster", NULL, 0, 0},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
98 {SKIN_PLAYPAUSE, "playpaus", NULL, 0, 0},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
99 {SKIN_NUMBERS, "nums_ex", "numbers", 0, 0},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
100 {SKIN_POSBAR, "posbar", NULL, 0, 0},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
101 {SKIN_EQMAIN, "eqmain", NULL, 0, 0},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
102 {SKIN_PLEDIT, "pledit", NULL, 0, 0},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
103 {SKIN_EQ_EX, "eq_ex", NULL, 0, 0}
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
104 };
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
105
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
106 static guint skin_pixmap_id_map_size = G_N_ELEMENTS(skin_pixmap_id_map);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
107
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
108 static const guchar skin_default_viscolor[24][3] = {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
109 {9, 34, 53},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
110 {10, 18, 26},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
111 {0, 54, 108},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
112 {0, 58, 116},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
113 {0, 62, 124},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
114 {0, 66, 132},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
115 {0, 70, 140},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
116 {0, 74, 148},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
117 {0, 78, 156},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
118 {0, 82, 164},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
119 {0, 86, 172},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
120 {0, 92, 184},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
121 {0, 98, 196},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
122 {0, 104, 208},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
123 {0, 110, 220},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
124 {0, 116, 232},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
125 {0, 122, 244},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
126 {0, 128, 255},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
127 {0, 128, 255},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
128 {0, 104, 208},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
129 {0, 80, 160},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
130 {0, 56, 112},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
131 {0, 32, 64},
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
132 {200, 200, 200}
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
133 };
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
134
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
135 static gchar *original_gtk_theme = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
136
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
137 static GdkBitmap *skin_create_transparent_mask(const gchar *,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
138 const gchar *,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
139 const gchar *,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
140 GdkWindow *,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
141 gint, gint, gboolean);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
142
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
143 static void skin_set_default_vis_color(Skin * skin);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
144
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
145 void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
146 skin_lock(Skin * skin)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
147 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
148 g_mutex_lock(skin->lock);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
149 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
150
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
151 void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
152 skin_unlock(Skin * skin)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
153 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
154 g_mutex_unlock(skin->lock);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
155 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
156
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
157 gboolean
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
158 aud_active_skin_reload(void)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
159 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
160 AUDDBG("\n");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
161 return aud_active_skin_load(aud_active_skin->path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
162 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
163
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
164 gboolean
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
165 aud_active_skin_load(const gchar * path)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
166 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
167 AUDDBG("%s\n", path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
168 g_return_val_if_fail(aud_active_skin != NULL, FALSE);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
169
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
170 if (!skin_load(aud_active_skin, path)) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
171 AUDDBG("loading failed\n");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
172 return FALSE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
173 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
174
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
175 ui_skinned_window_draw_all(mainwin);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
176 ui_skinned_window_draw_all(equalizerwin);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
177 ui_skinned_window_draw_all(playlistwin);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
178
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
179 playlistwin_update_list(playlist_get_active());
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
180
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
181 SkinPixmap *pixmap;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
182 pixmap = &aud_active_skin->pixmaps[SKIN_POSBAR];
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
183 /* last 59 pixels of SKIN_POSBAR are knobs (normal and selected) */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
184 gtk_widget_set_size_request(mainwin_position, pixmap->width - 59, pixmap->height);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
185
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
186 return TRUE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
187 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
188
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
189 void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
190 skin_pixmap_free(SkinPixmap * p)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
191 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
192 g_return_if_fail(p != NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
193 g_return_if_fail(p->pixbuf != NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
194
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
195 g_object_unref(p->pixbuf);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
196 p->pixbuf = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
197 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
198
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
199 Skin *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
200 skin_new(void)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
201 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
202 Skin *skin;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
203 skin = g_new0(Skin, 1);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
204 skin->lock = g_mutex_new();
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
205 return skin;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
206 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
207
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
208 /**
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
209 * Frees the data associated for skin.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
210 *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
211 * Does not free skin itself or lock variable so that the skin can immediately
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
212 * populated with new skin data if needed.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
213 */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
214 void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
215 skin_free(Skin * skin)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
216 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
217 gint i;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
218
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
219 g_return_if_fail(skin != NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
220
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
221 for (i = 0; i < SKIN_PIXMAP_COUNT; i++)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
222 skin_pixmap_free(&skin->pixmaps[i]);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
223
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
224 for (i = 0; i < SKIN_MASK_COUNT; i++) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
225 if (skin->masks[i])
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
226 g_object_unref(skin->masks[i]);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
227 if (skin->scaled_masks[i])
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
228 g_object_unref(skin->scaled_masks[i]);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
229
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
230 skin->masks[i] = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
231 skin->scaled_masks[i] = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
232 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
233
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
234 for (i = 0; i < SKIN_COLOR_COUNT; i++) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
235 if (skin->colors[i])
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
236 g_free(skin->colors[i]);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
237
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
238 skin->colors[i] = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
239 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
240
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
241 g_free(skin->path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
242 skin->path = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
243
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
244 skin_set_default_vis_color(skin);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
245 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
246
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
247 void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
248 skin_destroy(Skin * skin)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
249 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
250 g_return_if_fail(skin != NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
251 skin_free(skin);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
252 g_mutex_free(skin->lock);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
253 g_free(skin);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
254 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
255
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
256 const SkinPixmapIdMapping *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
257 skin_pixmap_id_lookup(guint id)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
258 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
259 guint i;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
260
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
261 for (i = 0; i < skin_pixmap_id_map_size; i++) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
262 if (id == skin_pixmap_id_map[i].id) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
263 return &skin_pixmap_id_map[i];
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
264 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
265 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
266
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
267 return NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
268 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
269
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
270 const gchar *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
271 skin_pixmap_id_to_name(SkinPixmapId id)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
272 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
273 guint i;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
274
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
275 for (i = 0; i < skin_pixmap_id_map_size; i++) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
276 if (id == skin_pixmap_id_map[i].id)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
277 return skin_pixmap_id_map[i].name;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
278 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
279 return NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
280 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
281
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
282 static void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
283 skin_set_default_vis_color(Skin * skin)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
284 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
285 memcpy(skin->vis_color, skin_default_viscolor,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
286 sizeof(skin_default_viscolor));
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
287 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
288
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
289 /*
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
290 * I have rewritten this to take an array of possible targets,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
291 * once we find a matching target we now return, instead of loop
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
292 * recursively. This allows for us to support many possible format
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
293 * targets for our skinning engine than just the original winamp
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
294 * formats.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
295 *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
296 * -- nenolod, 16 January 2006
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
297 */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
298 gchar *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
299 skin_pixmap_locate(const gchar * dirname, gchar ** basenames)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
300 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
301 gchar *filename;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
302 gint i;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
303
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
304 for (i = 0; basenames[i]; i++)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
305 if (!(filename = find_path_recursively(dirname, basenames[i])))
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
306 g_free(filename);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
307 else
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
308 return filename;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
309
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
310 /* can't find any targets -- sorry */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
311 return NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
312 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
313
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
314 /**
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
315 * Creates possible file names for a pixmap.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
316 *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
317 * Basically this makes list of all possible file names that pixmap data
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
318 * can be found from by using the static ext_targets variable to get all
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
319 * possible extensions that pixmap file might have.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
320 */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
321 static gchar **
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
322 skin_pixmap_create_basenames(const SkinPixmapIdMapping * pixmap_id_mapping)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
323 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
324 gchar **basenames = g_malloc0(sizeof(gchar*) * (EXTENSION_TARGETS * 2 + 1));
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
325 gint i, y;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
326
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
327 // Create list of all possible image formats that can be loaded
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
328 for (i = 0, y = 0; i < EXTENSION_TARGETS; i++, y++)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
329 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
330 basenames[y] =
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
331 g_strdup_printf("%s.%s", pixmap_id_mapping->name, ext_targets[i]);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
332
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
333 if (pixmap_id_mapping->alt_name)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
334 basenames[++y] =
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
335 g_strdup_printf("%s.%s", pixmap_id_mapping->alt_name,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
336 ext_targets[i]);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
337 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
338
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
339 return basenames;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
340 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
341
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
342 /**
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
343 * Frees the data allocated by skin_pixmap_create_basenames
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
344 */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
345 static void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
346 skin_pixmap_free_basenames(gchar ** basenames)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
347 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
348 int i;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
349 for (i = 0; basenames[i] != NULL; i++)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
350 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
351 g_free(basenames[i]);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
352 basenames[i] = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
353 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
354 g_free(basenames);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
355 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
356
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
357 /**
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
358 * Locates a pixmap file for skin.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
359 */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
360 static gchar *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
361 skin_pixmap_locate_basenames(const Skin * skin,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
362 const SkinPixmapIdMapping * pixmap_id_mapping,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
363 const gchar * path_p)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
364 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
365 gchar *filename = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
366 const gchar *path = path_p ? path_p : skin->path;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
367 gchar **basenames = skin_pixmap_create_basenames(pixmap_id_mapping);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
368
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
369 filename = skin_pixmap_locate(path, basenames);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
370
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
371 skin_pixmap_free_basenames(basenames);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
372
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
373 return filename;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
374 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
375
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
376
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
377 static gboolean
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
378 skin_load_pixmap_id(Skin * skin, SkinPixmapId id, const gchar * path_p)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
379 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
380 const SkinPixmapIdMapping *pixmap_id_mapping;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
381 gchar *filename;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
382 SkinPixmap *pm = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
383
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
384 g_return_val_if_fail(skin != NULL, FALSE);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
385 g_return_val_if_fail(id < SKIN_PIXMAP_COUNT, FALSE);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
386
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
387 pixmap_id_mapping = skin_pixmap_id_lookup(id);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
388 g_return_val_if_fail(pixmap_id_mapping != NULL, FALSE);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
389
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
390 filename = skin_pixmap_locate_basenames(skin, pixmap_id_mapping, path_p);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
391
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
392 if (filename == NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
393 return FALSE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
394
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
395 AUDDBG("loaded %s\n", filename);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
396
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
397 pm = &skin->pixmaps[id];
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
398 GdkPixbuf *pix = gdk_pixbuf_new_from_file(filename, NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
399 pm->pixbuf = audacious_create_colorized_pixbuf(pix, cfg.colorize_r, cfg.colorize_g, cfg.colorize_b);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
400 g_object_unref(pix);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
401 pm->width = gdk_pixbuf_get_width(pm->pixbuf);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
402 pm->height = gdk_pixbuf_get_height(pm->pixbuf);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
403 pm->current_width = pm->width;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
404 pm->current_height = pm->height;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
405
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
406 g_free(filename);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
407
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
408 return TRUE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
409 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
410
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
411 void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
412 skin_mask_create(Skin * skin,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
413 const gchar * path,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
414 gint id,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
415 GdkWindow * window)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
416 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
417 skin->masks[id] =
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
418 skin_create_transparent_mask(path, "region.txt",
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
419 skin_mask_info[id].inistr, window,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
420 skin_mask_info[id].width,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
421 skin_mask_info[id].height, FALSE);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
422
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
423 skin->scaled_masks[id] =
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
424 skin_create_transparent_mask(path, "region.txt",
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
425 skin_mask_info[id].inistr, window,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
426 skin_mask_info[id].width * 2,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
427 skin_mask_info[id].height * 2, TRUE);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
428 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
429
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
430 static GdkBitmap *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
431 create_default_mask(GdkWindow * parent, gint w, gint h)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
432 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
433 GdkBitmap *ret;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
434 GdkGC *gc;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
435 GdkColor pattern;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
436
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
437 ret = gdk_pixmap_new(parent, w, h, 1);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
438 gc = gdk_gc_new(ret);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
439 pattern.pixel = 1;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
440 gdk_gc_set_foreground(gc, &pattern);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
441 gdk_draw_rectangle(ret, gc, TRUE, 0, 0, w, h);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
442 g_object_unref(gc);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
443
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
444 return ret;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
445 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
446
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
447 static void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
448 skin_query_color(GdkColormap * cm, GdkColor * c)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
449 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
450 #ifdef GDK_WINDOWING_X11
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
451 XColor xc = { 0,0,0,0,0,0 };
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
452
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
453 xc.pixel = c->pixel;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
454 XQueryColor(GDK_COLORMAP_XDISPLAY(cm), GDK_COLORMAP_XCOLORMAP(cm), &xc);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
455 c->red = xc.red;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
456 c->green = xc.green;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
457 c->blue = xc.blue;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
458 #else
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
459 /* do nothing. see what breaks? */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
460 #endif
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
461 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
462
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
463 static glong
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
464 skin_calc_luminance(GdkColor * c)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
465 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
466 return (0.212671 * c->red + 0.715160 * c->green + 0.072169 * c->blue);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
467 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
468
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
469 static void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
470 skin_get_textcolors(GdkPixbuf * pix, GdkColor * bgc, GdkColor * fgc)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
471 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
472 /*
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
473 * Try to extract reasonable background and foreground colors
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
474 * from the font pixmap
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
475 */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
476
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
477 GdkImage *gi;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
478 GdkColormap *cm;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
479 gint i;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
480
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
481 g_return_if_fail(pix != NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
482 g_return_if_fail(GDK_IS_WINDOW(playlistwin->window));
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
483
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
484 GdkPixmap *text = gdk_pixmap_new(NULL, gdk_pixbuf_get_width(pix), gdk_pixbuf_get_height(pix), gdk_rgb_get_visual()->depth);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
485 gdk_draw_pixbuf(text, NULL, pix, 0, 0, 0, 0, gdk_pixbuf_get_width(pix), gdk_pixbuf_get_height(pix),
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
486 GDK_RGB_DITHER_NONE, 0, 0);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
487 /* Get the first line of text */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
488 gi = gdk_drawable_get_image(text, 0, 0, 152, 6);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
489 cm = gdk_drawable_get_colormap(playlistwin->window);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
490
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
491 for (i = 0; i < 6; i++) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
492 GdkColor c;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
493 gint x;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
494 glong d, max_d;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
495
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
496 /* Get a pixel from the middle of the space character */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
497 bgc[i].pixel = gdk_image_get_pixel(gi, 151, i);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
498 skin_query_color(cm, &bgc[i]);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
499
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
500 max_d = 0;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
501 for (x = 1; x < 150; x++) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
502 c.pixel = gdk_image_get_pixel(gi, x, i);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
503 skin_query_color(cm, &c);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
504
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
505 d = labs(skin_calc_luminance(&c) - skin_calc_luminance(&bgc[i]));
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
506 if (d > max_d) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
507 memcpy(&fgc[i], &c, sizeof(GdkColor));
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
508 max_d = d;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
509 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
510 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
511 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
512 g_object_unref(gi);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
513 g_object_unref(text);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
514 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
515
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
516 gboolean
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
517 init_skins(const gchar * path)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
518 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
519 aud_active_skin = skin_new();
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
520
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
521 skin_parse_hints(aud_active_skin, NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
522
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
523 /* create the windows if they haven't been created yet, needed for bootstrapping */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
524 if (mainwin == NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
525 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
526 mainwin_create();
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
527 equalizerwin_create();
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
528 playlistwin_create();
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
529 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
530
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
531 if (!aud_active_skin_load(path)) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
532 if (path != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
533 AUDDBG("Unable to load skin (%s), trying default...\n", path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
534 else
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
535 AUDDBG("Skin not defined: trying default...\n");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
536
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
537 /* can't load configured skin, retry with default */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
538 if (!aud_active_skin_load(BMP_DEFAULT_SKIN_PATH)) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
539 AUDDBG("Unable to load default skin (%s)! Giving up.\n",
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
540 BMP_DEFAULT_SKIN_PATH);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
541 return FALSE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
542 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
543 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
544
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
545 if (cfg.random_skin_on_play)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
546 skinlist_update();
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
547
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
548 return TRUE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
549 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
550
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
551 void cleanup_skins()
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
552 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
553 skin_destroy(aud_active_skin);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
554 aud_active_skin = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
555 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
556
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
557
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
558 /*
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
559 * Opens and parses a skin's hints file.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
560 * Hints files are somewhat like "scripts" in Winamp3/5.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
561 * We'll probably add scripts to it next.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
562 */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
563 void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
564 skin_parse_hints(Skin * skin, gchar *path_p)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
565 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
566 gchar *filename, *tmp;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
567 INIFile *inifile;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
568
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
569 path_p = path_p ? path_p : skin->path;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
570
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
571 skin->properties.mainwin_othertext = FALSE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
572 skin->properties.mainwin_vis_x = 24;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
573 skin->properties.mainwin_vis_y = 43;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
574 skin->properties.mainwin_vis_width = 76;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
575 skin->properties.mainwin_text_x = 112;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
576 skin->properties.mainwin_text_y = 27;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
577 skin->properties.mainwin_text_width = 153;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
578 skin->properties.mainwin_infobar_x = 112;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
579 skin->properties.mainwin_infobar_y = 43;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
580 skin->properties.mainwin_number_0_x = 36;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
581 skin->properties.mainwin_number_0_y = 26;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
582 skin->properties.mainwin_number_1_x = 48;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
583 skin->properties.mainwin_number_1_y = 26;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
584 skin->properties.mainwin_number_2_x = 60;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
585 skin->properties.mainwin_number_2_y = 26;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
586 skin->properties.mainwin_number_3_x = 78;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
587 skin->properties.mainwin_number_3_y = 26;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
588 skin->properties.mainwin_number_4_x = 90;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
589 skin->properties.mainwin_number_4_y = 26;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
590 skin->properties.mainwin_playstatus_x = 24;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
591 skin->properties.mainwin_playstatus_y = 28;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
592 skin->properties.mainwin_menurow_visible = TRUE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
593 skin->properties.mainwin_volume_x = 107;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
594 skin->properties.mainwin_volume_y = 57;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
595 skin->properties.mainwin_balance_x = 177;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
596 skin->properties.mainwin_balance_y = 57;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
597 skin->properties.mainwin_position_x = 16;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
598 skin->properties.mainwin_position_y = 72;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
599 skin->properties.mainwin_othertext_is_status = FALSE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
600 skin->properties.mainwin_othertext_visible = skin->properties.mainwin_othertext;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
601 skin->properties.mainwin_text_visible = TRUE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
602 skin->properties.mainwin_vis_visible = TRUE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
603 skin->properties.mainwin_previous_x = 16;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
604 skin->properties.mainwin_previous_y = 88;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
605 skin->properties.mainwin_play_x = 39;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
606 skin->properties.mainwin_play_y = 88;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
607 skin->properties.mainwin_pause_x = 62;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
608 skin->properties.mainwin_pause_y = 88;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
609 skin->properties.mainwin_stop_x = 85;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
610 skin->properties.mainwin_stop_y = 88;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
611 skin->properties.mainwin_next_x = 108;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
612 skin->properties.mainwin_next_y = 88;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
613 skin->properties.mainwin_eject_x = 136;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
614 skin->properties.mainwin_eject_y = 89;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
615 skin->properties.mainwin_width = 275;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
616 skin_mask_info[0].width = skin->properties.mainwin_width;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
617 skin->properties.mainwin_height = 116;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
618 skin_mask_info[0].height = skin->properties.mainwin_height;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
619 skin->properties.mainwin_about_x = 247;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
620 skin->properties.mainwin_about_y = 83;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
621 skin->properties.mainwin_shuffle_x = 164;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
622 skin->properties.mainwin_shuffle_y = 89;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
623 skin->properties.mainwin_repeat_x = 210;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
624 skin->properties.mainwin_repeat_y = 89;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
625 skin->properties.mainwin_eqbutton_x = 219;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
626 skin->properties.mainwin_eqbutton_y = 58;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
627 skin->properties.mainwin_plbutton_x = 242;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
628 skin->properties.mainwin_plbutton_y = 58;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
629 skin->properties.textbox_bitmap_font_width = 5;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
630 skin->properties.textbox_bitmap_font_height = 6;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
631 skin->properties.mainwin_minimize_x = 244;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
632 skin->properties.mainwin_minimize_y = 3;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
633 skin->properties.mainwin_shade_x = 254;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
634 skin->properties.mainwin_shade_y = 3;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
635 skin->properties.mainwin_close_x = 264;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
636 skin->properties.mainwin_close_y = 3;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
637
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
638 if (path_p == NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
639 return;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
640
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
641 filename = find_file_recursively(path_p, "skin.hints");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
642
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
643 if (filename == NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
644 return;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
645
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
646 inifile = open_ini_file(filename);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
647 if (!inifile)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
648 return;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
649
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
650 tmp = read_ini_string(inifile, "skin", "mainwinOthertext");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
651
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
652 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
653 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
654 skin->properties.mainwin_othertext = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
655 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
656 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
657
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
658 tmp = read_ini_string(inifile, "skin", "mainwinVisX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
659
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
660 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
661 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
662 skin->properties.mainwin_vis_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
663 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
664 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
665
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
666 tmp = read_ini_string(inifile, "skin", "mainwinVisY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
667
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
668 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
669 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
670 skin->properties.mainwin_vis_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
671 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
672 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
673
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
674 tmp = read_ini_string(inifile, "skin", "mainwinVisWidth");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
675
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
676 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
677 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
678 skin->properties.mainwin_vis_width = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
679 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
680 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
681
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
682 tmp = read_ini_string(inifile, "skin", "mainwinTextX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
683
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
684 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
685 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
686 skin->properties.mainwin_text_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
687 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
688 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
689
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
690 tmp = read_ini_string(inifile, "skin", "mainwinTextY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
691
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
692 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
693 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
694 skin->properties.mainwin_text_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
695 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
696 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
697
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
698 tmp = read_ini_string(inifile, "skin", "mainwinTextWidth");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
699
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
700 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
701 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
702 skin->properties.mainwin_text_width = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
703 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
704 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
705
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
706 tmp = read_ini_string(inifile, "skin", "mainwinInfoBarX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
707
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
708 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
709 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
710 skin->properties.mainwin_infobar_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
711 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
712 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
713
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
714 tmp = read_ini_string(inifile, "skin", "mainwinInfoBarY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
715
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
716 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
717 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
718 skin->properties.mainwin_infobar_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
719 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
720 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
721
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
722 tmp = read_ini_string(inifile, "skin", "mainwinNumber0X");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
723
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
724 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
725 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
726 skin->properties.mainwin_number_0_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
727 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
728 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
729
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
730 tmp = read_ini_string(inifile, "skin", "mainwinNumber0Y");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
731
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
732 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
733 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
734 skin->properties.mainwin_number_0_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
735 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
736 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
737
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
738 tmp = read_ini_string(inifile, "skin", "mainwinNumber1X");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
739
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
740 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
741 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
742 skin->properties.mainwin_number_1_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
743 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
744 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
745
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
746 tmp = read_ini_string(inifile, "skin", "mainwinNumber1Y");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
747
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
748 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
749 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
750 skin->properties.mainwin_number_1_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
751 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
752 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
753
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
754 tmp = read_ini_string(inifile, "skin", "mainwinNumber2X");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
755
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
756 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
757 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
758 skin->properties.mainwin_number_2_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
759 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
760 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
761
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
762 tmp = read_ini_string(inifile, "skin", "mainwinNumber2Y");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
763
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
764 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
765 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
766 skin->properties.mainwin_number_2_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
767 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
768 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
769
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
770 tmp = read_ini_string(inifile, "skin", "mainwinNumber3X");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
771
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
772 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
773 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
774 skin->properties.mainwin_number_3_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
775 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
776 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
777
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
778 tmp = read_ini_string(inifile, "skin", "mainwinNumber3Y");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
779
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
780 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
781 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
782 skin->properties.mainwin_number_3_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
783 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
784 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
785
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
786 tmp = read_ini_string(inifile, "skin", "mainwinNumber4X");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
787
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
788 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
789 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
790 skin->properties.mainwin_number_4_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
791 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
792 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
793
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
794 tmp = read_ini_string(inifile, "skin", "mainwinNumber4Y");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
795
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
796 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
797 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
798 skin->properties.mainwin_number_4_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
799 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
800 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
801
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
802 tmp = read_ini_string(inifile, "skin", "mainwinPlayStatusX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
803
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
804 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
805 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
806 skin->properties.mainwin_playstatus_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
807 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
808 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
809
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
810 tmp = read_ini_string(inifile, "skin", "mainwinPlayStatusY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
811
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
812 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
813 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
814 skin->properties.mainwin_playstatus_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
815 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
816 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
817
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
818 tmp = read_ini_string(inifile, "skin", "mainwinMenurowVisible");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
819
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
820 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
821 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
822 skin->properties.mainwin_menurow_visible = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
823 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
824 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
825
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
826 tmp = read_ini_string(inifile, "skin", "mainwinVolumeX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
827
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
828 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
829 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
830 skin->properties.mainwin_volume_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
831 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
832 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
833
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
834 tmp = read_ini_string(inifile, "skin", "mainwinVolumeY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
835
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
836 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
837 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
838 skin->properties.mainwin_volume_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
839 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
840 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
841
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
842 tmp = read_ini_string(inifile, "skin", "mainwinBalanceX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
843
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
844 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
845 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
846 skin->properties.mainwin_balance_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
847 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
848 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
849
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
850 tmp = read_ini_string(inifile, "skin", "mainwinBalanceY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
851
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
852 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
853 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
854 skin->properties.mainwin_balance_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
855 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
856 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
857
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
858 tmp = read_ini_string(inifile, "skin", "mainwinPositionX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
859
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
860 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
861 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
862 skin->properties.mainwin_position_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
863 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
864 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
865
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
866 tmp = read_ini_string(inifile, "skin", "mainwinPositionY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
867
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
868 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
869 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
870 skin->properties.mainwin_position_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
871 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
872 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
873
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
874 tmp = read_ini_string(inifile, "skin", "mainwinOthertextIsStatus");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
875
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
876 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
877 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
878 skin->properties.mainwin_othertext_is_status = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
879 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
880 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
881
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
882 tmp = read_ini_string(inifile, "skin", "mainwinOthertextVisible");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
883
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
884 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
885 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
886 skin->properties.mainwin_othertext_visible = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
887 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
888 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
889
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
890 tmp = read_ini_string(inifile, "skin", "mainwinTextVisible");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
891
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
892 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
893 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
894 skin->properties.mainwin_text_visible = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
895 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
896 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
897
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
898 tmp = read_ini_string(inifile, "skin", "mainwinVisVisible");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
899
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
900 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
901 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
902 skin->properties.mainwin_vis_visible = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
903 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
904 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
905
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
906 tmp = read_ini_string(inifile, "skin", "mainwinPreviousX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
907
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
908 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
909 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
910 skin->properties.mainwin_previous_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
911 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
912 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
913
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
914 tmp = read_ini_string(inifile, "skin", "mainwinPreviousY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
915
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
916 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
917 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
918 skin->properties.mainwin_previous_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
919 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
920 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
921
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
922 tmp = read_ini_string(inifile, "skin", "mainwinPlayX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
923
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
924 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
925 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
926 skin->properties.mainwin_play_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
927 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
928 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
929
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
930 tmp = read_ini_string(inifile, "skin", "mainwinPlayY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
931
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
932 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
933 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
934 skin->properties.mainwin_play_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
935 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
936 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
937
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
938 tmp = read_ini_string(inifile, "skin", "mainwinPauseX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
939
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
940 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
941 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
942 skin->properties.mainwin_pause_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
943 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
944 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
945
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
946 tmp = read_ini_string(inifile, "skin", "mainwinPauseY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
947
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
948 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
949 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
950 skin->properties.mainwin_pause_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
951 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
952 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
953
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
954 tmp = read_ini_string(inifile, "skin", "mainwinStopX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
955
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
956 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
957 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
958 skin->properties.mainwin_stop_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
959 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
960 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
961
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
962 tmp = read_ini_string(inifile, "skin", "mainwinStopY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
963
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
964 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
965 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
966 skin->properties.mainwin_stop_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
967 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
968 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
969
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
970 tmp = read_ini_string(inifile, "skin", "mainwinNextX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
971
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
972 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
973 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
974 skin->properties.mainwin_next_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
975 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
976 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
977
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
978 tmp = read_ini_string(inifile, "skin", "mainwinNextY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
979
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
980 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
981 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
982 skin->properties.mainwin_next_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
983 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
984 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
985
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
986 tmp = read_ini_string(inifile, "skin", "mainwinEjectX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
987
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
988 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
989 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
990 skin->properties.mainwin_eject_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
991 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
992 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
993
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
994 tmp = read_ini_string(inifile, "skin", "mainwinEjectY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
995
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
996 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
997 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
998 skin->properties.mainwin_eject_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
999 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1000 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1001
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1002 tmp = read_ini_string(inifile, "skin", "mainwinWidth");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1003
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1004 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1005 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1006 skin->properties.mainwin_width = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1007 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1008 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1009
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1010 skin_mask_info[0].width = skin->properties.mainwin_width;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1011
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1012 tmp = read_ini_string(inifile, "skin", "mainwinHeight");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1013
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1014 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1015 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1016 skin->properties.mainwin_height = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1017 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1018 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1019
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1020 skin_mask_info[0].height = skin->properties.mainwin_height;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1021
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1022 tmp = read_ini_string(inifile, "skin", "mainwinAboutX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1023
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1024 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1025 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1026 skin->properties.mainwin_about_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1027 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1028 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1029
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1030 tmp = read_ini_string(inifile, "skin", "mainwinAboutY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1031
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1032 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1033 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1034 skin->properties.mainwin_about_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1035 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1036 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1037
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1038 tmp = read_ini_string(inifile, "skin", "mainwinShuffleX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1039
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1040 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1041 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1042 skin->properties.mainwin_shuffle_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1043 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1044 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1045
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1046 tmp = read_ini_string(inifile, "skin", "mainwinShuffleY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1047
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1048 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1049 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1050 skin->properties.mainwin_shuffle_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1051 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1052 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1053
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1054 tmp = read_ini_string(inifile, "skin", "mainwinRepeatX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1055
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1056 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1057 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1058 skin->properties.mainwin_repeat_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1059 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1060 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1061
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1062 tmp = read_ini_string(inifile, "skin", "mainwinRepeatY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1063
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1064 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1065 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1066 skin->properties.mainwin_repeat_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1067 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1068 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1069
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1070 tmp = read_ini_string(inifile, "skin", "mainwinEQButtonX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1071
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1072 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1073 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1074 skin->properties.mainwin_eqbutton_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1075 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1076 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1077
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1078 tmp = read_ini_string(inifile, "skin", "mainwinEQButtonY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1079
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1080 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1081 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1082 skin->properties.mainwin_eqbutton_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1083 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1084 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1085
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1086 tmp = read_ini_string(inifile, "skin", "mainwinPLButtonX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1087
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1088 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1089 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1090 skin->properties.mainwin_plbutton_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1091 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1092 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1093
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1094 tmp = read_ini_string(inifile, "skin", "mainwinPLButtonY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1095
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1096 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1097 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1098 skin->properties.mainwin_plbutton_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1099 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1100 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1101
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1102 tmp = read_ini_string(inifile, "skin", "textboxBitmapFontWidth");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1103
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1104 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1105 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1106 skin->properties.textbox_bitmap_font_width = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1107 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1108 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1109
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1110 tmp = read_ini_string(inifile, "skin", "textboxBitmapFontHeight");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1111
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1112 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1113 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1114 skin->properties.textbox_bitmap_font_height = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1115 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1116 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1117
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1118 tmp = read_ini_string(inifile, "skin", "mainwinMinimizeX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1119
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1120 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1121 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1122 skin->properties.mainwin_minimize_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1123 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1124 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1125
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1126 tmp = read_ini_string(inifile, "skin", "mainwinMinimizeY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1127
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1128 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1129 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1130 skin->properties.mainwin_minimize_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1131 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1132 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1133
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1134 tmp = read_ini_string(inifile, "skin", "mainwinShadeX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1135
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1136 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1137 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1138 skin->properties.mainwin_shade_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1139 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1140 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1141
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1142 tmp = read_ini_string(inifile, "skin", "mainwinShadeY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1143
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1144 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1145 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1146 skin->properties.mainwin_shade_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1147 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1148 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1149
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1150 tmp = read_ini_string(inifile, "skin", "mainwinCloseX");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1151
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1152 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1153 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1154 skin->properties.mainwin_close_x = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1155 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1156 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1157
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1158 tmp = read_ini_string(inifile, "skin", "mainwinCloseY");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1159
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1160 if (tmp != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1161 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1162 skin->properties.mainwin_close_y = atoi(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1163 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1164 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1165
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1166 if (filename != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1167 g_free(filename);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1168
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1169 close_ini_file(inifile);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1170 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1171
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1172 static guint
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1173 hex_chars_to_int(gchar hi, gchar lo)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1174 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1175 /*
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1176 * Converts a value in the range 0x00-0xFF
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1177 * to a integer in the range 0-65535
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1178 */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1179 gchar str[3];
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1180
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1181 str[0] = hi;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1182 str[1] = lo;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1183 str[2] = 0;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1184
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1185 return (CLAMP(strtol(str, NULL, 16), 0, 0xFF) << 8);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1186 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1187
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1188 static GdkColor *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1189 skin_load_color(INIFile *inifile,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1190 const gchar * section, const gchar * key,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1191 gchar * default_hex)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1192 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1193 gchar *value;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1194 GdkColor *color = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1195
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1196 if (inifile || default_hex) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1197 if (inifile) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1198 value = read_ini_string(inifile, section, key);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1199 if (value == NULL) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1200 value = g_strdup(default_hex);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1201 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1202 } else {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1203 value = g_strdup(default_hex);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1204 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1205 if (value) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1206 gchar *ptr = value;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1207 gint len;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1208
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1209 color = g_new0(GdkColor, 1);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1210 g_strstrip(value);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1211
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1212 if (value[0] == '#')
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1213 ptr++;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1214 len = strlen(ptr);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1215 /*
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1216 * The handling of incomplete values is done this way
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1217 * to maximize winamp compatibility
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1218 */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1219 if (len >= 6) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1220 color->red = hex_chars_to_int(*ptr, *(ptr + 1));
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1221 ptr += 2;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1222 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1223 if (len >= 4) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1224 color->green = hex_chars_to_int(*ptr, *(ptr + 1));
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1225 ptr += 2;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1226 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1227 if (len >= 2)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1228 color->blue = hex_chars_to_int(*ptr, *(ptr + 1));
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1229
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1230 gdk_colormap_alloc_color(gdk_drawable_get_colormap(playlistwin->window),
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1231 color, TRUE, TRUE);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1232 g_free(value);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1233 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1234 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1235 return color;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1236 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1237
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1238
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1239
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1240 GdkBitmap *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1241 skin_create_transparent_mask(const gchar * path,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1242 const gchar * file,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1243 const gchar * section,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1244 GdkWindow * window,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1245 gint width,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1246 gint height, gboolean scale)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1247 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1248 GdkBitmap *mask = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1249 GdkGC *gc = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1250 GdkColor pattern;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1251 GdkPoint *gpoints;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1252
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1253 gchar *filename = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1254 INIFile *inifile = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1255 gboolean created_mask = FALSE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1256 GArray *num, *point;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1257 guint i, j;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1258 gint k;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1259
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1260 if (path)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1261 filename = find_file_recursively(path, file);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1262
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1263 /* filename will be null if path wasn't set */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1264 if (!filename)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1265 return create_default_mask(window, width, height);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1266
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1267 inifile = open_ini_file(filename);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1268
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1269 if ((num = read_ini_array(inifile, section, "NumPoints")) == NULL) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1270 g_free(filename);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1271 close_ini_file(inifile);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1272 return NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1273 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1274
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1275 if ((point = read_ini_array(inifile, section, "PointList")) == NULL) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1276 g_array_free(num, TRUE);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1277 g_free(filename);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1278 close_ini_file(inifile);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1279 return NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1280 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1281
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1282 close_ini_file(inifile);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1283
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1284 mask = gdk_pixmap_new(window, width, height, 1);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1285 gc = gdk_gc_new(mask);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1286
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1287 pattern.pixel = 0;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1288 gdk_gc_set_foreground(gc, &pattern);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1289 gdk_draw_rectangle(mask, gc, TRUE, 0, 0, width, height);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1290 pattern.pixel = 1;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1291 gdk_gc_set_foreground(gc, &pattern);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1292
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1293 j = 0;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1294 for (i = 0; i < num->len; i++) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1295 if ((int)(point->len - j) >= (g_array_index(num, gint, i) * 2)) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1296 created_mask = TRUE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1297 gpoints = g_new(GdkPoint, g_array_index(num, gint, i));
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1298 for (k = 0; k < g_array_index(num, gint, i); k++) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1299 gpoints[k].x =
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1300 g_array_index(point, gint, j + k * 2) * (scale ? cfg.scale_factor : 1 );
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1301 gpoints[k].y =
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1302 g_array_index(point, gint,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1303 j + k * 2 + 1) * (scale ? cfg.scale_factor : 1);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1304 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1305 j += k * 2;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1306 gdk_draw_polygon(mask, gc, TRUE, gpoints,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1307 g_array_index(num, gint, i));
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1308 g_free(gpoints);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1309 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1310 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1311 g_array_free(num, TRUE);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1312 g_array_free(point, TRUE);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1313 g_free(filename);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1314
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1315 if (!created_mask)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1316 gdk_draw_rectangle(mask, gc, TRUE, 0, 0, width, height);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1317
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1318 g_object_unref(gc);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1319
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1320 return mask;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1321 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1322
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1323 void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1324 skin_load_viscolor(Skin * skin, const gchar * path, const gchar * basename)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1325 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1326 VFSFile *file;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1327 gint i, c;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1328 gchar line[256], *filename;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1329 GArray *a;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1330
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1331 g_return_if_fail(skin != NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1332 g_return_if_fail(path != NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1333 g_return_if_fail(basename != NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1334
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1335 skin_set_default_vis_color(skin);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1336
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1337 filename = find_file_recursively(path, basename);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1338 if (!filename)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1339 return;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1340
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1341 if (!(file = vfs_fopen(filename, "r"))) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1342 g_free(filename);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1343 return;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1344 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1345
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1346 g_free(filename);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1347
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1348 for (i = 0; i < 24; i++) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1349 if (vfs_fgets(line, 255, file)) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1350 a = string_to_garray(line);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1351 if (a->len > 2) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1352 for (c = 0; c < 3; c++)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1353 skin->vis_color[i][c] = g_array_index(a, gint, c);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1354 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1355 g_array_free(a, TRUE);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1356 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1357 else
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1358 break;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1359 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1360
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1361 vfs_fclose(file);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1362 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1363
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1364 static void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1365 skin_numbers_generate_dash(Skin * skin)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1366 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1367 GdkPixbuf *pixbuf;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1368 SkinPixmap *numbers;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1369
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1370 g_return_if_fail(skin != NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1371
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1372 numbers = &skin->pixmaps[SKIN_NUMBERS];
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1373 if (!numbers->pixbuf || numbers->current_width < 99)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1374 return;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1375
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1376 pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1377 108, numbers->current_height);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1378
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1379 skin_draw_pixbuf(NULL, skin, pixbuf, SKIN_NUMBERS, 0, 0, 0, 0, 99, numbers->current_height);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1380 skin_draw_pixbuf(NULL, skin, pixbuf, SKIN_NUMBERS, 90, 0, 99, 0, 9, numbers->current_height);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1381 skin_draw_pixbuf(NULL, skin, pixbuf, SKIN_NUMBERS, 20, 6, 101, 6, 5, 1);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1382
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1383 g_object_unref(numbers->pixbuf);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1384
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1385 numbers->pixbuf = pixbuf;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1386 numbers->current_width = 108;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1387 numbers->width = 108;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1388 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1389
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1390 static void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1391 skin_load_cursor(Skin * skin, const gchar * dirname)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1392 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1393 const gchar * basename = "normal.cur";
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1394 gchar * filename = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1395 GdkPixbuf * cursor_pixbuf = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1396 GdkPixbufAnimation * cursor_animated = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1397 GdkCursor * cursor_gdk = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1398 GError * error = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1399
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1400 filename = find_file_recursively(dirname, basename);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1401
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1402 if (filename && cfg.custom_cursors)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1403 cursor_animated = gdk_pixbuf_animation_new_from_file(filename, &error);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1404
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1405 if (cursor_animated) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1406 cursor_pixbuf = gdk_pixbuf_animation_get_static_image(cursor_animated);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1407 cursor_gdk = gdk_cursor_new_from_pixbuf(gdk_display_get_default(),
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1408 cursor_pixbuf, 0, 0);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1409 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1410 else
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1411 cursor_gdk = gdk_cursor_new(GDK_LEFT_PTR);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1412
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1413 if (mainwin && playlistwin && equalizerwin)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1414 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1415 gdk_window_set_cursor(mainwin->window, cursor_gdk);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1416 gdk_window_set_cursor(playlistwin->window, cursor_gdk);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1417 gdk_window_set_cursor(equalizerwin->window, cursor_gdk);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1418 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1419
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1420 gdk_cursor_unref(cursor_gdk);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1421 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1422
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1423 static gboolean
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1424 skin_load_pixmaps(Skin * skin, const gchar * path)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1425 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1426 GdkPixbuf *text_pb;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1427 guint i;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1428 gchar *filename;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1429 INIFile *inifile;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1430
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1431 if(!skin) return FALSE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1432 if(!path) return FALSE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1433
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1434 AUDDBG("Loading pixmaps in %s\n", path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1435
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1436 for (i = 0; i < SKIN_PIXMAP_COUNT; i++)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1437 if (!skin_load_pixmap_id(skin, i, path) && !cfg.allow_broken_skins)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1438 return FALSE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1439
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1440 text_pb = skin->pixmaps[SKIN_TEXT].pixbuf;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1441
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1442 if (text_pb)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1443 skin_get_textcolors(text_pb, skin->textbg, skin->textfg);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1444
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1445 if (skin->pixmaps[SKIN_NUMBERS].pixbuf &&
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1446 skin->pixmaps[SKIN_NUMBERS].width < 108 )
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1447 skin_numbers_generate_dash(skin);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1448
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1449 filename = find_file_recursively(path, "pledit.txt");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1450 inifile = open_ini_file(filename);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1451
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1452 skin->colors[SKIN_PLEDIT_NORMAL] =
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1453 skin_load_color(inifile, "Text", "Normal", "#2499ff");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1454 skin->colors[SKIN_PLEDIT_CURRENT] =
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1455 skin_load_color(inifile, "Text", "Current", "#ffeeff");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1456 skin->colors[SKIN_PLEDIT_NORMALBG] =
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1457 skin_load_color(inifile, "Text", "NormalBG", "#0a120a");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1458 skin->colors[SKIN_PLEDIT_SELECTEDBG] =
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1459 skin_load_color(inifile, "Text", "SelectedBG", "#0a124a");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1460
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1461 if (inifile)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1462 close_ini_file(inifile);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1463
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1464 if (filename)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1465 g_free(filename);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1466
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1467 skin_mask_create(skin, path, SKIN_MASK_MAIN, mainwin->window);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1468 skin_mask_create(skin, path, SKIN_MASK_MAIN_SHADE, mainwin->window);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1469
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1470 skin_mask_create(skin, path, SKIN_MASK_EQ, equalizerwin->window);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1471 skin_mask_create(skin, path, SKIN_MASK_EQ_SHADE, equalizerwin->window);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1472
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1473 skin_load_viscolor(skin, path, "viscolor.txt");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1474
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1475 return TRUE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1476 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1477
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1478 static void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1479 skin_set_gtk_theme(GtkSettings * settings, Skin * skin)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1480 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1481 if (original_gtk_theme == NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1482 g_object_get(settings, "gtk-theme-name", &original_gtk_theme, NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1483
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1484 /* the way GTK does things can be very broken. --nenolod */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1485
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1486 gchar *tmp = g_strdup_printf("%s/.themes/aud-%s", g_get_home_dir(),
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1487 basename(skin->path));
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1488
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1489 gchar *troot = g_strdup_printf("%s/.themes", g_get_home_dir());
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1490 g_mkdir_with_parents(troot, 0755);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1491 g_free(troot);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1492
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1493 symlink(skin->path, tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1494 gtk_settings_set_string_property(settings, "gtk-theme-name",
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1495 basename(tmp), "audacious");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1496 g_free(tmp);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1497 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1498
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1499 /**
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1500 * Checks if all pixmap files exist that skin needs.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1501 */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1502 static gboolean
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1503 skin_check_pixmaps(const Skin * skin, const gchar * skin_path)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1504 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1505 guint i;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1506 for (i = 0; i < SKIN_PIXMAP_COUNT; i++)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1507 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1508 gchar *filename = skin_pixmap_locate_basenames(skin,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1509 skin_pixmap_id_lookup(i),
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1510 skin_path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1511 if (!filename)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1512 return FALSE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1513 g_free(filename);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1514 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1515 return TRUE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1516 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1517
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1518 static gboolean
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1519 skin_load_nolock(Skin * skin, const gchar * path, gboolean force)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1520 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1521 GtkSettings *settings;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1522 gchar *gtkrcpath;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1523 gchar *newpath, *skin_path;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1524 int archive = 0;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1525
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1526 AUDDBG("Attempt to load skin \"%s\"\n", path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1527
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1528 g_return_val_if_fail(skin != NULL, FALSE);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1529 g_return_val_if_fail(path != NULL, FALSE);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1530 REQUIRE_LOCK(skin->lock);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1531
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1532 if (!g_file_test(path, G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_DIR))
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1533 return FALSE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1534
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1535 if(force) AUDDBG("reloading forced!\n");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1536 if (!force && skin->path && !strcmp(skin->path, path)) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1537 AUDDBG("skin %s already loaded\n", path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1538 return FALSE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1539 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1540
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1541 if (file_is_archive(path)) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1542 AUDDBG("Attempt to load archive\n");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1543 if (!(skin_path = archive_decompress(path))) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1544 AUDDBG("Unable to extract skin archive (%s)\n", path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1545 return FALSE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1546 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1547 archive = 1;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1548 } else {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1549 skin_path = g_strdup(path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1550 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1551
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1552 // Check if skin path has all necessary files.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1553 if (!cfg.allow_broken_skins && !skin_check_pixmaps(skin, skin_path)) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1554 if(archive) del_directory(skin_path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1555 g_free(skin_path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1556 AUDDBG("Skin path (%s) doesn't have all wanted pixmaps\n", skin_path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1557 return FALSE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1558 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1559
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1560 // skin_free() frees skin->path and variable path can actually be skin->path
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1561 // and we want to get the path before possibly freeing it.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1562 newpath = g_strdup(path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1563 skin_free(skin);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1564 skin->path = newpath;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1565
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1566 memset(&(skin->properties), 0, sizeof(SkinProperties)); /* do it only if all tests above passed! --asphyx */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1567
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1568 skin_current_num++;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1569
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1570 /* Parse the hints for this skin. */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1571 skin_parse_hints(skin, skin_path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1572
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1573 if (!skin_load_pixmaps(skin, skin_path)) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1574 if(archive) del_directory(skin_path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1575 g_free(skin_path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1576 AUDDBG("Skin loading failed\n");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1577 return FALSE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1578 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1579
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1580 skin_load_cursor(skin, skin_path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1581
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1582 /* restore gtk theme if changed by previous skin */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1583 settings = gtk_settings_get_default();
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1584
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1585 if (original_gtk_theme != NULL) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1586 gtk_settings_set_string_property(settings, "gtk-theme-name",
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1587 original_gtk_theme, "audacious");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1588 g_free(original_gtk_theme);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1589 original_gtk_theme = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1590 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1591
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1592 #ifndef _WIN32
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1593 if (!cfg.disable_inline_gtk && !archive) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1594 gtkrcpath = find_path_recursively(skin->path, "gtkrc");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1595 if (gtkrcpath != NULL)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1596 skin_set_gtk_theme(settings, skin);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1597 g_free(gtkrcpath);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1598 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1599 #endif
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1600
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1601 if(archive) del_directory(skin_path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1602 g_free(skin_path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1603
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1604 gtk_widget_shape_combine_mask(mainwin, skin_get_mask(aud_active_skin, SKIN_MASK_MAIN + cfg.player_shaded), 0, 0);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1605 gtk_widget_shape_combine_mask(equalizerwin, skin_get_mask(aud_active_skin, SKIN_MASK_EQ + cfg.equalizer_shaded), 0, 0);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1606
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1607 return TRUE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1608 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1609
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1610 void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1611 skin_install_skin(const gchar * path)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1612 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1613 gchar *command;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1614
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1615 g_return_if_fail(path != NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1616
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1617 command = g_strdup_printf("cp %s %s",
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1618 path, aud_paths[BMP_PATH_USER_SKIN_DIR]);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1619 if (system(command)) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1620 AUDDBG("Unable to install skin (%s) into user directory (%s)\n",
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1621 path, aud_paths[BMP_PATH_USER_SKIN_DIR]);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1622 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1623 g_free(command);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1624 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1625
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1626 static SkinPixmap *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1627 skin_get_pixmap(Skin * skin, SkinPixmapId map_id)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1628 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1629 g_return_val_if_fail(skin != NULL, NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1630 g_return_val_if_fail(map_id < SKIN_PIXMAP_COUNT, NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1631
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1632 return &skin->pixmaps[map_id];
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1633 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1634
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1635 gboolean
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1636 skin_load(Skin * skin, const gchar * path)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1637 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1638 gboolean ret;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1639
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1640 g_return_val_if_fail(skin != NULL, FALSE);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1641
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1642 if (!path)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1643 return FALSE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1644
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1645 skin_lock(skin);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1646 ret = skin_load_nolock(skin, path, FALSE);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1647 skin_unlock(skin);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1648
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1649 if(!ret) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1650 AUDDBG("loading failed\n");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1651 return FALSE; /* don't try to update anything if loading failed --asphyx */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1652 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1653
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1654 SkinPixmap *pixmap = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1655 pixmap = skin_get_pixmap(skin, SKIN_NUMBERS);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1656 if (pixmap) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1657 ui_skinned_number_set_size(mainwin_minus_num, 9, pixmap->height);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1658 ui_skinned_number_set_size(mainwin_10min_num, 9, pixmap->height);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1659 ui_skinned_number_set_size(mainwin_min_num, 9, pixmap->height);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1660 ui_skinned_number_set_size(mainwin_10sec_num, 9, pixmap->height);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1661 ui_skinned_number_set_size(mainwin_sec_num, 9, pixmap->height);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1662 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1663
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1664 pixmap = skin_get_pixmap(skin, SKIN_MAIN);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1665 if (pixmap && skin->properties.mainwin_height > pixmap->height)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1666 skin->properties.mainwin_height = pixmap->height;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1667
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1668 pixmap = skin_get_pixmap(skin, SKIN_PLAYPAUSE);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1669 if (pixmap)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1670 ui_skinned_playstatus_set_size(mainwin_playstatus, 11, pixmap->height);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1671
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1672 pixmap = skin_get_pixmap(skin, SKIN_EQMAIN);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1673 if (pixmap->height >= 313)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1674 gtk_widget_show(equalizerwin_graph);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1675
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1676 return TRUE;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1677 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1678
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1679 gboolean
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1680 skin_reload_forced(void)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1681 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1682 gboolean error;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1683 AUDDBG("\n");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1684
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1685 skin_lock(aud_active_skin);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1686 error = skin_load_nolock(aud_active_skin, aud_active_skin->path, TRUE);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1687 skin_unlock(aud_active_skin);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1688
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1689 return error;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1690 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1691
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1692 void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1693 skin_reload(Skin * skin)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1694 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1695 AUDDBG("\n");
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1696 g_return_if_fail(skin != NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1697 skin_load_nolock(skin, skin->path, TRUE);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1698 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1699
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1700 GdkBitmap *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1701 skin_get_mask(Skin * skin, SkinMaskId mi)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1702 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1703 GdkBitmap **masks;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1704
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1705 g_return_val_if_fail(skin != NULL, NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1706 g_return_val_if_fail(mi < SKIN_PIXMAP_COUNT, NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1707
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1708 masks = cfg.scaled ? skin->scaled_masks : skin->masks;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1709 return masks[mi];
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1710 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1711
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1712 GdkColor *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1713 skin_get_color(Skin * skin, SkinColorId color_id)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1714 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1715 GdkColor *ret = NULL;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1716
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1717 g_return_val_if_fail(skin != NULL, NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1718
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1719 switch (color_id) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1720 case SKIN_TEXTBG:
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1721 if (skin->pixmaps[SKIN_TEXT].pixbuf)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1722 ret = skin->textbg;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1723 else
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1724 ret = skin->def_textbg;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1725 break;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1726 case SKIN_TEXTFG:
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1727 if (skin->pixmaps[SKIN_TEXT].pixbuf)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1728 ret = skin->textfg;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1729 else
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1730 ret = skin->def_textfg;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1731 break;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1732 default:
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1733 if (color_id < SKIN_COLOR_COUNT)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1734 ret = skin->colors[color_id];
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1735 break;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1736 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1737 return ret;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1738 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1739
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1740 void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1741 skin_get_viscolor(Skin * skin, guchar vis_color[24][3])
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1742 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1743 gint i;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1744
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1745 g_return_if_fail(skin != NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1746
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1747 for (i = 0; i < 24; i++) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1748 vis_color[i][0] = skin->vis_color[i][0];
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1749 vis_color[i][1] = skin->vis_color[i][1];
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1750 vis_color[i][2] = skin->vis_color[i][2];
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1751 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1752 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1753
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1754 gint
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1755 skin_get_id(void)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1756 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1757 return skin_current_num;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1758 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1759
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1760 void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1761 skin_draw_pixbuf(GtkWidget *widget, Skin * skin, GdkPixbuf * pix,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1762 SkinPixmapId pixmap_id,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1763 gint xsrc, gint ysrc, gint xdest, gint ydest,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1764 gint width, gint height)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1765 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1766 SkinPixmap *pixmap;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1767
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1768 g_return_if_fail(skin != NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1769
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1770 pixmap = skin_get_pixmap(skin, pixmap_id);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1771 g_return_if_fail(pixmap != NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1772 g_return_if_fail(pixmap->pixbuf != NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1773
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1774 /* perhaps we should use transparency or resize widget? */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1775 if (xsrc+width > pixmap->width || ysrc+height > pixmap->height) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1776 if (widget) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1777 /* it's better to hide widget using SKIN_PLAYPAUSE/SKIN_POSBAR than display mess */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1778 if ((pixmap_id == SKIN_PLAYPAUSE && pixmap->width != 42) || pixmap_id == SKIN_POSBAR) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1779 gtk_widget_hide(widget);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1780 return;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1781 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1782 gint x, y;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1783 x = -1;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1784 y = -1;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1785
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1786 if (gtk_widget_get_parent(widget) == SKINNED_WINDOW(mainwin)->fixed) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1787 GList *iter;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1788 for (iter = GTK_FIXED (SKINNED_WINDOW(mainwin)->fixed)->children; iter; iter = g_list_next (iter)) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1789 GtkFixedChild *child_data = (GtkFixedChild *) iter->data;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1790 if (child_data->widget == widget) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1791 x = child_data->x;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1792 y = child_data->y;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1793 break;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1794 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1795 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1796
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1797 if (x != -1 && y != -1) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1798 /* Some skins include SKIN_VOLUME and/or SKIN_BALANCE
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1799 without knobs */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1800 if (pixmap_id == SKIN_VOLUME || pixmap_id == SKIN_BALANCE) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1801 if (ysrc+height > 421 && xsrc+width <= pixmap->width)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1802 return;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1803 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1804 /* let's copy what's under widget */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1805 gdk_pixbuf_copy_area(skin_get_pixmap(aud_active_skin, SKIN_MAIN)->pixbuf,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1806 x, y, width, height, pix, xdest, ydest);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1807
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1808 /* XMMS skins seems to have SKIN_MONOSTEREO with size 58x20 instead of 58x24 */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1809 if (pixmap_id == SKIN_MONOSTEREO)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1810 height = pixmap->height/2;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1811 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1812 } else if (gtk_widget_get_parent(widget) == SKINNED_WINDOW(equalizerwin)->fixed) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1813 if (!(pixmap_id == SKIN_EQMAIN && ysrc == 314)) /* equalizer preamp on equalizer graph */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1814 gtk_widget_hide(widget);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1815 } else if (gtk_widget_get_parent(widget) == SKINNED_WINDOW(playlistwin)->fixed) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1816 /* I haven't seen any skin with substandard playlist */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1817 gtk_widget_hide(widget);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1818 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1819 } else
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1820 return;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1821 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1822
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1823 width = MIN(width, pixmap->width - xsrc);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1824 height = MIN(height, pixmap->height - ysrc);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1825 gdk_pixbuf_copy_area(pixmap->pixbuf, xsrc, ysrc, width, height,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1826 pix, xdest, ydest);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1827 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1828
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1829 void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1830 skin_get_eq_spline_colors(Skin * skin, guint32 colors[19])
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1831 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1832 gint i;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1833 GdkPixbuf *pixbuf;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1834 SkinPixmap *eqmainpm;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1835 guchar* pixels,*p;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1836 guint rowstride, n_channels;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1837 g_return_if_fail(skin != NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1838
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1839 eqmainpm = &skin->pixmaps[SKIN_EQMAIN];
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1840 if (eqmainpm->pixbuf &&
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1841 eqmainpm->current_width >= 116 && eqmainpm->current_height >= 313)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1842 pixbuf = eqmainpm->pixbuf;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1843 else
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1844 return;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1845
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1846 if (!GDK_IS_PIXBUF(pixbuf))
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1847 return;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1848
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1849 pixels = gdk_pixbuf_get_pixels (pixbuf);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1850 rowstride = gdk_pixbuf_get_rowstride (pixbuf);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1851 n_channels = gdk_pixbuf_get_n_channels (pixbuf);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1852 for (i = 0; i < 19; i++)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1853 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1854 p = pixels + rowstride * (i + 294) + 115 * n_channels;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1855 colors[i] = (p[0] << 16) | (p[1] << 8) | p[2];
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1856 /* should we really treat the Alpha channel? */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1857 /*if (n_channels == 4)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1858 colors[i] = (colors[i] << 8) | p[3];*/
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1859 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1860 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1861
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1862
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1863 static void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1864 skin_draw_playlistwin_frame_top(Skin * skin, GdkPixbuf * pix,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1865 gint width, gint height, gboolean focus)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1866 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1867 /* The title bar skin consists of 2 sets of 4 images, 1 set
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1868 * for focused state and the other for unfocused. The 4 images
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1869 * are:
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1870 *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1871 * a. right corner (25,20)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1872 * b. left corner (25,20)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1873 * c. tiler (25,20)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1874 * d. title (100,20)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1875 *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1876 * min allowed width = 100+25+25 = 150
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1877 */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1878
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1879 gint i, y, c;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1880
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1881 /* get y offset of the pixmap set to use */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1882 if (focus)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1883 y = 0;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1884 else
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1885 y = 21;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1886
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1887 /* left corner */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1888 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 0, y, 0, 0, 25, 20);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1889
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1890 /* titlebar title */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1891 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 26, y,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1892 (width - 100) / 2, 0, 100, 20);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1893
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1894 /* titlebar right corner */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1895 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 153, y,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1896 width - 25, 0, 25, 20);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1897
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1898 /* tile draw the remaining frame */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1899
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1900 /* compute tile count */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1901 c = (width - (100 + 25 + 25)) / 25;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1902
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1903 for (i = 0; i < c / 2; i++) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1904 /* left of title */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1905 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 127, y,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1906 25 + i * 25, 0, 25, 20);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1907
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1908 /* right of title */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1909 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 127, y,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1910 (width + 100) / 2 + i * 25, 0, 25, 20);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1911 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1912
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1913 if (c & 1) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1914 /* Odd tile count, so one remaining to draw. Here we split
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1915 * it into two and draw half on either side of the title */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1916 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 127, y,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1917 ((c / 2) * 25) + 25, 0, 12, 20);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1918 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 127, y,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1919 (width / 2) + ((c / 2) * 25) + 50, 0, 13, 20);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1920 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1921 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1922
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1923 static void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1924 skin_draw_playlistwin_frame_bottom(Skin * skin, GdkPixbuf * pix,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1925 gint width, gint height, gboolean focus)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1926 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1927 /* The bottom frame skin consists of 1 set of 4 images. The 4
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1928 * images are:
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1929 *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1930 * a. left corner with menu buttons (125,38)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1931 * b. visualization window (75,38)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1932 * c. right corner with play buttons (150,38)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1933 * d. frame tile (25,38)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1934 *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1935 * (min allowed width = 125+150+25=300
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1936 */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1937
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1938 gint i, c;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1939
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1940 /* bottom left corner (menu buttons) */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1941 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 0, 72,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1942 0, height - 38, 125, 38);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1943
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1944 c = (width - 275) / 25;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1945
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1946 /* draw visualization window, if width allows */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1947 if (c >= 3) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1948 c -= 3;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1949 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 205, 0,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1950 width - (150 + 75), height - 38, 75, 38);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1951 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1952
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1953 /* Bottom right corner (playbuttons etc) */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1954 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1955 126, 72, width - 150, height - 38, 150, 38);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1956
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1957 /* Tile draw the remaining undrawn portions */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1958 for (i = 0; i < c; i++)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1959 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 179, 0,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1960 125 + i * 25, height - 38, 25, 38);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1961 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1962
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1963 static void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1964 skin_draw_playlistwin_frame_sides(Skin * skin, GdkPixbuf * pix,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1965 gint width, gint height, gboolean focus)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1966 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1967 /* The side frames consist of 2 tile images. 1 for the left, 1 for
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1968 * the right.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1969 * a. left (12,29)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1970 * b. right (19,29)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1971 */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1972
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1973 gint i;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1974
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1975 /* frame sides */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1976 for (i = 0; i < (height - (20 + 38)) / 29; i++) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1977 /* left */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1978 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 0, 42,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1979 0, 20 + i * 29, 12, 29);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1980
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1981 /* right */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1982 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 32, 42,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1983 width - 19, 20 + i * 29, 19, 29);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1984 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1985 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1986
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1987
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1988 void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1989 skin_draw_playlistwin_frame(Skin * skin, GdkPixbuf * pix,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1990 gint width, gint height, gboolean focus)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1991 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1992 skin_draw_playlistwin_frame_top(skin, pix, width, height, focus);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1993 skin_draw_playlistwin_frame_bottom(skin, pix, width, height, focus);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1994 skin_draw_playlistwin_frame_sides(skin, pix, width, height, focus);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1995 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1996
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1997
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1998 void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
1999 skin_draw_playlistwin_shaded(Skin * skin, GdkPixbuf * pix,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2000 gint width, gboolean focus)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2001 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2002 /* The shade mode titlebar skin consists of 4 images:
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2003 * a) left corner offset (72,42) size (25,14)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2004 * b) right corner, focused offset (99,57) size (50,14)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2005 * c) right corner, unfocused offset (99,42) size (50,14)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2006 * d) bar tile offset (72,57) size (25,14)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2007 */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2008
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2009 gint i;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2010
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2011 /* left corner */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2012 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 72, 42, 0, 0, 25, 14);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2013
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2014 /* bar tile */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2015 for (i = 0; i < (width - 75) / 25; i++)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2016 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 72, 57,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2017 (i * 25) + 25, 0, 25, 14);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2018
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2019 /* right corner */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2020 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 99, focus ? 42 : 57,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2021 width - 50, 0, 50, 14);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2022 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2023
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2024
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2025 void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2026 skin_draw_mainwin_titlebar(Skin * skin, GdkPixbuf * pix,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2027 gboolean shaded, gboolean focus)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2028 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2029 /* The titlebar skin consists of 2 sets of 2 images, one for for
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2030 * shaded and the other for unshaded mode, giving a total of 4.
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2031 * The images are exactly 275x14 pixels, aligned and arranged
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2032 * vertically on each other in the pixmap in the following order:
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2033 *
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2034 * a) unshaded, focused offset (27, 0)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2035 * b) unshaded, unfocused offset (27, 15)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2036 * c) shaded, focused offset (27, 29)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2037 * d) shaded, unfocused offset (27, 42)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2038 */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2039
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2040 gint y_offset;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2041
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2042 if (shaded) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2043 if (focus)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2044 y_offset = 29;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2045 else
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2046 y_offset = 42;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2047 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2048 else {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2049 if (focus)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2050 y_offset = 0;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2051 else
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2052 y_offset = 15;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2053 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2054
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2055 skin_draw_pixbuf(NULL, skin, pix, SKIN_TITLEBAR, 27, y_offset,
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2056 0, 0, aud_active_skin->properties.mainwin_width, MAINWIN_TITLEBAR_HEIGHT);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2057 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2058
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2059
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2060 void
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2061 skin_set_random_skin(void)
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2062 {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2063 SkinNode *node;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2064 guint32 randval;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2065
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2066 /* Get a random value to select the skin to use */
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2067 randval = g_random_int_range(0, g_list_length(skinlist));
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2068 node = g_list_nth(skinlist, randval)->data;
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2069 aud_active_skin_load(node->path);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2070 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2071
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2072
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2073 void ui_skinned_widget_draw(GtkWidget *widget, GdkPixbuf *obj, gint width, gint height, gboolean scale) {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2074 g_return_if_fail(widget != NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2075 g_return_if_fail(obj != NULL);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2076
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2077 if (scale) {
4541
d8920be7275a set default scale_factor to 2.0, custom scale factor can be manually specified in config file anyway; use GDK_INTERP_NEAREST and GDK_RGB_DITHER_NONE when drawing scaled widgets
Tomasz Mon <desowin@gmail.com>
parents: 4508
diff changeset
2078 GdkPixbuf *image = gdk_pixbuf_scale_simple(obj, width * cfg.scale_factor, height* cfg.scale_factor, GDK_INTERP_NEAREST);
d8920be7275a set default scale_factor to 2.0, custom scale factor can be manually specified in config file anyway; use GDK_INTERP_NEAREST and GDK_RGB_DITHER_NONE when drawing scaled widgets
Tomasz Mon <desowin@gmail.com>
parents: 4508
diff changeset
2079 gdk_draw_pixbuf(widget->window, NULL, image, 0, 0, 0, 0, width * cfg.scale_factor , height * cfg.scale_factor, GDK_RGB_DITHER_NONE, 0, 0);
4508
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2080 g_object_unref(image);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2081 } else {
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2082 gdk_draw_pixbuf(widget->window, NULL, obj, 0, 0, 0, 0, width, height, GDK_RGB_DITHER_NONE, 0, 0);
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2083 }
246244ead30e renamed skin.* to ui_skin.* and moved ui_skinned_widget_draw() to it
mf0102 <0102@gmx.at>
parents:
diff changeset
2084 }