From: gnome-perl (G. B. <bug...@gn...> - 2015-03-16 17:01:32
|
https://bugzilla.gnome.org/show_bug.cgi?id=746303 Bug ID: 746303 Summary: Fomatting the text in a spinbutton does not work Classification: Bindings Product: gnome-perl Version: unspecified OS: All Status: NEW Severity: normal Priority: Normal Component: Gtk2 Assignee: gtk...@li... Reporter: ha...@ya... QA Contact: gtk...@li... GNOME version: --- I tried to display the value of a spinbutton in hexadecimal form. It is always displayed in decimal. Example code: #!/usr/bin/perl use strict; use warnings; use Gtk2 -init; my $dialog = Gtk2::Dialog->new('Test', undef, [ 'GTK_DIALOG_MODAL', 'GTK_DIALOG_DESTROY_WITH_PARENT' ], ('gtk-close', 'close')); sub _cb_spin($$) { my ($widget, $self) = @_; my $value = $widget->get_value_as_int(); my $str = sprintf("0x%x", $value); $widget->set_text("$str"); return 0; } my $vbox = $dialog->get_content_area(); my $spin = Gtk2::SpinButton->new_with_range(0x0, 0x70000, 0x10000); $spin->signal_connect('output', \&_cb_spin); $spin->set_value(0x30000); $vbox->add($spin); $vbox->show_all(); $dialog->run; The callback is active, but the text does not change. When returning '1' from the callback, i get no output at all. -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug. |