Mercurial > audlegacy
comparison audacious/skin.c @ 625:0a73d1faeb4e trunk
[svn] GCC 4.1 warning fixes by Diego 'Flameeyes' Petteno from Gentoo.
author | chainsaw |
---|---|
date | Mon, 06 Feb 2006 17:10:47 -0800 |
parents | aedd5dbc1a1c |
children | 72ec4db929ed |
comparison
equal
deleted
inserted
replaced
624:a4ab65713d46 | 625:0a73d1faeb4e |
---|---|
74 {275, 116, "Equalizer"}, | 74 {275, 116, "Equalizer"}, |
75 {275, 16, "EqualizerWS"} | 75 {275, 16, "EqualizerWS"} |
76 }; | 76 }; |
77 | 77 |
78 static SkinPixmapIdMapping skin_pixmap_id_map[] = { | 78 static SkinPixmapIdMapping skin_pixmap_id_map[] = { |
79 {SKIN_MAIN, "main", NULL}, | 79 {SKIN_MAIN, "main", NULL, 0, 0}, |
80 {SKIN_CBUTTONS, "cbuttons", NULL}, | 80 {SKIN_CBUTTONS, "cbuttons", NULL, 0, 0}, |
81 {SKIN_SHUFREP, "shufrep", NULL}, | 81 {SKIN_SHUFREP, "shufrep", NULL, 0, 0}, |
82 {SKIN_TEXT, "text", NULL}, | 82 {SKIN_TEXT, "text", NULL, 0, 0}, |
83 {SKIN_TITLEBAR, "titlebar", NULL}, | 83 {SKIN_TITLEBAR, "titlebar", NULL, 0, 0}, |
84 {SKIN_VOLUME, "volume", NULL}, | 84 {SKIN_VOLUME, "volume", NULL, 0, 0}, |
85 {SKIN_BALANCE, "balance", "volume"}, | 85 {SKIN_BALANCE, "balance", "volume", 0, 0}, |
86 {SKIN_MONOSTEREO, "monoster", NULL}, | 86 {SKIN_MONOSTEREO, "monoster", NULL, 0, 0}, |
87 {SKIN_PLAYPAUSE, "playpaus", NULL}, | 87 {SKIN_PLAYPAUSE, "playpaus", NULL, 0, 0}, |
88 {SKIN_NUMBERS, "nums_ex", "numbers"}, | 88 {SKIN_NUMBERS, "nums_ex", "numbers", 0, 0}, |
89 {SKIN_POSBAR, "posbar", NULL}, | 89 {SKIN_POSBAR, "posbar", NULL, 0, 0}, |
90 {SKIN_EQMAIN, "eqmain", NULL}, | 90 {SKIN_EQMAIN, "eqmain", NULL, 0, 0}, |
91 {SKIN_PLEDIT, "pledit", NULL}, | 91 {SKIN_PLEDIT, "pledit", NULL, 0, 0}, |
92 {SKIN_EQ_EX, "eq_ex", NULL} | 92 {SKIN_EQ_EX, "eq_ex", NULL, 0, 0} |
93 }; | 93 }; |
94 | 94 |
95 static guint skin_pixmap_id_map_size = G_N_ELEMENTS(skin_pixmap_id_map); | 95 static guint skin_pixmap_id_map_size = G_N_ELEMENTS(skin_pixmap_id_map); |
96 | 96 |
97 static const guchar skin_default_viscolor[24][3] = { | 97 static const guchar skin_default_viscolor[24][3] = { |
222 g_mutex_free(skin->lock); | 222 g_mutex_free(skin->lock); |
223 g_free(skin); | 223 g_free(skin); |
224 } | 224 } |
225 | 225 |
226 const SkinPixmapIdMapping * | 226 const SkinPixmapIdMapping * |
227 skin_pixmap_id_lookup(gint id) | 227 skin_pixmap_id_lookup(guint id) |
228 { | 228 { |
229 gint i; | 229 guint i; |
230 | 230 |
231 for (i = 0; i < skin_pixmap_id_map_size; i++) { | 231 for (i = 0; i < skin_pixmap_id_map_size; i++) { |
232 if (id == skin_pixmap_id_map[i].id) { | 232 if (id == skin_pixmap_id_map[i].id) { |
233 return &skin_pixmap_id_map[i]; | 233 return &skin_pixmap_id_map[i]; |
234 } | 234 } |
238 } | 238 } |
239 | 239 |
240 const gchar * | 240 const gchar * |
241 skin_pixmap_id_to_name(SkinPixmapId id) | 241 skin_pixmap_id_to_name(SkinPixmapId id) |
242 { | 242 { |
243 gint i; | 243 guint i; |
244 | 244 |
245 for (i = 0; i < skin_pixmap_id_map_size; i++) { | 245 for (i = 0; i < skin_pixmap_id_map_size; i++) { |
246 if (id == skin_pixmap_id_map[i].id) | 246 if (id == skin_pixmap_id_map[i].id) |
247 return skin_pixmap_id_map[i].name; | 247 return skin_pixmap_id_map[i].name; |
248 } | 248 } |
416 } | 416 } |
417 | 417 |
418 static void | 418 static void |
419 skin_query_color(GdkColormap * cm, GdkColor * c) | 419 skin_query_color(GdkColormap * cm, GdkColor * c) |
420 { | 420 { |
421 XColor xc = { 0 }; | 421 XColor xc = { 0,0,0,0,0,0 }; |
422 | 422 |
423 xc.pixel = c->pixel; | 423 xc.pixel = c->pixel; |
424 XQueryColor(GDK_COLORMAP_XDISPLAY(cm), GDK_COLORMAP_XCOLORMAP(cm), &xc); | 424 XQueryColor(GDK_COLORMAP_XDISPLAY(cm), GDK_COLORMAP_XCOLORMAP(cm), &xc); |
425 c->red = xc.red; | 425 c->red = xc.red; |
426 c->green = xc.green; | 426 c->green = xc.green; |
579 GdkPoint *gpoints; | 579 GdkPoint *gpoints; |
580 | 580 |
581 gchar *filename = NULL; | 581 gchar *filename = NULL; |
582 gboolean created_mask = FALSE; | 582 gboolean created_mask = FALSE; |
583 GArray *num, *point; | 583 GArray *num, *point; |
584 gint i, j, k; | 584 guint i, j; |
585 gint k; | |
585 | 586 |
586 if (path) | 587 if (path) |
587 filename = find_file_recursively(path, file); | 588 filename = find_file_recursively(path, file); |
588 | 589 |
589 /* filename will be null if path wasn't set */ | 590 /* filename will be null if path wasn't set */ |
611 pattern.pixel = 1; | 612 pattern.pixel = 1; |
612 gdk_gc_set_foreground(gc, &pattern); | 613 gdk_gc_set_foreground(gc, &pattern); |
613 | 614 |
614 j = 0; | 615 j = 0; |
615 for (i = 0; i < num->len; i++) { | 616 for (i = 0; i < num->len; i++) { |
616 if ((point->len - j) >= (g_array_index(num, gint, i) * 2)) { | 617 if ((int)(point->len - j) >= (g_array_index(num, gint, i) * 2)) { |
617 created_mask = TRUE; | 618 created_mask = TRUE; |
618 gpoints = g_new(GdkPoint, g_array_index(num, gint, i)); | 619 gpoints = g_new(GdkPoint, g_array_index(num, gint, i)); |
619 for (k = 0; k < g_array_index(num, gint, i); k++) { | 620 for (k = 0; k < g_array_index(num, gint, i); k++) { |
620 gpoints[k].x = g_array_index(point, gint, j + k * 2); | 621 gpoints[k].x = g_array_index(point, gint, j + k * 2); |
621 gpoints[k].y = g_array_index(point, gint, j + k * 2 + 1); | 622 gpoints[k].y = g_array_index(point, gint, j + k * 2 + 1); |