Re: GtkSourceSearchFlags problem



Hi Jeff,

On Thu, 2003-06-12 at 22:52, Jeff Franks wrote:
> Hi,
> 
> GtkSourceSearchFlags is declared in gtksourceiter.h like this:
> 
> typedef enum {
>     GTK_SOURCE_SEARCH_VISIBLE_ONLY,
>     GTK_SOURCE_SEARCH_TEXT_ONLY,
>     GTK_SOURCE_SEARCH_CASE_INSENSITIVE
> } GtkSourceSearchFlags;
> 
> but because it's represents a bitmask field I think it should be 
> declared like this:
> 
> typedef enum {
>     GTK_SOURCE_SEARCH_VISIBLE_ONLY = 1 << 0,
>     GTK_SOURCE_SEARCH_TEXT_ONLY = 1 << 1,
>     GTK_SOURCE_SEARCH_CASE_INSENSITIVE = 1 << 2
> } GtkSourceSearchFlags;

This wouldn't be correct, since for the current implementation, the
first two values should match those in GtkTextSearchFlags. 
GTK_TEXT_SEARCH_VISIBLE_ONLY is 0, while 1 << 0 yields 1.

Given the above, the values do not *strictly* represent a bit mask.  So
I'm not sure we want to fix GtkSourceView while GtkTextSearchFlags is
still inconsistent.

I see you have reported the gtk+ issue to the gtk-devel list.  Please do
let us know when you file the bug so we can track it.

Thanks,
Gustavo





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]