annotate src/vtx/info.c @ 2496:42a5c9d5830b

Include cleanups, part #1.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 31 Mar 2008 14:00:33 +0300
parents f6f5603a0954
children bd3a24b39058
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2496
42a5c9d5830b Include cleanups, part #1.
Matti Hamalainen <ccr@tnsp.org>
parents: 1677
diff changeset
1 #include "ayemu.h"
42a5c9d5830b Include cleanups, part #1.
Matti Hamalainen <ccr@tnsp.org>
parents: 1677
diff changeset
2 #include "vtx.h"
749
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
3 #include <audacious/util.h>
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
4 #include <audacious/output.h>
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
5 #include <audacious/strings.h>
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
6 #include <audacious/i18n.h>
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
7
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
8 void vtx_file_info(gchar *filename)
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
9 {
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
10 static GtkWidget *box;
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
11 ayemu_vtx_t vtx;
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
12
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
13 if (!ayemu_vtx_open(&vtx, filename))
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
14 {
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
15 fprintf(stderr, "Can't open file %s\n", filename);
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
16 return;
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
17 }
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
18 else
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
19 {
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
20 gchar head[1024];
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
21 gchar body[8192];
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
22
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
23 sprintf(head, "Details about %s", filename);
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
24
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
25 ayemu_vtx_sprintname(&vtx, body, sizeof(body),
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
26 "Title: %t\n"
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
27 "Author: %a\n"
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
28 "From : %f\n"
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
29 "Tracker : %T\n"
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
30 "Comment : %C\n"
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
31 "Chip type: %c\n"
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
32 "Stereo: %s\n"
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
33 "Loop: %l\n"
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
34 "Chip freq: %F\n"
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
35 "Player Freq:%P\n"
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
36 "Year: %y");
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
37
1677
f6f5603a0954 xmms_show_message() changed to audacious_info_dialog()
Matti Hamalainen <ccr@tnsp.org>
parents: 1424
diff changeset
38 box = audacious_info_dialog (head,
749
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
39 body,
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
40 _("Ok"), FALSE, NULL, NULL);
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
41
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
42
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
43 }
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
44 g_signal_connect (G_OBJECT (box), "destroy", G_CALLBACK(gtk_widget_destroyed), &box);
26ff35aa9b2b [svn] - vtx input plugin based on a submission from Pavel Vymetalek.
nenolod
parents:
diff changeset
45 }