Lines 522-546
find_section (GtkTreeModel *model,
Link Here
|
522 |
GtkTreeIter *iter, |
522 |
GtkTreeIter *iter, |
523 |
const char *title) |
523 |
const char *title) |
524 |
{ |
524 |
{ |
525 |
gint i, j; |
525 |
gboolean success, found; |
526 |
gboolean found; |
|
|
527 |
|
526 |
|
528 |
i = gtk_tree_model_iter_n_children (model, NULL); |
|
|
529 |
found = FALSE; |
527 |
found = FALSE; |
530 |
gtk_tree_model_get_iter_first (model, iter); |
528 |
success = gtk_tree_model_get_iter_first (model, iter); |
531 |
for (j = 0; j < i; j++) |
529 |
while (success && !found) |
532 |
{ |
530 |
{ |
533 |
char *description = NULL; |
531 |
char *description = NULL; |
534 |
|
532 |
|
535 |
gtk_tree_model_iter_next (model, iter); |
|
|
536 |
gtk_tree_model_get (model, iter, |
533 |
gtk_tree_model_get (model, iter, |
537 |
DESCRIPTION_COLUMN, &description, |
534 |
DESCRIPTION_COLUMN, &description, |
538 |
-1); |
535 |
-1); |
539 |
if (g_strcmp0 (description, title) == 0) |
536 |
|
540 |
{ |
537 |
found = (g_strcmp0 (description, title) == 0); |
541 |
found = TRUE; |
538 |
success = gtk_tree_model_iter_next (model, iter); |
542 |
break; |
|
|
543 |
} |
544 |
} |
539 |
} |
545 |
if (!found) |
540 |
if (!found) |
546 |
{ |
541 |
{ |
547 |
- |
|
|