[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: More GnomeAbout
- From: Chas Owens <alas widomaker com>
- To: Pascal <evilynux yahoo com>
- Cc: gtk-perl-list gnome org
- Subject: Re: More GnomeAbout
- Date: Thu, 03 Jul 2003 13:34:00 -0400 (EDT)
Quoting Pascal <evilynux yahoo com>:
> > This is what I use:
> >
> > Gnome2::About->new(
> > 'program-name', #executable name goes here
> > '0.1', #version
> > 'copyright me', #your copyright notice
> > 'comments' #a brief description of your program
> > ['me', 'that other guy'], #arrayref of authors
> > )->show;
>
> I know i can do it that way,
> but the thing is that i thought using GladeXML was cleaner...
>
> I'm not sure, but i think that with Gnome-1.2, the GnomeAbout takes both
> the name and the version
> from the values given at init (Gnome::init($NAME, $NAME, $VERSION)).
>
> Even tho with gnome-2.0 it's more like Gnome2::Program->init ($NAME,
> $VERSION, 'libgnomeui'); it
> seems that GnomeAbout works different.
>
> -Pascal
I have found that it is easier to create the Gnome::About window myself in a
callback attached to the menu item about. Glade is nice, but the small stuff is
often easier to do by hand. Example:
sub mi_about_activate {
Gnome2::About->new(
'program-name', #executable name goes here
'0.1', #version
'copyright me', #your copyright notice
'comments' #a brief description of your program
['me', 'that other guy'], #arrayref of authors
)->show;
}
vs
sub mi_about_activate {
my $glade = Gtk2::GladeXML->new('application.glade', 'about_window');
$glade->signal_autoconnect_from_package('AboutWindow');
}
package AboutWindow;
sub on_dialog_close {
my ($dialog) = @_;
$dialog->hide;
return 1;
}
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]