~ubuntu-branches/ubuntu/hardy/ncbi-tools6/hardy

« back to all changes in this revision

Viewing changes to desktop/bspview.c

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2007-10-26 19:27:01 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071026192701-qt697jomcoz75ftt
Tags: 6.1.20070822-2
* debian/control: set Homepage.
* debian/{control,makemenu,rules,*.desktop.in}: supply XDG desktop
  entries and icons for inherently graphical apps.  (Closes: #448031.)
* debian/{man.unused,old-blast-man,shlibs.local}: remove (obsolete
  cruft; shlibs.local contained only comments anyway.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
*
30
30
* Version Creation Date:   4/30/95
31
31
*
32
 
* $Revision: 6.139 $
 
32
* $Revision: 6.141 $
33
33
*
34
34
* File Description: 
35
35
*
84
84
extern ForM smartBioseqViewForm;
85
85
ForM smartBioseqViewForm = NULL;
86
86
 
 
87
#define MAX_VIEWABLE_TARGET_SEQUENCES 60000
87
88
 
88
89
static void LookForGenomeTag (SeqEntryPtr sep, Pointer mydata, Int4 index, Int2 indent)
89
90
 
1130
1131
 
1131
1132
  bfp = (BioseqViewFormPtr) mydata;
1132
1133
  if (bfp != NULL && sep != NULL && sep->choice == 1 && sep->data.ptrvalue != NULL) {
1133
 
    if (bfp->workingCount > 32000) return; /* alists use Int2 indexing, so protect here */
 
1134
    if (bfp->workingCount > MAX_VIEWABLE_TARGET_SEQUENCES) return; /* don't want list to get too long */
1134
1135
    bsp = (BioseqPtr) sep->data.ptrvalue;
1135
1136
    sip = SeqIdFindWorst (bsp->id);
1136
1137
    SeqIdWrite (sip, str, PRINTID_REPORT, sizeof (str));
1193
1194
            PopupItem (bfp->targetControl, ap->name);
1194
1195
          }
1195
1196
        } else {
1196
 
          if (count < 32000) {
 
1197
          if (count < MAX_VIEWABLE_TARGET_SEQUENCES) {
1197
1198
            ListItem (bfp->targetControl, ap->name);
1198
1199
          }
1199
1200
        }
2041
2042
  }
2042
2043
}
2043
2044
 
 
2045
extern BioseqPtr GetBioseqViewTarget (BaseFormPtr fp)
 
2046
 
 
2047
{
 
2048
  BioseqViewFormPtr  bfp;
 
2049
  BioseqPtr          bsp = NULL;
 
2050
  Int2               val;
 
2051
  SeqEntryPtr        sep;
 
2052
 
 
2053
  bfp = (BioseqViewFormPtr) fp;
 
2054
  if (bfp == NULL || bfp->targetControl == NULL) return NULL;
 
2055
 
 
2056
  val = GetValue (bfp->targetControl);
 
2057
  if (val > 1) {
 
2058
    val--;
 
2059
    sep = GetTopSeqEntryForEntityID (bfp->input_entityID);
 
2060
    if (sep != NULL) {
 
2061
      sep = FindNthSequinEntry (sep, val);
 
2062
      if (sep != NULL && sep->choice == 1 && sep->data.ptrvalue != NULL) {
 
2063
        bsp = (BioseqPtr) sep->data.ptrvalue;
 
2064
      }
 
2065
    }
 
2066
  }
 
2067
  return bsp;
 
2068
}
 
2069
 
2044
2070
extern BioseqViewPtr GetBioseqViewPtrFromBaseFormPtr (BaseFormPtr fp)
2045
2071
 
2046
2072
{