From: gnome-perl (bugzilla.gnome.org) <bug...@bu...> - 2005-10-19 03:02:34
|
Do not reply to this via email (we are currently unable to handle email responses and they get discarded). You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=3D319204 gnome-perl | Gtk2 | Ver: unspecified Summary: 64bit problem with Gtk2::Gdk::Color properties? Product: gnome-perl Version: unspecified Platform: Other OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: Normal Component: Gtk2 AssignedTo: gtk...@li... ReportedBy: li...@no... CC: all...@bu... Version details: Gtk2 1.110 Distribution/Version: Ubuntu Breezy The below program generates the wrong output when run on x86_64: Parsed color: 1,2,3 Color from button (property): 0,0,3 Color from button (property, after set): 0,0,3 Color from selection: 1,2,3 Color from selection (property): 0,0,3 I expected that the output would be 1,2,3 for all. On i686: Parsed color: 1,2,3 Color from button (property): 1,2,3 Color from button (property, after set): 1,2,3 Color from selection: 1,2,3 Color from selection (property): 1,2,3 #!/usr/bin/perl -w use strict; use Gtk2 -init; use Glib qw(:constants); my $color =3D Gtk2::Gdk::Color->parse('#010203'); print "Parsed color: ", &color2string($color), "\n"; my $color_button =3D Gtk2::ColorButton->new_with_color($color); print "Color from button (property): ", &color2string($color_button->get('color')), "\n"; $color_button->set('color', $color); print "Color from button (property, after set): ", &color2string($color_button->get('color')), "\n"; my $color_selection =3D Gtk2::ColorSelection->new; $color_selection->set_current_color($color); print "Color from selection: ", &color2string($color_selection->get_current_color), "\n"; print "Color from selection (property): ", &color2string($color_selection->get('current_color')), "\n"; sub color2string { join(',', map { $_[0]->$_ / 257 } qw(red green blue)); } ------- You are receiving this mail because: ------- You are the assignee for the bug. |