comparison src/pan-item.c @ 1434:b106af9689db

More gboolean.
author zas_
date Sat, 14 Mar 2009 20:07:23 +0000
parents fe4da037be21
children 956aab097ea7
comparison
equal deleted inserted replaced
1433:b4ad1d201279 1434:b106af9689db
720 } 720 }
721 721
722 /* when ignore_case and partial are TRUE, path should be converted to lower case */ 722 /* when ignore_case and partial are TRUE, path should be converted to lower case */
723 static GList *pan_item_find_by_path_l(GList *list, GList *search_list, 723 static GList *pan_item_find_by_path_l(GList *list, GList *search_list,
724 PanItemType type, const gchar *path, 724 PanItemType type, const gchar *path,
725 gint ignore_case, gint partial) 725 gboolean ignore_case, gboolean partial)
726 { 726 {
727 GList *work; 727 GList *work;
728 728
729 work = g_list_last(search_list); 729 work = g_list_last(search_list);
730 while (work) 730 while (work)
732 PanItem *pi; 732 PanItem *pi;
733 733
734 pi = work->data; 734 pi = work->data;
735 if ((pi->type == type || type == PAN_ITEM_NONE) && pi->fd) 735 if ((pi->type == type || type == PAN_ITEM_NONE) && pi->fd)
736 { 736 {
737 gint match = FALSE; 737 gboolean match = FALSE;
738 738
739 if (path[0] == G_DIR_SEPARATOR) 739 if (path[0] == G_DIR_SEPARATOR)
740 { 740 {
741 if (pi->fd->path && strcmp(path, pi->fd->path) == 0) match = TRUE; 741 if (pi->fd->path && strcmp(path, pi->fd->path) == 0) match = TRUE;
742 } 742 }
775 return list; 775 return list;
776 } 776 }
777 777
778 /* when ignore_case and partial are TRUE, path should be converted to lower case */ 778 /* when ignore_case and partial are TRUE, path should be converted to lower case */
779 GList *pan_item_find_by_path(PanWindow *pw, PanItemType type, const gchar *path, 779 GList *pan_item_find_by_path(PanWindow *pw, PanItemType type, const gchar *path,
780 gint ignore_case, gint partial) 780 gboolean ignore_case, gboolean partial)
781 { 781 {
782 GList *list = NULL; 782 GList *list = NULL;
783 783
784 if (!path) return NULL; 784 if (!path) return NULL;
785 if (partial && path[0] == G_DIR_SEPARATOR) return NULL; 785 if (partial && path[0] == G_DIR_SEPARATOR) return NULL;
789 789
790 return g_list_reverse(list); 790 return g_list_reverse(list);
791 } 791 }
792 792
793 GList *pan_item_find_by_fd(PanWindow *pw, PanItemType type, FileData *fd, 793 GList *pan_item_find_by_fd(PanWindow *pw, PanItemType type, FileData *fd,
794 gint ignore_case, gint partial) 794 gboolean ignore_case, gboolean partial)
795 { 795 {
796 if (!fd) return NULL; 796 if (!fd) return NULL;
797 return pan_item_find_by_path(pw, type, fd->path, ignore_case, partial); 797 return pan_item_find_by_path(pw, type, fd->path, ignore_case, partial);
798 } 798 }
799 799