/* 
 *  beboCD  - GTK2 and libcdaudio based cdplayer
 *  
 *  Miroslav Yordanov 2003
 *  <mironcho@users.sourceforge.net>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.*
 */


/*
 * Initial main.c file generated by Glade. Edit as required.
 * Glade will not overwrite this file.
 */

#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include <gtk/gtk.h>
#include <cdaudio.h>

#include "interface.h"
#include "callbacks.h"
#include "support.h"
#include "cddb.h"
#include "main.h"

int
main (int argc, char *argv[])
{

#ifdef ENABLE_NLS
	bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
	textdomain (GETTEXT_PACKAGE);
#endif

	gtk_set_locale ();
	gtk_init (&argc, &argv);

	add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");

	/*
	 * * The following code was added by Glade to create one of each component
	 * * (except popup menus), just so that you see something after building
	 * * the project. Delete any components that you don't want shown initially.
	 * */
	bebocd = create_bebocd ();
	gtk_widget_show (bebocd);
  
  
	/* 
	 * *  cdaudio part
	 * */
	cd = cd_init_device (BEBO_CD_DEVICE);
	if ( -1 == cd ) {
		g_print ("Error opening %s !!!\n", BEBO_CD_DEVICE);
		exit (1);
	}
  
	STAT_CD;
	POLL_CD;

	bebo_get_current_cdvolume ();
	bebo_cddb_conf ();

	gtk_timeout_add (500, loop_action, NULL);
	gtk_main ();
  
	return 0;
}

