Hi Carlos,
[snip]
>> 2) I noticed that you now link gtk+ in gnetlist, gsymcheck and the other
>> programs. I understand why this is necessary, but is there a way to
>> not do this? Maybe delay the loading of the actual pixel data until
>> the last possible moment (via a flag that's only set if the program is
>> gschem) or move all the pixel loading code into gschem somehow?
>
>I thought you don't mind having all apps using gtk/glib, so I placed it
>there.
>It's fixed now in CVS. libgeda's o_picture_read will only initialize
>(only once) GDK if it's a non graphical app (toplevel->main_window ==
>NULL).
Thanks for the change, however it's not quite what I had in mind.
I can no longer link gnetlist/gsymcheck/gattrib, because the gdk_init in
libgeda/noweb/o_picture.nw is not found. Obviously gschem links properly.
$ gcc -Wall -g -O2 -o gnetlist i_vars.o g_netlist.o g_rc.o g_register.o
globals.o gnetlist.o parsecmd.o s_cpinlist.o s_net.o s_netlist.o s_netattrib.o
s_traverse.o s_rename.o s_hierarchy.o s_misc.o vams_misc.o -Wl,--export-dynamic
-L/home/ahvezda/geda/lib -lgeda -lguile -lguile-ltdl -lqthreads -lpthread
-lcrypt -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
/home/ahvezda/geda/lib/libgeda.so: undefined reference to `gdk_init'
The fix I had in mind was to call gdk_init only in gschem and then
move all the gdk_* calls out of libgeda/noweb/o_picture.nw. The other
apps (gnetlist etc...) when they encounter a picture simply should not
try to init/use the picture data. Now in gschem, since gdk_init has been
called and the gdk_* routines have been linked in, then yes, the picture
data should be initialized/used/manipulated etc...
The only reason I'm advocating this is because libgeda does not
currently depend on the libgtk* libraries at all, only libglib. As shown by:
$ pkg-config libgeda --libs
-Wl,--export-dynamic -L/home/ahvezda/geda/lib -lgeda -lguile -lguile-ltdl
-lqthreads -lpthread -lcrypt -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0
-ldl -lglib-2.0
I don't think that libgeda should depend on gdk_pixbuf either. There are
no gtk_* calls in the libgeda library.
If this is too painful, please let me know. I'm quite willing
to be flexible at this point in time and just say "forget it", all
gEDA/gaf programs should link against gtk+ (even CLI proggies...) Comments?
[snip]
>See the screenshots attached. I just placed three gschem's icons in a
>schematic and...
I'll take a look at these next... Thanks.
-Ales