#!/usr/bin/perl -w use strict; use Gnome; my $NAME = 'Hello World'; init Gnome $NAME; my $app = new Gnome::App $NAME, $NAME; signal_connect $app 'delete_event', sub { Gtk->main_quit; return 0; }; my $label = new Gtk::Label "Hello, world"; $app->set_contents($label); $app->create_menus( { type => 'subtree', label => '_File', subtree => [ { type => 'item', label => 'E_xit', pixmap_type => 'stock', pixmap_info => 'Menu_Quit', callback => sub { Gtk->main_quit; return 0; }, }, { type => 'separator', }, ], }, { type => 'subtree', label => '_Help', subtree => [ { type => 'item', label => '_About...', pixmap_type => 'stock', pixmap_info => 'Menu_About', callback => \&about_box, }, ], }, ); $app->create_toolbar( { type => 'item', label => 'Exit', pixmap_type => 'stock', pixmap_info => 'Quit', hint => "Click here to quit", callback => sub { Gtk->main_quit; }, }, { type => 'item', label => 'About...', pixmap_type => 'stock', pixmap_info => 'About', hint => "More information about this app", callback => \&about_box, }, ); my $bar = new Gnome::AppBar 0, 1, "user"; $bar->set_status(" Welcome "); $app->set_statusbar( $bar ); show_all $app; main Gtk; sub about_box { my $about = new Gnome::About $NAME, "v1.0", "(C) Unknown Group, 2000", ["Unknown User"], "This program is released under the GNU GPL"; show $about; }