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 51041 - gboolean patch
gboolean patch
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
1.2.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2001-02-18 08:05 UTC by Sri Ramkrishna
Modified: 2011-02-04 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gzipped patch (8.97 KB, patch)
2001-02-18 08:06 UTC, Sri Ramkrishna
none Details | Review
un-gzipped patch (54.94 KB, patch)
2001-02-18 22:55 UTC, Owen Taylor
none Details | Review
Updated {gint,guint}->gbool patch (37.16 KB, patch)
2001-03-16 04:39 UTC, Nils Barth
none Details | Review
gint->gboolean on event signals in gtkwidget.h (5.51 KB, patch)
2001-03-26 06:01 UTC, Nils Barth
none Details | Review
gint->gboolean for event signals in gtkwidget.h and gtkrange.h (7.17 KB, patch)
2001-03-26 06:03 UTC, Nils Barth
none Details | Review

Description Sri Ramkrishna 2001-02-18 08:05:03 UTC
nothing in readme.
Comment 1 Sri Ramkrishna 2001-02-18 08:06:07 UTC
Created attachment 274 [details] [review]
gzipped patch
Comment 2 Owen Taylor 2001-02-18 22:53:59 UTC
Actually, the README (gtk-nilsb-000506-0.patch.README) says

This replaces gint with gboolean where applicable in exported
functions.

The patch has not yet been applied, and looks mostly correct,
but unfortunately, also includes a lot of occurrences of:

 -  guint          show_text : 1;
-  guint          activity_mode : 1;
+  gboolean      show_text : 1;
+  gboolean      activity_mode : 1;

Which is incorrect, since to hold the values FALSE and TRUE,
a bitfield must be unsigned, and gboolean is signed.
Comment 3 Owen Taylor 2001-02-18 22:55:14 UTC
Created attachment 294 [details] [review]
un-gzipped patch
Comment 4 Nils Barth 2001-03-16 04:39:13 UTC
Created attachment 407 [details] [review]
Updated {gint,guint}->gbool patch
Comment 5 Nils Barth 2001-03-16 04:43:37 UTC
Uploaded new and improved patch (removed gboolean ?? : 1, fixed 2
lacunae, and now works against current CVS).
Comment 6 Havoc Pennington 2001-03-16 20:13:14 UTC
Patch applied, thanks - I think we do want to replace "gint" with
"gboolean" on the event signals in GtkWidgetClass, if you're up for that.
Comment 7 Nils Barth 2001-03-26 06:01:08 UTC
Created attachment 424 [details] [review]
gint->gboolean on event signals in gtkwidget.h
Comment 8 Nils Barth 2001-03-26 06:03:09 UTC
Created attachment 425 [details] [review]
gint->gboolean for event signals in gtkwidget.h and gtkrange.h
Comment 9 Nils Barth 2001-03-26 07:21:20 UTC
Havoc -- uploaded two new patches: one converts gint->gboolean in the
event signals in gtkwidget.h ONLY, and the other does it in BOTH
gtkwidget.h AND gtkrange.h -- I'm not sure which one you wanted.
Comment 10 Owen Taylor 2001-03-28 03:48:04 UTC
Range indeed should be fixed. (The need for the change wasn't
limited to gtkwidget.c)

I'm applying your patch and fixing a number of other random
return values for virtual functions, so I think all headers are 
now correct.

There are quite a few event function implementations in the
widgets that return gint and should return gboolean, but
fixing that is really low priority.