view src/vtx/info.c @ 2284:d19b53359b24

cleaned up the sndfile wav plugin, currently limiting it ONLY TO WAV PLAYBACK. if somebody is more experienced with it and wants to restore the other formats, go ahead (maybe change the name of the plugin too?).
author mf0102 <0102@gmx.at>
date Wed, 09 Jan 2008 15:41:22 +0100
parents f6f5603a0954
children 42a5c9d5830b
line wrap: on
line source

#include <audacious/plugin.h>
#include <audacious/util.h>
#include <audacious/output.h>
#include <audacious/vfs.h>
#include <audacious/strings.h>
#include <audacious/i18n.h>

#include "ayemu.h"
#include "vtx.h"

void vtx_file_info(gchar *filename)
{
  static GtkWidget *box;
  ayemu_vtx_t vtx;

  if (!ayemu_vtx_open(&vtx, filename))
    {
      fprintf(stderr, "Can't open file %s\n", filename);
      return;
    }
  else
    {
      gchar head[1024];
      gchar body[8192];

      sprintf(head, "Details about %s", filename);

	  ayemu_vtx_sprintname(&vtx, body, sizeof(body),
	      "Title: %t\n"
	      "Author: %a\n"
	      "From : %f\n"
	      "Tracker : %T\n"
	      "Comment : %C\n"
	      "Chip type: %c\n"
	      "Stereo: %s\n"
	      "Loop: %l\n"
	      "Chip freq: %F\n"
	      "Player Freq:%P\n"
	      "Year: %y");
      
      box = audacious_info_dialog (head,
			       body,
			       _("Ok"), FALSE, NULL, NULL);
      
      
    }
  g_signal_connect (G_OBJECT (box), "destroy", G_CALLBACK(gtk_widget_destroyed),  &box);
}