Mercurial > gftp.yaz
diff 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 |
line wrap: on
line diff
--- a/src/gtk/menu-items.c Tue Jul 13 02:44:35 2004 +0000 +++ b/src/gtk/menu-items.c Tue Jul 13 20:17:42 2004 +0000 @@ -216,7 +216,7 @@ tempfle = (gftp_file *) templist->data; if (tempfle->shown) { - if (tempfle->isdir) + if (S_ISDIR (tempfle->st_mode)) gtk_clist_unselect_row (GTK_CLIST (wdata->listbox), i, 0); else gtk_clist_select_row (GTK_CLIST (wdata->listbox), i, 0); @@ -642,7 +642,7 @@ { gftp_file * curfle, * otherfle; GList * curlist, * otherlist; - int row; + int row, curdir, othdir; if (!check_status (_("Compare Windows"), &window2, 1, 0, 0, 1)) return; @@ -671,9 +671,12 @@ continue; } + curdir = S_ISDIR (curfle->st_mode); + othdir = S_ISDIR (otherfle->st_mode); + if (strcmp (otherfle->file, curfle->file) == 0 && - otherfle->isdir == curfle->isdir && - (curfle->isdir || otherfle->size == curfle->size)) + curdir == othdir && + (curdir || otherfle->size == curfle->size)) break; otherlist = otherlist->next; @@ -706,9 +709,12 @@ continue; } + curdir = S_ISDIR (curfle->st_mode); + othdir = S_ISDIR (otherfle->st_mode); + if (strcmp (otherfle->file, curfle->file) == 0 && - otherfle->isdir == curfle->isdir && - (curfle->isdir || otherfle->size == curfle->size)) + curdir == othdir && + (curdir || otherfle->size == curfle->size)) break; otherlist = otherlist->next;