the GtkPerl tutorial is pretty helpful. Although still sadly lacking in some areas i reckon. Im just starting out as well using Gtk/Perl to create a GUI for something.
Im not using Glade, just coding Gtk by hand. Its really straightforward. One of the best lang's i've picked up.
Do you know any perl?
anyway, here is an example of creating a button, connecting it to signal and a sub routine to actually do something with it.
# Create the buttons and add them to the hbox which ive declared here also and added to a vbox which ive declared earlier and added to a window (which ive declared earlier and ... :-)
$hbox2 = new Gtk::HBox( $false, 0 );
$vbox->pack_start( $hbox2, $false, $true, 0 );
$hbox2->show();
$button_create = new Gtk::Button( "Create Filter" ); #create button
$hbox2->pack_start( $button_create, $true, $true, 0 ); #add it to hbox
# Connect our callbacks to the create button
$button_create->signal_connect( "clicked", \&button_create_clicked ); #signal is clicked, #sub im gonna call is button_create_clicked
$button_create->show();
... snipped
sub button_create_clicked {
open (MYFILE, ">testfil");
print MYFILE "#Exim filter\n\n";
close (MYFILE);
open (XMLFILE, "+<struct.xml")
or die ( "error" );
my $parser = new XML:
OM::Parser;
my $document = $parser->parse( \*XMLFILE );
pop_file ( $document );
...snipped
etc etc
hope that helps
Martin