Re: Bug in frame->set_shadow_type?



On 04/11/01 Stefan Kamphausen wrote:
I have just noticed that I can't set the shadow_style of a frame to 
anything but the default if I don't use a style for that frame
[...]
Whereas this doesn't change the frame-shadow:
 
my $fr = new Gtk::Frame($msg_titles[0]);
$fr->set_shadow_type( 'etched_out' );

The following program works for me. Gtk-Perl version 0.7006, Gtk+
version 1.2.9, 1.2.10.

#!/usr/bin/perl -w

use Gtk -init;

my @types = qw(etched-out etched-in in out none);
my $w = new Gtk::Window;
my $f = new Gtk::Frame;
my $b = new Gtk::Button('Quit');
$w->border_width(10);
$b->border_width(10);
$w->add($f)->add($b);
$w->show_all;

$b->signal_connect('clicked', sub {$w->destroy});
$w->signal_connect('destroy', sub {exit});
Gtk->timeout_add(800, sub {
        my $type = shift @types;
        $f->set_shadow_type($type);
        push @types, $type;
});
Gtk->main;

I found a similar question in the archives:

http://mail.gnome.org/archives/gtk-perl-list/2000-September/msg00018.html
but that thread seems to be D.B.S (dead before solution ;-)

Yep, at the time I tested it and it actually worked. The poster
didn't bother to supply the Gtk-Perl or Gtk+ version number, so it
actually had a solution: upgrade. I still don't know if it was a
Gtk-Perl or Gtk+ bug: it would be interesting if you find it out.

3. in Gtk.pm:
$VERSION = '0.7000';

This is very old, please use 0.7006 instead.

lupus

-- 
-----------------------------------------------------------------
lupus debian org                                     debian/rules
lupus ximian com                             Monkeys do it better




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]