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

gEDA-bug: [ geda-Bugs-1699970 ] New Untitled page problem, and with opening new windows



Bugs item #1699970, was opened at 2007-04-13 13:08
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=818426&aid=1699970&group_id=161080

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: gschem
Group: CVS
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Peter Clifton (petercjclifton)
Assigned to: Nobody/Anonymous (nobody)
Summary: New Untitled page problem, and with opening new windows

Initial Comment:
When creating a new page, "pe" shortcut for example, the first execution of this command appears to do nothing.

This seems to be because the untitled page counter for the toplevel is at 0 (should be 1), then increments, tries to open "untitled-1.sch", and finds it already in the page list.

This is due to gschem.c munging the first "unknown" page opened into an untitled page, but not fixing the counter.

I believe the best fix is to remove the new page created in x_window_setup(..), and create it explicitly afterwards, either with x_window_open_untitled(..), or x_window_open(..). Gschem crashes if you aren't careful to create "some" page for it very soon afterwards, so watch out!

When opening a new window, you find two pages in the page manager, "unknown", and "untitled-0.sch". This is a symptom of the same bug.

(I've got some code which appears to work, poke me to extract it from my "PLAY" tree).


On a slightly unrelated note.. should the new window open with "untitled-1.sch", or a unique number for this running version of gschem? I played with gedit, and they number "Unsaved document ??" uniquely over all windows.

Since gschem actually tries to "open" the untitled page, if an "untitled-1.sch" exists in the filesystem, gschem will really open it. (Is this for autosave backups of an untitled schematic?)

Perhaps this (and certainly any auto-save conflict) suggests we ought to number untitled schematics uniquely, at least per directory).

Comments?


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=818426&aid=1699970&group_id=161080


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