#!/usr/bin/perl -w

##  Copyright 2003 Rien Croonenborghs
##
##    This file is part of file2divx3pass.
##    file2divx4pass 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.
##    file2divx3pass 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 file2divx3pass; if not, write to the Free Software
##    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

use strict;

package File2DiVX3Pass;		## belongs to this package
use File2DiVX3Pass::helpers;	## makes use of the helpers -> makes use of interface -> has constructor
use Getopt::Std;
require Gtk;			## GTK application

my $widgets = new File2DiVX3Pass;
$widgets->{'wdwMain'}->show_all;

## load settings if there are any
## located in HOME/.file2divx3pass/settings
if( SettingsFileExists )
{
	MenuLoadSettings( $widgets );
}


## check if a media file is given as argument
## only one please
if( $#ARGV == 0 )
{
	SetInputFile( $ARGV[0], $widgets );
}
elsif( $#ARGV > 0 )
{
	Debug( "file2divx3pass can have a media-file as argument. This media-file will be used to ready the application for encoding." );
}

## start the GTK main loop
main Gtk;

1;
