test1.pl
author Peter Gervai <grin@grin.hu>
Thu, 16 Oct 2008 11:09:43 +0200
changeset 0 43c199fb1993
child 1 90185416e8ff
permissions -rwxr-xr-x
glade perl test, first import

#!/usr/bin/perl -w
#$Id$
#

use strict;
use warnings;

use Gtk2 '-init';
use Gtk2::GladeXML;
use Gtk2::Gdk::Keysyms; # keyboard code constants

my $glade;
my $label;
my $field;
my $window_about;

# load UI
$glade = Gtk2::GladeXML->new("test1.glade");

# connect signals
$glade->signal_autoconnect_from_package('main');

$label = $glade->get_widget('label1');
$field = $glade->get_widget('yourname_field');
$window_about = $glade->get_widget('aboutdialog1');

Gtk2->main;

exit 0;



# Handles window-manager-quit: shuts down gtk2 lib
sub on_main_delete_event {Gtk2->main_quit;}

# Handles close-button quit
sub on_close_button_clicked {on_main_delete_event;}