After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 746303 - Fomatting the text in a spinbutton does not work
Fomatting the text in a spinbutton does not work
Status: RESOLVED OBSOLETE
Product: gnome-perl
Classification: Bindings
Component: Gtk2
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk2-perl-bugs
gtk2-perl-bugs
Depends on:
Blocks:
 
 
Reported: 2015-03-16 17:01 UTC by Thorsten Otto
Modified: 2021-07-05 12:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thorsten Otto 2015-03-16 17:01:15 UTC
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.
Comment 1 GNOME Infrastructure Team 2021-07-05 12:22:08 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME?utf8=%E2%9C%93&filter=perl-

Thank you for your understanding and your help.