Difference for crossedit/App.c from version 1.8 to 1.9


version 1.8 version 1.9
Line 69
 
Line 69
  * 0.91.9 - moved to start of file - needed for ReadPixmaps function.   * 0.91.9 - moved to start of file - needed for ReadPixmaps function.
  */   */
 XColor exactcolor, discolor[13];  XColor exactcolor, discolor[13];
 Colormap colormap;  Colormap colormap=NULL;
   
   
 /**********************************************************************  /**********************************************************************
Line 824
 
Line 824
     InitializeColors(XtDisplay(self->shell));      InitializeColors(XtDisplay(self->shell));
   
     /* Default */      /* Default */
     displaymode=Dm_Bitmap;      displaymode=Dm_Png;
 #ifdef HAVE_LIBXPM  
     if (self->res.useColorPixmaps) displaymode=Dm_Pixmap;  
 #endif  
 #ifdef HAVE_LIBPNG  
     if (self->res.usePng) displaymode=Dm_Png;  
 #endif  
   
     if (displaymode==Dm_Png)   
  FontSize=32;   FontSize=32;
     else  
  FontSize=24;  
     CnvInitialize(self->shell);      CnvInitialize(self->shell);
   
   
Line 854
 
Line 845
      fprintf(stderr,"Not enough space in colormap - switch colormap.\n");       fprintf(stderr,"Not enough space in colormap - switch colormap.\n");
 /*     exit(1);*/  /*     exit(1);*/
     }      }
       if (colormap)
     XtVaSetValues(self->shell, XtNcolormap, colormap, NULL);      XtVaSetValues(self->shell, XtNcolormap, colormap, NULL);
     AppUpdate(self);      AppUpdate(self);
     return self;      return self;
Line 1015
 
Line 1007
 }  }
   
   
 char PixelFromAlias(char *name) {  
   int i;  
   for(i=0;i<13;i++)  
     if(!strcmp(name,colorname[i][0]))  
       return discolor[i].pixel;  
   LOG(llevError,"Unknown color: %s\n",name);  
   return 0;  
 }  
   
 void  InitializeColors (Display *dpy)  void  InitializeColors (Display *dpy)
 {  {
     int i;      return; /* this function does nothing anymore */
     int private=0;  
   
     colormap = DefaultColormap (dpy, DefaultScreen (dpy));  
     for (i = 0; i < 13; i++) {  
  if (!XLookupColor (dpy, colormap, colorname[i][1], &exactcolor,  
      &discolor[i])) {  
      die ("Can't find color.");  
  }  
  if (!XAllocColor (dpy, colormap, &discolor[i])) {  
      if (!private) {  
  LOG(llevDebug,"Switching to a private colormap.\n");  
  colormap=XCopyColormapAndFree(dpy, colormap);  
  private=1;  
  if (!XAllocColor (dpy, colormap, &discolor[i]))  
      die ("Can't allocate colors.");  
      }  
      else   
  die ("Can't allocate colors.");  
  }  
     }  
 }  }
   
 /*  /*


Legend:
line(s) removed in v.1.8 
line(s) changed
 line(s) added in v.1.9

File made using version 1.98 of cvs2html by leaf at 2011-07-21 19:48