#
# This is the 'MainWindow' class of Mchange's glade
#

# babb
# 5/3/2011

package ChangeHW;
use strict;

use CSL::Gnome2;
use Gnome2;
use Gtk2::GladeXML;

use Mchange;

use Carp;

### Change this to wherever glade will live.
our $GLADEPATH = '/s/mchange-2.2/lib';

sub new
{
	# Open the glade file to build controls for main window.
	my $this = shift;
	my $class = ref($this) || $this;

	my $self = { };
	bless $self, $class;

	$self->{FORM} = Gtk2::GladeXML->new("$GLADEPATH/mchange-gtk2.glade", 
					"ChangeHW");

	croak "Error opening Glade file! Check your GLADEPATH." if(!$self->{FORM});

    $self->{FORM}->signal_autoconnect_from_package($self);

    return $self;

}


sub run
{
	my ($class, %params) = @_;

	Gnome2::Program->init("Mchange", "2.2");
	my $window = $class->new;


    Gtk2->main;

}
