[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: o_picture.nw



  User: cnieves 
  Date: 05/02/22 14:53:33

  Modified:    .        o_picture.nw
  Log:
  Initialize GDK in libgeda instead of the app if it's a non-graphical app.
  
  
  
  
  Revision  Changes    Path
  1.3       +9 -0      eda/geda/devel/libgeda/noweb/o_picture.nw
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_picture.nw
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/libgeda/noweb/o_picture.nw,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- o_picture.nw	21 Feb 2005 03:04:43 -0000	1.2
  +++ o_picture.nw	22 Feb 2005 19:53:33 -0000	1.3
  @@ -102,6 +102,15 @@
     gchar buffer[MAX_TEXT_LINE_LENGTH]; 
     gchar *filename;
     GdkPixbuf *pixbuf;
  +  static char gdk_initialized=0;
  +
  +  /* Initialize GDK first if it isn't a graphic app */
  +  /* i.e: it has no main window */
  +  if ( (w_current->main_window == NULL) &&
  +       (gdk_initialized == 0)) {
  +    gdk_init(NULL, NULL);
  +    gdk_initialized = 1;
  +  }
   
     num_conv = sscanf(buf, "%c %d %d %d %d %d %c %c\n",
   	 &type, &x1, &y1, &width, &height, &angle, &mirrored, &embedded);