Re: GDK boolean fixes
- From: Tim Janik <timj gtk org>
- To: gtk-devel-list redhat com
- Subject: Re: GDK boolean fixes
- Date: Wed, 26 Jan 2000 04:28:15 +0100 (CET)
On 25 Jan 2000, Havoc Pennington wrote:
>
> Index: ChangeLog
> ===================================================================
> RCS file: /cvs/gnome/gtk+/ChangeLog,v
> retrieving revision 1.1061.2.212
> diff -u -u -r1.1061.2.212 ChangeLog
> --- ChangeLog 2000/01/25 15:18:16 1.1061.2.212
> +++ ChangeLog 2000/01/25 17:04:00
> @@ -1,3 +1,40 @@
> +2000-01-25 Havoc Pennington <hp@pobox.com>
> +
> + * gdk/gdkwindow.c (gdk_window_set_back_pixmap): parent_relative
> + arg is boolean
> +
> + * gdk/gdkselection.c (gdk_selection_owner_set): return boolean
[...]
thanks havoc,
the patch looks mostly ok to me, but more important than fixing those
things in the 1.2 branch is to fix them in 1.3. while 1.2.7 will benefit
from it, merging such patches across trees is usually not much fun.
an issue i saw when reviewing it is:
-gint
+gboolean
gdk_get_show_events (void)
{
return gdk_debug_flags & GDK_DEBUG_EVENTS;
functions that return gboolen should really only
return TRUE or FALSE, gdk_debug_flags & GDK_DEBUG_EVENTS
will reveal 0 or 2, for such cases, we need an addition !=0
check:
-gint
+gboolean
gdk_get_show_events (void)
{
- return gdk_debug_flags & GDK_DEBUG_EVENTS;
+ return (gdk_debug_flags & GDK_DEBUG_EVENTS) != 0;
so all possible values !=0 will be returned as TRUE.
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]