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

#include <gtk/gtk.h>

#include "interface.h"
#include "support.h"

extern  GtkWidget *window;
extern  GtkWidget *notebook;

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");

  if (argv[1] == 0)
	{
	g_print("This program cannot be run by itself\n");
	g_print("Please run 'ubuntu-common-hooker' instead\n");
	gtk_main_quit();
	return 1;
	}
  else

	{
  window = create_window ();
  gtk_widget_show (window);
	if (!strcmp(argv[1],"zip")) {
	gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 0);
	}
	if (!strcmp(argv[1],"rar")) {
	gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 1);
	}
	if (!strcmp(argv[1],"wma")) {
	gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 2);
	}
	if (!strcmp(argv[1],"arj")) {
	gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 3);
	}
	if (!strcmp(argv[1],"m4a")) {
	gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 4);
	}
	if (!strcmp(argv[1],"ace")) {
	gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 5);
	}
	if (!strcmp(argv[1],"mov")) {
	gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 6);
	}
	if (!strcmp(argv[1],"mpg")) {
	gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 7);
	}
	if (!strcmp(argv[1],"aac")) {
	gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 8);
	}
	if (!strcmp(argv[1],"ram")) {
	gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 9);
	}
	if (!strcmp(argv[1],"mp3")) {
	gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 10);
	}
	if (!strcmp(argv[1],"cbr")) {
	gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 11);
	}
	if (!strcmp(argv[1],"cbz")) {
	gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 12);
	}
	if (!strcmp(argv[1],"chm")) {
	gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 13);
	}

 gtk_main ();
  return 0;
}
 
}

