comparison src/gtk/menu-items.c @ 499:39e9945288ea

2004-7-13 Brian Masney <masneyb@gftp.org> * lib/gftp.h lib/local.c lib/misc.c lib/protocols.c lib/rfc2068.c lib/rfc959.c lib/sshv2.c src/gtk/chmod_dialog.c src/gtk/delete_dialog.c src/gtk/dnd.c src/gtk/gftp-gtk.c src/gtk/gtkui_transfer.c src/gtk/menu-items.c src/gtk/misc-gtk.c src/gtk/view_dialog.c src/text/textui.c src/uicommon/gftpui.c src/uicommon/gftpuicallbacks.c - represent the file attributes as a mode_t variable instead of a character string
author masneyb
date Tue, 13 Jul 2004 20:17:42 +0000
parents 4376ffeab64e
children c6a6e908dbaf
comparison
equal deleted inserted replaced
498:76c4e4cd108e 499:39e9945288ea
214 while (templist != NULL) 214 while (templist != NULL)
215 { 215 {
216 tempfle = (gftp_file *) templist->data; 216 tempfle = (gftp_file *) templist->data;
217 if (tempfle->shown) 217 if (tempfle->shown)
218 { 218 {
219 if (tempfle->isdir) 219 if (S_ISDIR (tempfle->st_mode))
220 gtk_clist_unselect_row (GTK_CLIST (wdata->listbox), i, 0); 220 gtk_clist_unselect_row (GTK_CLIST (wdata->listbox), i, 0);
221 else 221 else
222 gtk_clist_select_row (GTK_CLIST (wdata->listbox), i, 0); 222 gtk_clist_select_row (GTK_CLIST (wdata->listbox), i, 0);
223 i++; 223 i++;
224 } 224 }
640 void 640 void
641 compare_windows (gpointer data) 641 compare_windows (gpointer data)
642 { 642 {
643 gftp_file * curfle, * otherfle; 643 gftp_file * curfle, * otherfle;
644 GList * curlist, * otherlist; 644 GList * curlist, * otherlist;
645 int row; 645 int row, curdir, othdir;
646 646
647 if (!check_status (_("Compare Windows"), &window2, 1, 0, 0, 1)) 647 if (!check_status (_("Compare Windows"), &window2, 1, 0, 0, 1))
648 return; 648 return;
649 649
650 deselectall (&window1); 650 deselectall (&window1);
669 { 669 {
670 otherlist = otherlist->next; 670 otherlist = otherlist->next;
671 continue; 671 continue;
672 } 672 }
673 673
674 curdir = S_ISDIR (curfle->st_mode);
675 othdir = S_ISDIR (otherfle->st_mode);
676
674 if (strcmp (otherfle->file, curfle->file) == 0 && 677 if (strcmp (otherfle->file, curfle->file) == 0 &&
675 otherfle->isdir == curfle->isdir && 678 curdir == othdir &&
676 (curfle->isdir || otherfle->size == curfle->size)) 679 (curdir || otherfle->size == curfle->size))
677 break; 680 break;
678 681
679 otherlist = otherlist->next; 682 otherlist = otherlist->next;
680 } 683 }
681 684
704 { 707 {
705 otherlist = otherlist->next; 708 otherlist = otherlist->next;
706 continue; 709 continue;
707 } 710 }
708 711
712 curdir = S_ISDIR (curfle->st_mode);
713 othdir = S_ISDIR (otherfle->st_mode);
714
709 if (strcmp (otherfle->file, curfle->file) == 0 && 715 if (strcmp (otherfle->file, curfle->file) == 0 &&
710 otherfle->isdir == curfle->isdir && 716 curdir == othdir &&
711 (curfle->isdir || otherfle->size == curfle->size)) 717 (curdir || otherfle->size == curfle->size))
712 break; 718 break;
713 719
714 otherlist = otherlist->next; 720 otherlist = otherlist->next;
715 } 721 }
716 722