gEDA-dev: Simple DBUS binding to PCB actions
Peter Clifton
pcjc2 at cam.ac.uk
Wed Oct 4 19:01:43 EDT 2006
Hi,
The attached patch is something that I've been cooking for a few days
now. It implements a simple DBUS interface which Peter Brett designed
for calling PCB actions from another program.
Due to the need for a g_mainloop, this is implemented in the GTK+ HID.
After applying the patch, you need to run ./autogen.sh in the source
directory, as configure.ac and Makefile.am are changed.
A new option: ./configure --with-dbus is added, which works with the GTK
HID. For now, it is disabled per default, although in the future, I
would like to see it on by default if the GTK HID is selected.
Comments on my autoconf / automake bits are appreciated, as I'm not
super familiar with either. Also, it would be nice if someone WITHOUT
dbus installed could try and ensure that things work as expected when
configuring and building.
Can this go into CVS PCB for at some point? The changes made are very
local, so ought not to produce a big problem should they need to be
backed out.
It is quite simple really..
configure.ac | 32 ++++++++
src/hid/gtk/dbus.c | 158
+++++++++++++++++++++++++++++++++++++++++++
src/hid/gtk/dbus.h | 27 +++++++
src/hid/gtk/dbus.xml | 17 ++++
src/hid/gtk/gui-top-window.c | 8 ++
5 files changed, 240 insertions(+), 2 deletions(-)
It doesn't add return codes to any of the actions, and other than file
access error handling (which needs a return code mechanism), does all we
need for our project manager.
I tested that it works with and without dbus support (GTK hid), and
lesstif still compiles and runs fine. I haven't tried compiling either
on a computer without dbus.
Regards
Peter Clifton
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcb.g_dbus.patch
Type: text/x-patch
Size: 9497 bytes
Desc: not available
Url : http://www.seul.org/pipermail/geda-dev/attachments/20061005/fb13fe96/pcb.g_dbus.bin
More information about the geda-dev
mailing list