The problem is when pcb builds the libraries on startup, the LibraryChanged function is called. This function only calls the show-library-window (sp?) function when it should first check to see if library_window is visible. I had made a new function called something like gboolean library_window_visible(void) and added the prototype to gui.h, but I was never able to get library_window->visible() to work.. I also tried library_window.visible() and that didnt work either. That is why I fell back on the dirty, incorrect, but functional way. gboolean dontopenlibwindowonstartup; This follows the naming convention of something that is dirty dirty! --- On Mon, 3/9/09, Peter Clifton <pc...@cam.ac.uk> wrote:
From: Peter Clifton <pc...@cam.ac.uk> Subject: Re: gEDA-user: pcb- no library dialog window on startup To: "gEDA user mailing list" <geda-user@moria.seul.org> Date: Monday, March 9, 2009, 12:47 PM A couple of points.. Please format the patches as a unified diff. (diff -u) These give better context as to the changes, and will include function names in the hunk headers. gboolean dontopenlibwindowonstartup; Doesn't follow PCB's variable naming convention (not that it explicitly has one - but clearly the above doesn't fit in.). I don't think the name actually reflects its usage wall anyway. You're using it as a one-shot to suppress showing the window the first time it is asked for. The variable is never initialised (I believe you're implicitly assuming / relying on the variable being zero'd in the BSS section of the executable, which isn't a given on all platforms / compilers. I've not dug into the problem at hand, but I can't quite see why you need a one-shot to suppress the first opening of this dialog. Why not patch the program so it doesn't attempt to open the dialog at startup? It seems that this patch would just introduce buggy behaviour if that root issue was addressed. -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) _______________________________________________ geda-user mailing list [1]geda-u...@moria.seul.org [2]http://www.seul.org/cgi-bin/mailman/listinfo/geda-user References 1. file://localhost/mc/compose?to=geda-u...@moria.seul.org 2. http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
_______________________________________________ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user