Re: g_pattern_match usage in gtkitemfactory
- From: Tim Janik <timj gtk org>
- To: Matthias Clasen <matthiasc poet de>
- Cc: Havoc Pennington <hp redhat com>, Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: g_pattern_match usage in gtkitemfactory
- Date: Wed, 10 Oct 2001 15:34:12 +0200 (CEST)
On Wed, 10 Oct 2001, Matthias Clasen wrote:
> In gtkitemfactory.c, I find
> l.1330: pspec_separator = g_pattern_spec_new ("*<separator>*");
> pspec_check = g_pattern_spec_new ("*<check>*");
> l.1360: if (g_pattern_match_string (pspec_separator, path))
> entry.item_type = "<Separator>"; else if (!g_pattern_match_string
> (pspec_check, path)) entry.item_type = NULL;
> Wouldn't it be much simpler and more correct to use strstr ? if (strstr
> (path, "<separator>")) entry.item_type = "<Separator>";else if (!strstr
> (path, "<check>")) entry.item_type = NULL;
probably, however this code implements deprecated compatibility API anyways,
so it really doesn't matter.
havoc, can we have deprecation ifdefs around the "Compatibility functions for
deprecated GtkMenuFactory code" portion of gtkitemfactory.h as well?
> Matthias
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]