From: gnome-perl (bugzilla.gnome.org) <bug...@bu...> - 2009-01-13 23:43:01
|
If you have any questions why you received this email, please see the text at the end of this email. Replies to this email are NOT read, please see the text at the end of this email. You can add comments to this bug at: http://bugzilla.gnome.org/show_bug.cgi?id=567688 gnome-perl | Gtk2 | Ver: unspecified Summary: signal_chain_from_overridden in size_request class closure Product: gnome-perl Version: unspecified Platform: Other OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: Normal Component: Gtk2 AssignedTo: gtk...@li... ReportedBy: us...@zi... QAContact: gtk...@li... GNOME version: Unspecified GNOME milestone: Unspecified As noted in the Gtk2::Widget signals pod, chaining up to a superclass size_request doesn't fill in any data. The program below prints (among other things) after chain: 0x0 where I hoped the signal_chain_from_overridden would go to the Gtk2::Label size_request handler and get a desired size from it. (You can see the desired size by changing $foo to a plain Gtk2::Label per the commented out line in main). Chasing it down, I believe somewhere deep in signal_chain_from_overridden the Gtk2::Requisition supplied in the perl call is copied, so the pointer going to the g_signal_chain_from_overridden (in a GValue) is not the original and so the width/height stored in it by GtkLabel are never seen. It made me wonder if most of the time a boxed object should be copied or not copied when passed to a C func. But certainly in this case it shouldn't, since it's a kind of output location. package Foo; use strict; use warnings; use Gtk2; use Glib::Object::Subclass 'Gtk2::Label', signals => { size_request => \&_do_size_request }; sub _do_size_request { my ($self, $req) = @_; print "this is Foo::_do_size_request\n"; print "text is '",$self->get_text,"'\n"; print "before chain: ",$req->width,"x",$req->height,"\n"; Glib::Object::signal_chain_from_overridden ($self, $req); print "after chain: ",$req->width,"x",$req->height,"\n"; } package main; use strict; use warnings; use Gtk2 '-init'; my $window = Gtk2::Window->new('toplevel'); my $foo = Foo->new(); # # my $foo = Gtk2::Label->new(); # $foo->set_text ('hello world'); $window->add ($foo); $window->show_all; my $req = $foo->size_request(); print "main: foo size ",$req->width,"x",$req->height,"\n"; Gtk2->main(); -- See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received this email, why you can't respond via email, how to stop receiving emails (or reduce the number you receive), and how to contact someone if you are having problems with the system. You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=567688. |
From: gnome-perl (bugzilla.gnome.org) <bug...@bu...> - 2009-06-02 23:17:21
|
If you have any questions why you received this email, please see the text at the end of this email. Replies to this email are NOT read, please see the text at the end of this email. You can add comments to this bug at: http://bugzilla.gnome.org/show_bug.cgi?id=567688 gnome-perl | Gtk2 | Ver: unspecified ------- Comment #1 from Kevin Ryde 2009-06-02 23:17 UTC ------- As noted on the mailing list, the latest change to Glib to have boxed objects not copied fixes this problem. The change below removes the note in the docs and adds a test case exercising the now-successful chaining, when ready to have a dependency on that new enough Glib. -- See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received this email, why you can't respond via email, how to stop receiving emails (or reduce the number you receive), and how to contact someone if you are having problems with the system. You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=567688. |
From: gnome-perl (bugzilla.gnome.org) <bug...@bu...> - 2009-06-02 23:19:13
|
If you have any questions why you received this email, please see the text at the end of this email. Replies to this email are NOT read, please see the text at the end of this email. You can add comments to this bug at: http://bugzilla.gnome.org/show_bug.cgi?id=567688 gnome-perl | Gtk2 | Ver: unspecified ------- Comment #2 from Kevin Ryde 2009-06-02 23:19 UTC ------- Created an attachment (id=135853) --> (http://bugzilla.gnome.org/attachment.cgi?id=135853&action=view) doc update and test case -- See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received this email, why you can't respond via email, how to stop receiving emails (or reduce the number you receive), and how to contact someone if you are having problems with the system. You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=567688. |
From: gnome-perl (bugzilla.gnome.org) <bug...@bu...> - 2009-06-04 19:27:10
|
If you have any questions why you received this email, please see the text at the end of this email. Replies to this email are NOT read, please see the text at the end of this email. You can add comments to this bug at: http://bugzilla.gnome.org/show_bug.cgi?id=567688 gnome-perl | Gtk2 | Ver: unspecified Torsten Schoenfeld changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kaf...@gm... Attachment #135853|none |committed Flag| | Status|UNCONFIRMED |RESOLVED Resolution| |FIXED ------- Comment #3 from Torsten Schoenfeld 2009-06-04 19:26 UTC ------- Ah, sweet. I love it when bugs fix themselves. I created a stable branch for Gtk2 so that this can go into master: <http://git.gnome.org/cgit/perl-Gtk2/commit/?id=07d6735c82898346d412c72f0ce22a56a78ab8f7> <http://git.gnome.org/cgit/perl-Gtk2/commit/?id=9c0a15933209c4a2a33028c08f884063c68ea6ea> Thanks for the test case! -- See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received this email, why you can't respond via email, how to stop receiving emails (or reduce the number you receive), and how to contact someone if you are having problems with the system. You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=567688. |
From: gnome-perl (bugzilla.gnome.org) <bug...@bu...> - 2009-06-04 23:18:11
|
If you have any questions why you received this email, please see the text at the end of this email. Replies to this email are NOT read, please see the text at the end of this email. You can add comments to this bug at: http://bugzilla.gnome.org/show_bug.cgi?id=567688 gnome-perl | Gtk2 | Ver: unspecified ------- Comment #4 from Kevin Ryde 2009-06-04 23:18 UTC ------- Created an attachment (id=135993) --> (http://bugzilla.gnome.org/attachment.cgi?id=135993&action=view) depend on Glib 1.221 Don't forget to bump the Glib dependency when ready, since of course the tests fail with 1.220. -- See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received this email, why you can't respond via email, how to stop receiving emails (or reduce the number you receive), and how to contact someone if you are having problems with the system. You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=567688. |