g_pattern_match usage in gtkitemfactory



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;
Matthias






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