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

gEDA-cvs: CVS update: gdk-pixbuf-hacks.c



  User: ahvezda 
  Date: 06/08/06 12:45:31

  Modified:    .        gdk-pixbuf-hacks.c o_attrib.c o_complex_basic.c
                        o_picture.c s_basic.c s_toplevel.c
  Log:
  Applied Patch#1533798: Remove pre-GTK2 code from geda by Peter Brett.  Thanks.
  
  GTK+ 1.2.x specific code is now completely gone from gEDA/gaf. 
  
  
  
  
  Revision  Changes    Path
  1.2       +1 -4      eda/geda/gaf/libgeda/src/gdk-pixbuf-hacks.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: gdk-pixbuf-hacks.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/gdk-pixbuf-hacks.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- gdk-pixbuf-hacks.c	5 Jul 2006 03:13:38 -0000	1.1
  +++ gdk-pixbuf-hacks.c	6 Aug 2006 16:45:31 -0000	1.2
  @@ -21,11 +21,9 @@
   
   /* Taken from gtkam's sources */
   #include "config.h"
  -#ifndef HAS_GTK12
  +
   #include <gdk-pixbuf/gdk-pixbuf.h>
  -#endif
   
  -#ifndef HAS_GTK12
   /*! \def COPY90 */
   #define COPY90                                                          \
           if ((r2 < h1) && (c2 < w1)) {                                   \
  @@ -339,4 +337,3 @@
   
   	return dest;
   }
  -#endif
  
  
  
  1.39      +0 -52     eda/geda/gaf/libgeda/src/o_attrib.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_attrib.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_attrib.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -b -r1.38 -r1.39
  --- o_attrib.c	15 Jul 2006 23:37:00 -0000	1.38
  +++ o_attrib.c	6 Aug 2006 16:45:31 -0000	1.39
  @@ -892,13 +892,7 @@
   int o_attrib_get_name_value(char *string, char **name_ptr, char **value_ptr )
   {
     char *equal_ptr;
  -#ifdef HAS_GTK22
     char **str_array;
  -#else
  -  int attribute_found=FALSE;
  -  int i, j;
  -  char *name, *value;
  -#endif
   
     if (name_ptr == NULL || value_ptr == NULL) {
       return(FALSE);
  @@ -936,58 +930,12 @@
       return(FALSE);
     }
   
  -#ifdef HAS_GTK22  
  -
  -  /* can't use g_strsplit under glib/gtk+ 1.2 since it splits strings */
  -  /* incorrectly! */
     str_array = g_strsplit (string, "=", 2);
     
     *name_ptr = g_strdup(str_array[0]);
     *value_ptr = g_strdup(str_array[1]);
     g_strfreev(str_array);
   
  -#else
  -
  -  /* larger than needed... but this is okay for now. */
  -  *name_ptr  = g_strdup (string);
  -  *value_ptr = g_strdup (string);
  -
  -  /* for convenience sake */
  -  name = *name_ptr;
  -  value = *value_ptr;
  -
  -  /* get the name */
  -  i = 0;
  -  while(string[i] != '\0' && !attribute_found) {
  -    if (string[i] == '=') {
  -      attribute_found = TRUE;
  -    } else {
  -      name[i] = string[i];
  -      i++;
  -    }
  -  }
  -
  -  /* no = found */
  -  if (!attribute_found) {
  -    g_free(*name_ptr); *name_ptr = NULL; 
  -    g_free(*value_ptr); *value_ptr = NULL;
  -    return(FALSE);
  -  }
  -
  -  name[i] = '\0';
  -  i++; /* skip over the ='s */
  -
  -  j = 0;
  -  while(string[i] != '\0') {
  -    value[j] = string[i];
  -    i++;
  -    j++;
  -  }
  -
  -  value[j] = '\0';
  -
  -#endif
  -  
     if (*value_ptr && (*value_ptr)[0] == '\0') {
       s_log_message("Found an improper attribute: _%s_\n", string);
   #if 0 /* for now leak this memory till this is verified correct everywhere */
  
  
  
  1.27      +0 -10     eda/geda/gaf/libgeda/src/o_complex_basic.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_complex_basic.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_complex_basic.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -b -r1.26 -r1.27
  --- o_complex_basic.c	15 Jul 2006 20:49:52 -0000	1.26
  +++ o_complex_basic.c	6 Aug 2006 16:45:31 -0000	1.27
  @@ -83,9 +83,7 @@
           break;
   
         case(OBJ_PICTURE):
  -#ifndef HAS_GTK12
           get_picture_bounds(w_current, o_current->picture, &rleft, &rtop, &rright, &rbottom);
  -#endif
           break;
   
         case(OBJ_CIRCLE):
  @@ -177,9 +175,7 @@
           break;
   
         case(OBJ_PICTURE):
  -#ifndef HAS_GTK12
           get_picture_bounds(w_current, o_current->picture, &rleft, &rtop, &rright, &rbottom);
  -#endif
           break;
   
         case(OBJ_CIRCLE):
  @@ -263,9 +259,7 @@
           break;
   
         case(OBJ_PICTURE):
  -#ifndef HAS_GTK12
           world_get_picture_bounds(w_current, o_current->picture, &rleft, &rtop, &rright, &rbottom);
  -#endif
           break;
   
         case(OBJ_CIRCLE):
  @@ -1479,9 +1473,7 @@
           break;
   
         case(OBJ_PICTURE):
  -#ifndef HAS_GTK12
           o_picture_rotate_world(w_current, 0, 0, angle_change, o_current);
  -#endif
           break;
   
         case(OBJ_CIRCLE):
  @@ -1543,9 +1535,7 @@
           break;
   
         case(OBJ_PICTURE):
  -#ifndef HAS_GTK12
           o_picture_mirror_world(w_current, 0, 0, o_current);
  -#endif
           break;
   
         case(OBJ_CIRCLE):
  
  
  
  1.4       +2 -6      eda/geda/gaf/libgeda/src/o_picture.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_picture.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_picture.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- o_picture.c	15 Jul 2006 20:49:52 -0000	1.3
  +++ o_picture.c	6 Aug 2006 16:45:31 -0000	1.4
  @@ -26,11 +26,11 @@
   
   #include <gtk/gtk.h>
   #include <guile/gh.h>
  -#ifndef HAS_GTK12
  +
   #include <gdk/gdk.h>
   #include <gdk-pixbuf/gdk-pixbuf.h>
   #include <gdk-pixbuf/gdk-pixdata.h>
  -#endif
  +
   
   #include "defines.h"
   #include "struct.h"
  @@ -41,7 +41,6 @@
   
   #include "../include/prototype.h"
   
  -#ifndef HAS_GTK12
   /*! \brief Create picture OBJECT from character string.
    *  \par Function Description
    *  This function will get the description of a picture from the character
  @@ -146,13 +145,11 @@
     pixbuf = NULL;
   
     if (embedded == 0) {
  -#ifndef HAS_GTK12
       pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
       if (pixbuf == NULL) {
         fprintf(stderr, "Error loading picture from file: %s.\n", filename);
         s_log_message( "Error loading picture from file: %s.\n", filename);
       }
  -#endif  
     }
     else {
       GString *encoded_picture=g_string_new("");
  @@ -1157,5 +1154,4 @@
   
   	
   }
  -#endif
   
  
  
  
  1.24      +2 -2      eda/geda/gaf/libgeda/src/s_basic.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: s_basic.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/s_basic.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -b -r1.23 -r1.24
  --- s_basic.c	15 Jul 2006 20:49:52 -0000	1.23
  +++ s_basic.c	6 Aug 2006 16:45:31 -0000	1.24
  @@ -432,12 +432,12 @@
   
       if (o_current->picture) {
         /*	printf("sdeleting picture\n");*/
  -#ifndef HAS_GTK12
  +
         if (o_current->picture->original_picture)
   	g_object_unref(o_current->picture->original_picture);
         if (o_current->picture->displayed_picture)
   	g_object_unref(o_current->picture->displayed_picture);
  -#endif
  +
         if (o_current->picture->filename)
   	g_free(o_current->picture->filename);
         g_free(o_current->picture);
  
  
  
  1.4       +1 -2      eda/geda/gaf/libgeda/src/s_toplevel.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: s_toplevel.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/s_toplevel.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- s_toplevel.c	25 Jul 2006 00:45:32 -0000	1.3
  +++ s_toplevel.c	6 Aug 2006 16:45:31 -0000	1.4
  @@ -250,9 +250,8 @@
   
     toplevel->pfswindow = NULL;
     toplevel->pcfswindow = NULL;
  -#ifndef HAS_GTK12
  +
     toplevel->current_pixbuf = NULL;
  -#endif
     toplevel->pixbuf_filename = NULL;
     toplevel->pixbuf_wh_ratio = 0;
   
  
  
  


_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs