comparison src/search.c @ 1437:a3d3208b0c50

gint -> gboolean.
author zas_
date Sun, 15 Mar 2009 07:07:52 +0000
parents cf4029d10d38
children a005287bffc7
comparison
equal deleted inserted replaced
1436:d7a6fb7a90dd 1437:a3d3208b0c50
369 { 369 {
370 GtkTreeModel *store; 370 GtkTreeModel *store;
371 GtkTreeSelection *selection; 371 GtkTreeSelection *selection;
372 GList *slist; 372 GList *slist;
373 GList *work; 373 GList *work;
374 gint found = FALSE; 374 gboolean found = FALSE;
375 375
376 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(sd->result_view)); 376 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(sd->result_view));
377 slist = gtk_tree_selection_get_selected_rows(selection, &store); 377 slist = gtk_tree_selection_get_selected_rows(selection, &store);
378 work = slist; 378 work = slist;
379 while (!found && work) 379 while (!found && work)
1193 } 1193 }
1194 1194
1195 static gint search_result_keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) 1195 static gint search_result_keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
1196 { 1196 {
1197 SearchData *sd = data; 1197 SearchData *sd = data;
1198 gint stop_signal = FALSE; 1198 gboolean stop_signal = FALSE;
1199 GtkTreeModel *store; 1199 GtkTreeModel *store;
1200 GtkTreeSelection *selection; 1200 GtkTreeSelection *selection;
1201 GList *slist; 1201 GList *slist;
1202 MatchFileData *mfd = NULL; 1202 MatchFileData *mfd = NULL;
1203 1203
1336 } 1336 }
1337 1337
1338 static gint search_window_keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) 1338 static gint search_window_keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
1339 { 1339 {
1340 SearchData *sd = data; 1340 SearchData *sd = data;
1341 gint stop_signal = FALSE; 1341 gboolean stop_signal = FALSE;
1342 1342
1343 if (event->state & GDK_CONTROL_MASK) 1343 if (event->state & GDK_CONTROL_MASK)
1344 { 1344 {
1345 stop_signal = TRUE; 1345 stop_signal = TRUE;
1346 switch (event->keyval) 1346 switch (event->keyval)
1571 } 1571 }
1572 1572
1573 static gint search_file_do_extra(SearchData *sd, FileData *fd, gint *match, 1573 static gint search_file_do_extra(SearchData *sd, FileData *fd, gint *match,
1574 gint *width, gint *height, gint *simval) 1574 gint *width, gint *height, gint *simval)
1575 { 1575 {
1576 gint new_data = FALSE; 1576 gboolean new_data = FALSE;
1577 gint tmatch = TRUE; 1577 gboolean tmatch = TRUE;
1578 gint tested = FALSE; 1578 gboolean tested = FALSE;
1579 1579
1580 if (!sd->img_cd) 1580 if (!sd->img_cd)
1581 { 1581 {
1582 gchar *cd_path; 1582 gchar *cd_path;
1583 1583
1682 } 1682 }
1683 1683
1684 static gint search_file_next(SearchData *sd) 1684 static gint search_file_next(SearchData *sd)
1685 { 1685 {
1686 FileData *fd; 1686 FileData *fd;
1687 gint match = TRUE; 1687 gboolean match = TRUE;
1688 gint tested = FALSE; 1688 gboolean tested = FALSE;
1689 gint extra_only = FALSE; 1689 gboolean extra_only = FALSE;
1690 gint width = 0; 1690 gint width = 0;
1691 gint height = 0; 1691 gint height = 0;
1692 gint sim = 0; 1692 gint sim = 0;
1693 1693
1694 if (!sd->search_file_list) return FALSE; 1694 if (!sd->search_file_list) return FALSE;
1815 GList *needle; 1815 GList *needle;
1816 GList *haystack; 1816 GList *haystack;
1817 1817
1818 if (sd->match_keywords == SEARCH_MATCH_ALL) 1818 if (sd->match_keywords == SEARCH_MATCH_ALL)
1819 { 1819 {
1820 gint found = TRUE; 1820 gboolean found = TRUE;
1821 1821
1822 needle = sd->search_keyword_list; 1822 needle = sd->search_keyword_list;
1823 while (needle && found) 1823 while (needle && found)
1824 { 1824 {
1825 found = FALSE; 1825 found = FALSE;
1835 1835
1836 match = found; 1836 match = found;
1837 } 1837 }
1838 else if (sd->match_keywords == SEARCH_MATCH_ANY) 1838 else if (sd->match_keywords == SEARCH_MATCH_ANY)
1839 { 1839 {
1840 gint found = FALSE; 1840 gboolean found = FALSE;
1841 1841
1842 needle = sd->search_keyword_list; 1842 needle = sd->search_keyword_list;
1843 while (needle && !found) 1843 while (needle && !found)
1844 { 1844 {
1845 haystack = list; 1845 haystack = list;
1854 1854
1855 match = found; 1855 match = found;
1856 } 1856 }
1857 else if (sd->match_keywords == SEARCH_MATCH_NONE) 1857 else if (sd->match_keywords == SEARCH_MATCH_NONE)
1858 { 1858 {
1859 gint found = FALSE; 1859 gboolean found = FALSE;
1860 1860
1861 needle = sd->search_keyword_list; 1861 needle = sd->search_keyword_list;
1862 while (needle && !found) 1862 while (needle && !found)
1863 { 1863 {
1864 haystack = list; 1864 haystack = list;
1989 1989
1990 if (g_list_find(sd->search_done_list, fd) == NULL) 1990 if (g_list_find(sd->search_done_list, fd) == NULL)
1991 { 1991 {
1992 GList *list = NULL; 1992 GList *list = NULL;
1993 GList *dlist = NULL; 1993 GList *dlist = NULL;
1994 gint success = FALSE; 1994 gboolean success = FALSE;
1995 1995
1996 sd->search_done_list = g_list_prepend(sd->search_done_list, fd); 1996 sd->search_done_list = g_list_prepend(sd->search_done_list, fd);
1997 1997
1998 if (sd->search_type == SEARCH_MATCH_NONE) 1998 if (sd->search_type == SEARCH_MATCH_NONE)
1999 { 1999 {