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 507566 - GtkSpinButton should allow zero padding values
GtkSpinButton should allow zero padding values
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Johan (not receiving bugmail) Dahlin
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-01-05 23:55 UTC by Johan (not receiving bugmail) Dahlin
Modified: 2008-01-06 06:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (8.04 KB, patch)
2008-01-05 23:57 UTC, Johan (not receiving bugmail) Dahlin
rejected Details | Review
Python example demonstrating using ::output (322 bytes, text/plain)
2008-01-06 05:33 UTC, Owen Taylor
  Details

Description Johan (not receiving bugmail) Dahlin 2008-01-05 23:55:23 UTC
Og Marciel asked me on IRC if it was possible to zero-pad values in GtkSpinButton, 
His use case, somewhat modelled after OSX is to have a date widget with three spinbuttons:

[2008] [01] [05]

To my surprise I found out that it was not possible. I'll attach a patch that adds support for that. The implementation is pretty straight forward.
Comment 1 Johan (not receiving bugmail) Dahlin 2008-01-05 23:57:00 UTC
Created attachment 102245 [details] [review]
patch
Comment 2 Owen Taylor 2008-01-06 05:33:55 UTC
Created attachment 102258 [details]
Python example demonstrating using ::output

It's pretty trivial to do with the ::output signal
Comment 3 Matthias Clasen 2008-01-06 06:39:56 UTC
2008-01-06  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkspinbutton.c: Document the ::output signal and
        add an example.  (#507566, example by Owen Taylor)