1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
#!/usr/bin/perl -w
use strict;
use Gtk2::TestHelper
tests => 14,
at_least_version => [2, 10, 0, "GtkRecentChooserDialog"];
# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Gtk2/t/GtkRecentChooserDialog.t,v 1.1 2006/07/12 15:38:56 kaffeetisch Exp $
my $window = Gtk2::Window -> new();
my $manager = Gtk2::RecentManager -> new();
my $chooser = Gtk2::RecentChooserDialog -> new("Test", $window);
isa_ok($chooser, "Gtk2::RecentChooser");
isa_ok($chooser, "Gtk2::RecentChooserDialog");
$chooser = Gtk2::RecentChooserDialog -> new("Test", undef);
isa_ok($chooser, "Gtk2::RecentChooser");
isa_ok($chooser, "Gtk2::RecentChooserDialog");
$chooser = Gtk2::RecentChooserDialog -> new_for_manager("Test", $window, $manager);
isa_ok($chooser, "Gtk2::RecentChooser");
isa_ok($chooser, "Gtk2::RecentChooserDialog");
$chooser = Gtk2::RecentChooserDialog -> new_for_manager("Test", undef, $manager);
isa_ok($chooser, "Gtk2::RecentChooser");
isa_ok($chooser, "Gtk2::RecentChooserDialog");
$chooser = Gtk2::RecentChooserDialog -> new("Test", $window, "gtk-ok" => "ok");
isa_ok($chooser, "Gtk2::RecentChooser");
isa_ok($chooser, "Gtk2::RecentChooserDialog");
my @buttons = $chooser -> action_area -> get_children();
is(scalar @buttons, 1);
$chooser = Gtk2::RecentChooserDialog -> new_for_manager("Test", $window, $manager, "gtk-ok" => "ok", "gtk-cancel" => "cancel");
isa_ok($chooser, "Gtk2::RecentChooser");
isa_ok($chooser, "Gtk2::RecentChooserDialog");
@buttons = $chooser -> action_area -> get_children();
is(scalar @buttons, 2);
__END__
Copyright (C) 2006 by the gtk2-perl team (see the file AUTHORS for the
full list). See LICENSE for more information.
|