/[giftcurs]/giFTcurs/src/ui_transfer.c
ViewVC logotype

Diff of /giFTcurs/src/ui_transfer.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.259 by weinholt, Wed Nov 3 00:10:19 2004 UTC revision 1.260 by weinholt, Wed Nov 3 21:30:05 2004 UTC
# Line 33  Line 33 
33  #include "ui.h"  #include "ui.h"
34  #include "ui_draw.h"  #include "ui_draw.h"
35  #include "transfer.h"  #include "transfer.h"
 #include "get.h"  
36  #include "settings.h"  #include "settings.h"
37  #include "format.h"  #include "format.h"
38    
# Line 193  static int transfer_screen_handler(int k Line 192  static int transfer_screen_handler(int k
192                          refresh();                          refresh();
193                  }                  }
194                  return 1;                  return 1;
         case 'S':  
                 /* Search for new sources on all downloads at once. */  
                 for (i = 0; i < tree_children(&downloads)->num; i++) {  
                         t = list_index(tree_children(&downloads), i);  
                         if (t->transferred != t->filesize)  
                                 download_search(t);  
                 }  
                 update_downloads();  
                 refresh();  
                 return 1;  
195          }          }
196    
197          /* This is getting clearer, but still ugly... */          /* This is getting clearer, but still ugly... */
# Line 280  static int transfer_screen_handler(int k Line 269  static int transfer_screen_handler(int k
269                  update_func();                  update_func();
270                  refresh();                  refresh();
271                  return 1;                  return 1;
         case 's':  
                 /* Issue a new search if one is not already running. Also  
                    don't search if the download is finished. */  
                 if (active_tree == &uploads)  
                         break;  
                 if (t->transferred != t->filesize) {  
                         download_search(t);  
                         update_func();  
                         refresh();  
                 }  
                 return 1;  
272          case 'T':          case 'T':
273          case 't':          case 't':
274                  if (s) {                  if (s) {
# Line 555  static enum attr_type transfer_getattr(c Line 533  static enum attr_type transfer_getattr(c
533          if (!strcmp(key, "transferred"))          if (!strcmp(key, "transferred"))
534                  RETURN_LONG(t->transferred);                  RETURN_LONG(t->transferred);
535          if (!strcmp(key, "searching"))          if (!strcmp(key, "searching"))
536                  RETURN_INT(!!t->search_id);                  RETURN_INT(0);                  /* FIXME */
537          if (!strcmp(key, "expanded"))          if (!strcmp(key, "expanded"))
538                  RETURN_INT(t->tnode.expanded);                  RETURN_INT(t->tnode.expanded);
539          if (!strcmp(key, "sources"))          if (!strcmp(key, "sources"))
# Line 563  static enum attr_type transfer_getattr(c Line 541  static enum attr_type transfer_getattr(c
541          if (!strcmp(key, "status"))          if (!strcmp(key, "status"))
542                  RETURN_STR(_(t->status));                  RETURN_STR(_(t->status));
543          if (!strcmp(key, "active"))          if (!strcmp(key, "active"))
544                  RETURN_INT(t->id && !t->paused);                  RETURN_INT(t->active && !t->paused);
545          if (!strcmp(key, "eta"))          if (!strcmp(key, "eta"))
546                  RETURN_INT(t->bw.bandwidth ? (t->filesize - t->transferred) / t->bw.bandwidth : 0);                  RETURN_INT(t->bw.bandwidth ? (t->filesize - t->transferred) / t->bw.bandwidth : 0);
547          if (!strcmp(key, "upload"))          if (!strcmp(key, "upload"))

Legend:
Removed from v.1.259  
changed lines
  Added in v.1.260

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26