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

RE: gEDA-user: gEDA user with problems



El sÃb, 11-11-2006 a las 15:51 -0800, Adrian Nania escribiÃ:
> Hola Carlos,

ÂHola! :-)

> I was talking about a HOWTO I started before the Ubuntu Edgy, on the Ubuntu Forums.
> This happened before learning how to install gEDA from the CD or from the CVS.
> I was down to hell and back with some PATH variables, dependencies, and personal mistakes.
> So the problem I had was not from any official gEDA site, you can not update that doc.
> I have modified the auto numbering part there, you can go to Ubuntu Forums and search "gEDA"

Ok. I thought you took the info from one of the wiki pages...

> A while ago I have received a response from Ales, related to library sorting:
> http://www.mail-archive.com/geda-user@xxxxxxxxxxxxxx/msg02081.html
> There was the story with some bad effects of rc keyword.
> I suspect to have the library alphabetically sorted I should not use the "rc" stuff.
> I do not know what that means, nor what to use instead of it to not have a scrambled library list.
> For the moment, I am still using my "work around".
[snip]

Try the attached patch (against CVS HEAD) and let me know if this issue
is fixed...

Thanks,

Carlos
Index: gschem/src/x_compselect.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_compselect.c,v
retrieving revision 1.8
diff -u -r1.8 x_compselect.c
--- gschem/src/x_compselect.c	13 Oct 2006 14:43:28 -0000	1.8
+++ gschem/src/x_compselect.c	12 Nov 2006 20:50:17 -0000
@@ -531,14 +530,14 @@
 compselect_create_child_model (void)
 {
   GtkTreeStore *store;
-  const GSList *directories, *dir; 
+  const GList *directories, *dir; 
 
   store = (GtkTreeStore*)gtk_tree_store_new (1,
                                              G_TYPE_STRING);
   
   /* populate component store */
   directories = s_clib_get_directories ();
-  for (dir = directories; dir != NULL; dir = g_slist_next (dir)) {
+  for (dir = directories; dir != NULL; dir = g_list_next (dir)) {
     GtkTreeIter iter, iter2;
     GSList *components, *comp;
 
Index: libgeda/include/prototype.h
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/include/prototype.h,v
retrieving revision 1.108
diff -u -r1.108 prototype.h
--- libgeda/include/prototype.h	1 Nov 2006 16:11:27 -0000	1.108
+++ libgeda/include/prototype.h	12 Nov 2006 20:50:18 -0000
@@ -497,7 +500,7 @@
 void s_clib_init (void);
 void s_clib_free (void);
 void s_clib_add_directory (const gchar *directory);
-const GSList* s_clib_get_directories ();
+const GList* s_clib_get_directories ();
 GSList* s_clib_get_files (const gchar *directory, const gchar *filter);
 const GSList* s_clib_search_basename (const gchar *basename);
 
Index: libgeda/src/s_clib.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/s_clib.c,v
retrieving revision 1.18
diff -u -r1.18 s_clib.c
--- libgeda/src/s_clib.c	5 Jul 2006 03:13:38 -0000	1.18
+++ libgeda/src/s_clib.c	12 Nov 2006 20:50:20 -0000
@@ -54,7 +54,7 @@
 
 void s_clib_free (void);
 
-static GSList *clib_directories = NULL;
+static GList *clib_directories = NULL;
 
 static GHashTable *clib_cache = NULL;
 
@@ -85,7 +85,7 @@
   g_free (key);
   if (value != NULL) {
     /* value is a singly-linked list of strings */
-    g_slist_foreach (value, (GFunc)g_free, NULL);
+    g_list_foreach (value, (GFunc)g_free, NULL);
     g_slist_free ((GSList*)value);
   }
 }
@@ -97,8 +97,8 @@
 void s_clib_free (void)
 {
   if (clib_directories != NULL) {
-    g_slist_foreach (clib_directories, (GFunc)g_free, NULL);
-    g_slist_free (clib_directories);
+    g_list_foreach (clib_directories, (GFunc)g_free, NULL);
+    g_list_free (clib_directories);
     clib_directories = NULL;
   }
 
@@ -119,14 +119,14 @@
 void s_clib_add_directory (const gchar *directory)
 {
   /* search for directory in clib_directories */
-  if (!g_slist_find_custom (clib_directories,
-                            directory,
-                            (GCompareFunc) g_strcasecmp))
+  if (!g_list_find_custom (clib_directories,
+			   directory,
+			   (GCompareFunc) g_strcasecmp))
   {
     /* directory not yet in the list of known directories */
     /* add directory to list */
-    clib_directories = g_slist_append (clib_directories,
-                                       g_strdup (directory));
+    clib_directories = g_list_append (clib_directories,
+				      g_strdup (directory));
   }
   
 }
@@ -141,7 +141,7 @@
  *  The returned value is owned by libgeda and must not be modified or freed.
  *
  */
-const GSList *s_clib_get_directories()
+const GList *s_clib_get_directories()
 {
   return clib_directories;
 }
@@ -162,9 +162,9 @@
   GSList *ret = NULL;
 
   /* check directory is in clib_directories */
-  if (g_slist_find_custom (clib_directories,
-                           directory,
-                           (GCompareFunc) g_strcasecmp) == NULL)
+  if (g_list_find_custom (clib_directories,
+			  directory,
+			  (GCompareFunc) g_strcasecmp) == NULL)
   {
     /* no, unknown directory: report an error */
     s_log_message ("Directory [%s] is not part of the component library\n",
@@ -218,7 +218,8 @@
  */
 const GSList *s_clib_search_basename(const gchar *basename)
 {
-  GSList *ret, *tmp;
+  GSList *ret; 
+  GList *tmp;
   
   /* first check if basename is in cache */
   ret = g_hash_table_lookup (clib_cache, basename);
@@ -228,7 +229,8 @@
   }
 
   /* looks like we have to search for basename in the library */
-  for (tmp = clib_directories; tmp != NULL; tmp = g_slist_next (tmp)) {
+  for (tmp = g_list_last(clib_directories); 
+       tmp != NULL; tmp = g_list_previous (tmp)) {
     gchar *dir_name  = (gchar*)tmp->data;
     gchar *file_name = g_strconcat (dir_name,
                                     G_DIR_SEPARATOR_S,

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