Revision 32 src/grouplistdialog.c
| grouplistdialog.c (revision 32) | ||
|---|---|---|
| 40 | 40 |
#include <gtk/gtkhbbox.h> |
| 41 | 41 |
#include <gtk/gtkstock.h> |
| 42 | 42 |
#include <string.h> |
| 43 |
#include <fnmatch.h> |
|
| 44 | 43 |
|
| 45 | 44 |
#include "intl.h" |
| 46 | 45 |
#include "grouplistdialog.h" |
| ... | ... | |
| 317 | 316 |
node = gtk_ctree_insert_node(GTK_CTREE(ctree), parent, node, |
| 318 | 317 |
cols, 0, NULL, NULL, NULL, NULL, |
| 319 | 318 |
FALSE, FALSE); |
| 320 |
if (parent && fnmatch(pattern, parent_name, 0) != 0)
|
|
| 319 |
if (parent && g_pattern_match_simple(pattern, parent_name) == FALSE)
|
|
| 321 | 320 |
gtk_ctree_expand(GTK_CTREE(ctree), parent); |
| 322 | 321 |
gtk_ctree_node_set_selectable(GTK_CTREE(ctree), node, FALSE); |
| 323 | 322 |
|
| ... | ... | |
| 369 | 368 |
node = gtk_ctree_insert_node(GTK_CTREE(ctree), parent, node, |
| 370 | 369 |
cols, 0, NULL, NULL, NULL, NULL, |
| 371 | 370 |
TRUE, FALSE); |
| 372 |
if (parent && fnmatch(pattern, parent_name, 0) != 0) |
|
| 371 |
if (parent && |
|
| 372 |
g_pattern_match_simple(pattern, parent_name) == FALSE) |
|
| 373 | 373 |
gtk_ctree_expand(GTK_CTREE(ctree), parent); |
| 374 | 374 |
} |
| 375 | 375 |
gtk_ctree_node_set_selectable(GTK_CTREE(ctree), node, TRUE); |
| ... | ... | |
| 385 | 385 |
{
|
| 386 | 386 |
GSList *cur; |
| 387 | 387 |
GtkCTreeNode *node; |
| 388 |
GPatternSpec *pspec; |
|
| 388 | 389 |
|
| 389 | 390 |
if (locked) return; |
| 390 | 391 |
locked = TRUE; |
| ... | ... | |
| 422 | 423 |
g_signal_handlers_block_by_func(G_OBJECT(ctree), |
| 423 | 424 |
G_CALLBACK(ctree_selected), NULL); |
| 424 | 425 |
|
| 426 |
pspec = g_pattern_spec_new(pattern); |
|
| 427 |
|
|
| 425 | 428 |
for (cur = group_list; cur != NULL ; cur = cur->next) {
|
| 426 | 429 |
NewsGroupInfo *ginfo = (NewsGroupInfo *)cur->data; |
| 427 | 430 |
|
| 428 |
if (fnmatch(pattern, ginfo->name, 0) == 0) {
|
|
| 431 |
if (g_pattern_match_string(pspec, ginfo->name)) {
|
|
| 429 | 432 |
node = grouplist_create_branch(ginfo, pattern); |
| 430 | 433 |
if (g_slist_find_custom(subscribed, ginfo->name, |
| 431 | 434 |
(GCompareFunc)g_strcasecmp) |
| ... | ... | |
| 434 | 437 |
} |
| 435 | 438 |
} |
| 436 | 439 |
|
| 440 |
g_pattern_spec_free(pspec); |
|
| 441 |
|
|
| 437 | 442 |
g_signal_handlers_unblock_by_func(G_OBJECT(ctree), |
| 438 | 443 |
G_CALLBACK(ctree_selected), NULL); |
| 439 | 444 |
|
Also available in: Unified diff