From 667418327423ba116d24751926a95a2f1235849c Mon Sep 17 00:00:00 2001 From: Ricardo Markiewicz Date: Tue, 18 Nov 2003 17:20:48 +0000 Subject: [PATCH] * Se modifica la estructura de directorios : src include dialogs y pixmaps * Se generan Makefiles.am para cada directorio Bien, ahora el constructor ya se compila e instala utilizando autoconf y automake. Para compilar la primera vez : #> aclocal #> autoconf #> automake -a Con eso se crean loa Makefile.in en cada directorio y el script confugure. El programa debe ser instalado ahora para poder ser usado. Cuando se corre configure, por default se toma como path de instalacion el /usr/local (seria el PREFIX). El ejecutable queda en PREFIX/bin y los datos en : * dialogos (.glade e imagenes que tienen definido el .glade adentro ) : PREFIX/share/plaqui-constructor/dialogs * pixmaps : PREFIX/share/plaqui-constructor/pixmaps El codigo fue adaptado para que busque las cosas en esos directorio, por eso sin instalar no va a funcionar el programa. Si se quiere cambiar el /usr/local por otro dir, se le debe pasar al configure : #>./configure --prefix=/path/to/install Yo por ejemplo lo tengo asi : #>./configure --prefix=/home/gazer/local para tener un directorio de prueba (local debe ser creado) ... bueno, cualquier duda por mail !! --- Constructor/Makefile | 20 ------- Constructor/Makefile.am | 3 + Constructor/configure.in | 31 ++++++++++ Constructor/dialogs/Makefile.am | 6 ++ Constructor/{ => dialogs}/constructor.glade | 0 Constructor/{ => dialogs}/constructor.gladep | 0 Constructor/{ => include}/and.h | 0 Constructor/{ => include}/cistern.h | 0 Constructor/{ => include}/cisternptywnd.h | 0 Constructor/{ => include}/conduct.h | 0 Constructor/{ => include}/constructor.h | 0 Constructor/{ => include}/drain.h | 0 Constructor/{ => include}/exclusa.h | 0 Constructor/{ => include}/exclusaptywnd.h | 0 Constructor/{ => include}/item.h | 0 Constructor/{ => include}/itemptywnd.h | 0 Constructor/{ => include}/not.h | 0 Constructor/{ => include}/or.h | 0 Constructor/{ => include}/propertywnd.h | 0 Constructor/{ => include}/pump.h | 0 Constructor/{ => include}/pumpptywnd.h | 0 Constructor/{ => include}/splitter.h | 0 Constructor/{ => include}/union.h | 0 Constructor/{ => include}/workplace.h | 0 Constructor/pixmaps/Makefile.am | 56 +++++++++++++++++++ Constructor/{ => pixmaps}/and_e.png | Bin Constructor/{ => pixmaps}/and_n.png | Bin Constructor/{ => pixmaps}/and_o.png | Bin Constructor/{ => pixmaps}/and_s.png | Bin Constructor/{ => pixmaps}/bomba_e.png | Bin Constructor/{ => pixmaps}/bomba_null.png | Bin Constructor/{ => pixmaps}/bomba_o.png | Bin Constructor/{ => pixmaps}/canio_n.png | Bin Constructor/{ => pixmaps}/canio_s.png | Bin Constructor/{ => pixmaps}/codo_e.png | Bin Constructor/{ => pixmaps}/codo_n.png | Bin Constructor/{ => pixmaps}/codo_o.png | Bin Constructor/{ => pixmaps}/codo_s.png | Bin Constructor/{ => pixmaps}/drain_e.png | Bin Constructor/{ => pixmaps}/drain_n.png | Bin Constructor/{ => pixmaps}/drain_o.png | Bin Constructor/{ => pixmaps}/drain_s.png | Bin Constructor/{ => pixmaps}/exclusa_h.png | Bin Constructor/{ => pixmaps}/exclusa_s.png | Bin Constructor/{ => pixmaps}/ico_bomba.png | Bin Constructor/{ => pixmaps}/ico_canio.png | Bin Constructor/{ => pixmaps}/ico_codo.png | Bin Constructor/{ => pixmaps}/ico_exclusa.png | Bin Constructor/{ => pixmaps}/ico_tanque.png | Bin Constructor/{ => pixmaps}/ico_y.png | Bin Constructor/{ => pixmaps}/not_e.png | Bin Constructor/{ => pixmaps}/not_n.png | Bin Constructor/{ => pixmaps}/not_o.png | Bin Constructor/{ => pixmaps}/not_s.png | Bin Constructor/{ => pixmaps}/null.png | Bin Constructor/{ => pixmaps}/or_e.png | Bin Constructor/{ => pixmaps}/or_n.png | Bin Constructor/{ => pixmaps}/or_o.png | Bin Constructor/{ => pixmaps}/or_s.png | Bin Constructor/{ => pixmaps}/tanque_e.png | Bin Constructor/{ => pixmaps}/tanque_null.png | Bin Constructor/{ => pixmaps}/tanque_o.png | Bin Constructor/{ => pixmaps}/y_e.png | Bin Constructor/{ => pixmaps}/y_n.png | Bin Constructor/{ => pixmaps}/y_o.png | Bin Constructor/{ => pixmaps}/y_s.png | Bin Constructor/src/Makefile.am | 32 +++++++++++ Constructor/{ => src}/and.cpp | 10 ++-- Constructor/{ => src}/cistern.cpp | 8 +-- Constructor/{ => src}/cisternptywnd.cpp | 2 +- Constructor/{ => src}/conduct.cpp | 6 +- Constructor/{ => src}/constructor.cpp | 20 +++---- Constructor/{ => src}/drain.cpp | 10 ++-- Constructor/{ => src}/exclusa.cpp | 8 +-- Constructor/{ => src}/exclusaptywnd.cpp | 0 Constructor/{ => src}/item.cpp | 2 +- Constructor/{ => src}/itemptywnd.cpp | 0 Constructor/{ => src}/main.cpp | 2 +- Constructor/{ => src}/not.cpp | 10 ++-- Constructor/{ => src}/or.cpp | 10 ++-- Constructor/{ => src}/propertywnd.cpp | 0 Constructor/{ => src}/pump.cpp | 8 +-- Constructor/{ => src}/pumpptywnd.cpp | 2 +- Constructor/{ => src}/splitter.cpp | 10 ++-- Constructor/{ => src}/union.cpp | 10 ++-- Constructor/{ => src}/workplace.cpp | 2 +- 86 files changed, 188 insertions(+), 80 deletions(-) delete mode 100644 Constructor/Makefile create mode 100644 Constructor/Makefile.am create mode 100644 Constructor/configure.in create mode 100644 Constructor/dialogs/Makefile.am rename Constructor/{ => dialogs}/constructor.glade (100%) rename Constructor/{ => dialogs}/constructor.gladep (100%) rename Constructor/{ => include}/and.h (100%) rename Constructor/{ => include}/cistern.h (100%) rename Constructor/{ => include}/cisternptywnd.h (100%) rename Constructor/{ => include}/conduct.h (100%) rename Constructor/{ => include}/constructor.h (100%) rename Constructor/{ => include}/drain.h (100%) rename Constructor/{ => include}/exclusa.h (100%) rename Constructor/{ => include}/exclusaptywnd.h (100%) rename Constructor/{ => include}/item.h (100%) rename Constructor/{ => include}/itemptywnd.h (100%) rename Constructor/{ => include}/not.h (100%) rename Constructor/{ => include}/or.h (100%) rename Constructor/{ => include}/propertywnd.h (100%) rename Constructor/{ => include}/pump.h (100%) rename Constructor/{ => include}/pumpptywnd.h (100%) rename Constructor/{ => include}/splitter.h (100%) rename Constructor/{ => include}/union.h (100%) rename Constructor/{ => include}/workplace.h (100%) create mode 100644 Constructor/pixmaps/Makefile.am rename Constructor/{ => pixmaps}/and_e.png (100%) rename Constructor/{ => pixmaps}/and_n.png (100%) rename Constructor/{ => pixmaps}/and_o.png (100%) rename Constructor/{ => pixmaps}/and_s.png (100%) rename Constructor/{ => pixmaps}/bomba_e.png (100%) rename Constructor/{ => pixmaps}/bomba_null.png (100%) rename Constructor/{ => pixmaps}/bomba_o.png (100%) rename Constructor/{ => pixmaps}/canio_n.png (100%) rename Constructor/{ => pixmaps}/canio_s.png (100%) rename Constructor/{ => pixmaps}/codo_e.png (100%) rename Constructor/{ => pixmaps}/codo_n.png (100%) rename Constructor/{ => pixmaps}/codo_o.png (100%) rename Constructor/{ => pixmaps}/codo_s.png (100%) rename Constructor/{ => pixmaps}/drain_e.png (100%) rename Constructor/{ => pixmaps}/drain_n.png (100%) rename Constructor/{ => pixmaps}/drain_o.png (100%) rename Constructor/{ => pixmaps}/drain_s.png (100%) rename Constructor/{ => pixmaps}/exclusa_h.png (100%) rename Constructor/{ => pixmaps}/exclusa_s.png (100%) rename Constructor/{ => pixmaps}/ico_bomba.png (100%) rename Constructor/{ => pixmaps}/ico_canio.png (100%) rename Constructor/{ => pixmaps}/ico_codo.png (100%) rename Constructor/{ => pixmaps}/ico_exclusa.png (100%) rename Constructor/{ => pixmaps}/ico_tanque.png (100%) rename Constructor/{ => pixmaps}/ico_y.png (100%) rename Constructor/{ => pixmaps}/not_e.png (100%) rename Constructor/{ => pixmaps}/not_n.png (100%) rename Constructor/{ => pixmaps}/not_o.png (100%) rename Constructor/{ => pixmaps}/not_s.png (100%) rename Constructor/{ => pixmaps}/null.png (100%) rename Constructor/{ => pixmaps}/or_e.png (100%) rename Constructor/{ => pixmaps}/or_n.png (100%) rename Constructor/{ => pixmaps}/or_o.png (100%) rename Constructor/{ => pixmaps}/or_s.png (100%) rename Constructor/{ => pixmaps}/tanque_e.png (100%) rename Constructor/{ => pixmaps}/tanque_null.png (100%) rename Constructor/{ => pixmaps}/tanque_o.png (100%) rename Constructor/{ => pixmaps}/y_e.png (100%) rename Constructor/{ => pixmaps}/y_n.png (100%) rename Constructor/{ => pixmaps}/y_o.png (100%) rename Constructor/{ => pixmaps}/y_s.png (100%) create mode 100644 Constructor/src/Makefile.am rename Constructor/{ => src}/and.cpp (84%) rename Constructor/{ => src}/cistern.cpp (93%) rename Constructor/{ => src}/cisternptywnd.cpp (95%) rename Constructor/{ => src}/conduct.cpp (95%) rename Constructor/{ => src}/constructor.cpp (93%) rename Constructor/{ => src}/drain.cpp (88%) rename Constructor/{ => src}/exclusa.cpp (94%) rename Constructor/{ => src}/exclusaptywnd.cpp (100%) rename Constructor/{ => src}/item.cpp (96%) rename Constructor/{ => src}/itemptywnd.cpp (100%) rename Constructor/{ => src}/main.cpp (86%) rename Constructor/{ => src}/not.cpp (84%) rename Constructor/{ => src}/or.cpp (75%) rename Constructor/{ => src}/propertywnd.cpp (100%) rename Constructor/{ => src}/pump.cpp (91%) rename Constructor/{ => src}/pumpptywnd.cpp (95%) rename Constructor/{ => src}/splitter.cpp (94%) rename Constructor/{ => src}/union.cpp (94%) rename Constructor/{ => src}/workplace.cpp (96%) diff --git a/Constructor/Makefile b/Constructor/Makefile deleted file mode 100644 index 4347391..0000000 --- a/Constructor/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Makefile temporal -# -# $Id$ -# - -CXXFLAGS=-Wall -g `pkg-config --cflags libglademm-2.0` -LDFLAGS=`pkg-config --libs libglademm-2.0` - -TARGETS=main - -all: $(TARGETS) - -h_files=$(wildcard *.h) -cpp_files=$(wildcard *.cpp) -o_files=$(cpp_files:.cpp=.o) - -main: $(o_files) - -clean: - rm -f $(TARGETS) $(o_files) diff --git a/Constructor/Makefile.am b/Constructor/Makefile.am new file mode 100644 index 0000000..82816df --- /dev/null +++ b/Constructor/Makefile.am @@ -0,0 +1,3 @@ + +SUBDIRS = src dialogs pixmaps + diff --git a/Constructor/configure.in b/Constructor/configure.in new file mode 100644 index 0000000..82c7e61 --- /dev/null +++ b/Constructor/configure.in @@ -0,0 +1,31 @@ +dnl Process this file with autoconf to produce a configure script. + +AC_INIT(configure.in) +AM_INIT_AUTOMAKE(plaqui_constructor, 0.1) +AM_MAINTAINER_MODE + +AC_ISC_POSIX +AC_PROG_CXX +AM_PROG_CC_STDC +AC_HEADER_STDC + +## pkg_modules="libgnomeui-2.0" +PKG_CHECK_MODULES(PACKAGE, + gtkmm-2.0 >= 2.0.0 \ + libglademm-2.0 >= 2.0.0) + +AC_SUBST(PACKAGE_CFLAGS) +AC_SUBST(PACKAGE_LIBS) + +AC_OUTPUT([ +Makefile +dialogs/Makefile +pixmaps/Makefile +src/Makefile +]) + +echo +echo "Todo listo. Ahora para compilar solo ejecute make" +echo +echo "The PlaQui Development Team" + diff --git a/Constructor/dialogs/Makefile.am b/Constructor/dialogs/Makefile.am new file mode 100644 index 0000000..82f9dac --- /dev/null +++ b/Constructor/dialogs/Makefile.am @@ -0,0 +1,6 @@ +plaquidir = $(datadir)/plaqui-constructor/dialogs + +plaqui_DATA = constructor.glade + +EXTRA_DIST = $(plaqui_DATA) + diff --git a/Constructor/constructor.glade b/Constructor/dialogs/constructor.glade similarity index 100% rename from Constructor/constructor.glade rename to Constructor/dialogs/constructor.glade diff --git a/Constructor/constructor.gladep b/Constructor/dialogs/constructor.gladep similarity index 100% rename from Constructor/constructor.gladep rename to Constructor/dialogs/constructor.gladep diff --git a/Constructor/and.h b/Constructor/include/and.h similarity index 100% rename from Constructor/and.h rename to Constructor/include/and.h diff --git a/Constructor/cistern.h b/Constructor/include/cistern.h similarity index 100% rename from Constructor/cistern.h rename to Constructor/include/cistern.h diff --git a/Constructor/cisternptywnd.h b/Constructor/include/cisternptywnd.h similarity index 100% rename from Constructor/cisternptywnd.h rename to Constructor/include/cisternptywnd.h diff --git a/Constructor/conduct.h b/Constructor/include/conduct.h similarity index 100% rename from Constructor/conduct.h rename to Constructor/include/conduct.h diff --git a/Constructor/constructor.h b/Constructor/include/constructor.h similarity index 100% rename from Constructor/constructor.h rename to Constructor/include/constructor.h diff --git a/Constructor/drain.h b/Constructor/include/drain.h similarity index 100% rename from Constructor/drain.h rename to Constructor/include/drain.h diff --git a/Constructor/exclusa.h b/Constructor/include/exclusa.h similarity index 100% rename from Constructor/exclusa.h rename to Constructor/include/exclusa.h diff --git a/Constructor/exclusaptywnd.h b/Constructor/include/exclusaptywnd.h similarity index 100% rename from Constructor/exclusaptywnd.h rename to Constructor/include/exclusaptywnd.h diff --git a/Constructor/item.h b/Constructor/include/item.h similarity index 100% rename from Constructor/item.h rename to Constructor/include/item.h diff --git a/Constructor/itemptywnd.h b/Constructor/include/itemptywnd.h similarity index 100% rename from Constructor/itemptywnd.h rename to Constructor/include/itemptywnd.h diff --git a/Constructor/not.h b/Constructor/include/not.h similarity index 100% rename from Constructor/not.h rename to Constructor/include/not.h diff --git a/Constructor/or.h b/Constructor/include/or.h similarity index 100% rename from Constructor/or.h rename to Constructor/include/or.h diff --git a/Constructor/propertywnd.h b/Constructor/include/propertywnd.h similarity index 100% rename from Constructor/propertywnd.h rename to Constructor/include/propertywnd.h diff --git a/Constructor/pump.h b/Constructor/include/pump.h similarity index 100% rename from Constructor/pump.h rename to Constructor/include/pump.h diff --git a/Constructor/pumpptywnd.h b/Constructor/include/pumpptywnd.h similarity index 100% rename from Constructor/pumpptywnd.h rename to Constructor/include/pumpptywnd.h diff --git a/Constructor/splitter.h b/Constructor/include/splitter.h similarity index 100% rename from Constructor/splitter.h rename to Constructor/include/splitter.h diff --git a/Constructor/union.h b/Constructor/include/union.h similarity index 100% rename from Constructor/union.h rename to Constructor/include/union.h diff --git a/Constructor/workplace.h b/Constructor/include/workplace.h similarity index 100% rename from Constructor/workplace.h rename to Constructor/include/workplace.h diff --git a/Constructor/pixmaps/Makefile.am b/Constructor/pixmaps/Makefile.am new file mode 100644 index 0000000..7e19fb6 --- /dev/null +++ b/Constructor/pixmaps/Makefile.am @@ -0,0 +1,56 @@ +plaquiimgdir = $(datadir)/plaqui-constructor/pixmaps +plaquidlgdir = $(datadir)/plaqui-constructor/dialogs + +# Imagenes que se cargar "on the fly" +plaquiimg_DATA = \ +and_e.png \ +and_n.png \ +and_o.png \ +and_s.png \ +bomba_e.png \ +bomba_null.png \ +bomba_o.png \ +canio_n.png \ +canio_s.png \ +codo_e.png \ +codo_n.png \ +codo_o.png \ +codo_s.png \ +drain_e.png \ +drain_n.png \ +drain_o.png \ +drain_s.png \ +exclusa_h.png \ +exclusa_s.png \ +not_e.png \ +not_n.png \ +not_o.png \ +not_s.png \ +null.png \ +or_e.png \ +or_n.png \ +or_o.png \ +or_s.png \ +tanque_e.png \ +tanque_null.png \ +tanque_o.png \ +y_e.png \ +y_n.png \ +y_o.png \ +y_s.png + +# Imagenes que necesita el dialogo, deben estar en el mismo +# directorio que el .glade +plaquidlg_DATA = ico_bomba.png \ +ico_canio.png \ +ico_codo.png \ +ico_exclusa.png \ +ico_tanque.png \ +ico_y.png \ +not_e.png \ +drain_n.png \ +and_e.png \ +or_e.png + +EXTRA_DIST = $(plaquiimg_DATA) $(plaquidlg_DATA) + diff --git a/Constructor/and_e.png b/Constructor/pixmaps/and_e.png similarity index 100% rename from Constructor/and_e.png rename to Constructor/pixmaps/and_e.png diff --git a/Constructor/and_n.png b/Constructor/pixmaps/and_n.png similarity index 100% rename from Constructor/and_n.png rename to Constructor/pixmaps/and_n.png diff --git a/Constructor/and_o.png b/Constructor/pixmaps/and_o.png similarity index 100% rename from Constructor/and_o.png rename to Constructor/pixmaps/and_o.png diff --git a/Constructor/and_s.png b/Constructor/pixmaps/and_s.png similarity index 100% rename from Constructor/and_s.png rename to Constructor/pixmaps/and_s.png diff --git a/Constructor/bomba_e.png b/Constructor/pixmaps/bomba_e.png similarity index 100% rename from Constructor/bomba_e.png rename to Constructor/pixmaps/bomba_e.png diff --git a/Constructor/bomba_null.png b/Constructor/pixmaps/bomba_null.png similarity index 100% rename from Constructor/bomba_null.png rename to Constructor/pixmaps/bomba_null.png diff --git a/Constructor/bomba_o.png b/Constructor/pixmaps/bomba_o.png similarity index 100% rename from Constructor/bomba_o.png rename to Constructor/pixmaps/bomba_o.png diff --git a/Constructor/canio_n.png b/Constructor/pixmaps/canio_n.png similarity index 100% rename from Constructor/canio_n.png rename to Constructor/pixmaps/canio_n.png diff --git a/Constructor/canio_s.png b/Constructor/pixmaps/canio_s.png similarity index 100% rename from Constructor/canio_s.png rename to Constructor/pixmaps/canio_s.png diff --git a/Constructor/codo_e.png b/Constructor/pixmaps/codo_e.png similarity index 100% rename from Constructor/codo_e.png rename to Constructor/pixmaps/codo_e.png diff --git a/Constructor/codo_n.png b/Constructor/pixmaps/codo_n.png similarity index 100% rename from Constructor/codo_n.png rename to Constructor/pixmaps/codo_n.png diff --git a/Constructor/codo_o.png b/Constructor/pixmaps/codo_o.png similarity index 100% rename from Constructor/codo_o.png rename to Constructor/pixmaps/codo_o.png diff --git a/Constructor/codo_s.png b/Constructor/pixmaps/codo_s.png similarity index 100% rename from Constructor/codo_s.png rename to Constructor/pixmaps/codo_s.png diff --git a/Constructor/drain_e.png b/Constructor/pixmaps/drain_e.png similarity index 100% rename from Constructor/drain_e.png rename to Constructor/pixmaps/drain_e.png diff --git a/Constructor/drain_n.png b/Constructor/pixmaps/drain_n.png similarity index 100% rename from Constructor/drain_n.png rename to Constructor/pixmaps/drain_n.png diff --git a/Constructor/drain_o.png b/Constructor/pixmaps/drain_o.png similarity index 100% rename from Constructor/drain_o.png rename to Constructor/pixmaps/drain_o.png diff --git a/Constructor/drain_s.png b/Constructor/pixmaps/drain_s.png similarity index 100% rename from Constructor/drain_s.png rename to Constructor/pixmaps/drain_s.png diff --git a/Constructor/exclusa_h.png b/Constructor/pixmaps/exclusa_h.png similarity index 100% rename from Constructor/exclusa_h.png rename to Constructor/pixmaps/exclusa_h.png diff --git a/Constructor/exclusa_s.png b/Constructor/pixmaps/exclusa_s.png similarity index 100% rename from Constructor/exclusa_s.png rename to Constructor/pixmaps/exclusa_s.png diff --git a/Constructor/ico_bomba.png b/Constructor/pixmaps/ico_bomba.png similarity index 100% rename from Constructor/ico_bomba.png rename to Constructor/pixmaps/ico_bomba.png diff --git a/Constructor/ico_canio.png b/Constructor/pixmaps/ico_canio.png similarity index 100% rename from Constructor/ico_canio.png rename to Constructor/pixmaps/ico_canio.png diff --git a/Constructor/ico_codo.png b/Constructor/pixmaps/ico_codo.png similarity index 100% rename from Constructor/ico_codo.png rename to Constructor/pixmaps/ico_codo.png diff --git a/Constructor/ico_exclusa.png b/Constructor/pixmaps/ico_exclusa.png similarity index 100% rename from Constructor/ico_exclusa.png rename to Constructor/pixmaps/ico_exclusa.png diff --git a/Constructor/ico_tanque.png b/Constructor/pixmaps/ico_tanque.png similarity index 100% rename from Constructor/ico_tanque.png rename to Constructor/pixmaps/ico_tanque.png diff --git a/Constructor/ico_y.png b/Constructor/pixmaps/ico_y.png similarity index 100% rename from Constructor/ico_y.png rename to Constructor/pixmaps/ico_y.png diff --git a/Constructor/not_e.png b/Constructor/pixmaps/not_e.png similarity index 100% rename from Constructor/not_e.png rename to Constructor/pixmaps/not_e.png diff --git a/Constructor/not_n.png b/Constructor/pixmaps/not_n.png similarity index 100% rename from Constructor/not_n.png rename to Constructor/pixmaps/not_n.png diff --git a/Constructor/not_o.png b/Constructor/pixmaps/not_o.png similarity index 100% rename from Constructor/not_o.png rename to Constructor/pixmaps/not_o.png diff --git a/Constructor/not_s.png b/Constructor/pixmaps/not_s.png similarity index 100% rename from Constructor/not_s.png rename to Constructor/pixmaps/not_s.png diff --git a/Constructor/null.png b/Constructor/pixmaps/null.png similarity index 100% rename from Constructor/null.png rename to Constructor/pixmaps/null.png diff --git a/Constructor/or_e.png b/Constructor/pixmaps/or_e.png similarity index 100% rename from Constructor/or_e.png rename to Constructor/pixmaps/or_e.png diff --git a/Constructor/or_n.png b/Constructor/pixmaps/or_n.png similarity index 100% rename from Constructor/or_n.png rename to Constructor/pixmaps/or_n.png diff --git a/Constructor/or_o.png b/Constructor/pixmaps/or_o.png similarity index 100% rename from Constructor/or_o.png rename to Constructor/pixmaps/or_o.png diff --git a/Constructor/or_s.png b/Constructor/pixmaps/or_s.png similarity index 100% rename from Constructor/or_s.png rename to Constructor/pixmaps/or_s.png diff --git a/Constructor/tanque_e.png b/Constructor/pixmaps/tanque_e.png similarity index 100% rename from Constructor/tanque_e.png rename to Constructor/pixmaps/tanque_e.png diff --git a/Constructor/tanque_null.png b/Constructor/pixmaps/tanque_null.png similarity index 100% rename from Constructor/tanque_null.png rename to Constructor/pixmaps/tanque_null.png diff --git a/Constructor/tanque_o.png b/Constructor/pixmaps/tanque_o.png similarity index 100% rename from Constructor/tanque_o.png rename to Constructor/pixmaps/tanque_o.png diff --git a/Constructor/y_e.png b/Constructor/pixmaps/y_e.png similarity index 100% rename from Constructor/y_e.png rename to Constructor/pixmaps/y_e.png diff --git a/Constructor/y_n.png b/Constructor/pixmaps/y_n.png similarity index 100% rename from Constructor/y_n.png rename to Constructor/pixmaps/y_n.png diff --git a/Constructor/y_o.png b/Constructor/pixmaps/y_o.png similarity index 100% rename from Constructor/y_o.png rename to Constructor/pixmaps/y_o.png diff --git a/Constructor/y_s.png b/Constructor/pixmaps/y_s.png similarity index 100% rename from Constructor/y_s.png rename to Constructor/pixmaps/y_s.png diff --git a/Constructor/src/Makefile.am b/Constructor/src/Makefile.am new file mode 100644 index 0000000..7ad5d8d --- /dev/null +++ b/Constructor/src/Makefile.am @@ -0,0 +1,32 @@ +## Process this file with automake to produce Makefile.in + +INCLUDES = \ + -I../include \ + -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ + -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ + @PACKAGE_CFLAGS@ + +bin_PROGRAMS = plaqui-constructor + +plaqui_constructor_SOURCES = and.cpp \ + cistern.cpp \ + cisternptywnd.cpp \ + conduct.cpp \ + constructor.cpp \ + drain.cpp \ + exclusa.cpp \ + exclusaptywnd.cpp \ + item.cpp \ + itemptywnd.cpp \ + main.cpp \ + not.cpp \ + or.cpp \ + propertywnd.cpp \ + pump.cpp \ + pumpptywnd.cpp \ + splitter.cpp \ + union.cpp \ + workplace.cpp + +plaqui_constructor_LDADD = @PACKAGE_LIBS@ + diff --git a/Constructor/and.cpp b/Constructor/src/and.cpp similarity index 84% rename from Constructor/and.cpp rename to Constructor/src/and.cpp index 801cfd5..9ee2867 100644 --- a/Constructor/and.cpp +++ b/Constructor/src/and.cpp @@ -2,11 +2,11 @@ And::And() { - imageN = Gdk::Pixbuf::create_from_file("and_n.png"); - imageS = Gdk::Pixbuf::create_from_file("and_s.png"); - imageE = Gdk::Pixbuf::create_from_file("and_e.png"); - imageO = Gdk::Pixbuf::create_from_file("and_o.png"); - null = Gdk::Pixbuf::create_from_file("null.png"); + imageN = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/and_n.png"); + imageS = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/and_s.png"); + imageE = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/and_e.png"); + imageO = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/and_o.png"); + null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/null.png"); imgActual = 0; image = imageE; set_size_request(image->get_width(), image->get_height()); diff --git a/Constructor/cistern.cpp b/Constructor/src/cistern.cpp similarity index 93% rename from Constructor/cistern.cpp rename to Constructor/src/cistern.cpp index 8d5a785..6cb0323 100644 --- a/Constructor/cistern.cpp +++ b/Constructor/src/cistern.cpp @@ -3,14 +3,14 @@ Cistern::Cistern() { - imageE = Gdk::Pixbuf::create_from_file("tanque_e.png"); - imageO = Gdk::Pixbuf::create_from_file("tanque_o.png"); - null = Gdk::Pixbuf::create_from_file("tanque_null.png"); + imageE = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/tanque_e.png"); + imageO = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/tanque_o.png"); + null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/tanque_null.png"); imgActual = 0; image = imageE; set_size_request(image->get_width(), image->get_height()); - Glib::RefPtr ref = Gnome::Glade::Xml::create("constructor.glade", "cistern_pty_wnd"); + Glib::RefPtr ref = Gnome::Glade::Xml::create(PACKAGE_DATA_DIR"/plaqui-constructor/dialogs/constructor.glade", "cistern_pty_wnd"); ref->get_widget_derived("cistern_pty_wnd",cistern_pty_wnd); cistern_pty_wnd->cistern = this; cistern_pty_wnd->set_title("Propiedades del Tanque"); diff --git a/Constructor/cisternptywnd.cpp b/Constructor/src/cisternptywnd.cpp similarity index 95% rename from Constructor/cisternptywnd.cpp rename to Constructor/src/cisternptywnd.cpp index 12617e2..f12867c 100644 --- a/Constructor/cisternptywnd.cpp +++ b/Constructor/src/cisternptywnd.cpp @@ -9,7 +9,7 @@ CisternPtyWnd::CisternPtyWnd(BaseObjectType* cobject, const Glib::RefPtrget_widget("btn_select_color", btn_select_color); refGlade->get_widget("color_preview",color_preview); - Glib::RefPtr ref = Gnome::Glade::Xml::create("constructor.glade", "color_select_dlg"); + Glib::RefPtr ref = Gnome::Glade::Xml::create(PACKAGE_DATA_DIR"/plaqui-constructor/dialogs/constructor.glade", "color_select_dlg"); ref->get_widget("color_select_dlg",color_select_dlg); ref->get_widget("dlg_select_color_cancel",dlg_select_color_cancel); ref->get_widget("dlg_select_color_ok",dlg_select_color_ok); diff --git a/Constructor/conduct.cpp b/Constructor/src/conduct.cpp similarity index 95% rename from Constructor/conduct.cpp rename to Constructor/src/conduct.cpp index 2493f32..c3557dc 100644 --- a/Constructor/conduct.cpp +++ b/Constructor/src/conduct.cpp @@ -2,9 +2,9 @@ Conduct::Conduct() { - imageN = Gdk::Pixbuf::create_from_file("canio_n.png"); - imageS = Gdk::Pixbuf::create_from_file("canio_s.png"); - null = Gdk::Pixbuf::create_from_file("null.png"); + imageN = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/canio_n.png"); + imageS = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/canio_s.png"); + null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/null.png"); imgActual = 0; image = imageN; set_size_request(image->get_width(), image->get_height()); diff --git a/Constructor/constructor.cpp b/Constructor/src/constructor.cpp similarity index 93% rename from Constructor/constructor.cpp rename to Constructor/src/constructor.cpp index f754c48..1dcc007 100644 --- a/Constructor/constructor.cpp +++ b/Constructor/src/constructor.cpp @@ -6,16 +6,16 @@ Constructor::Constructor(BaseObjectType* cobject, const Glib::RefPtrget_widget("btn_canio", btn_canio); refGlade->get_widget("btn_codo", btn_codo); diff --git a/Constructor/drain.cpp b/Constructor/src/drain.cpp similarity index 88% rename from Constructor/drain.cpp rename to Constructor/src/drain.cpp index 3625677..1fe84eb 100644 --- a/Constructor/drain.cpp +++ b/Constructor/src/drain.cpp @@ -2,11 +2,11 @@ Drain::Drain() { - imageE = Gdk::Pixbuf::create_from_file("drain_e.png"); - imageO = Gdk::Pixbuf::create_from_file("drain_o.png"); - imageN = Gdk::Pixbuf::create_from_file("drain_n.png"); - imageS = Gdk::Pixbuf::create_from_file("drain_s.png"); - null = Gdk::Pixbuf::create_from_file("null.png"); + imageE = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/drain_e.png"); + imageO = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/drain_o.png"); + imageN = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/drain_n.png"); + imageS = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/drain_s.png"); + null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/null.png"); imgActual = 0; image = imageN; set_size_request(image->get_width(), image->get_height()); diff --git a/Constructor/exclusa.cpp b/Constructor/src/exclusa.cpp similarity index 94% rename from Constructor/exclusa.cpp rename to Constructor/src/exclusa.cpp index 0ffb1a6..69eef26 100644 --- a/Constructor/exclusa.cpp +++ b/Constructor/src/exclusa.cpp @@ -3,14 +3,14 @@ Exclusa::Exclusa() { - imageN = Gdk::Pixbuf::create_from_file("exclusa_h.png"); - imageS = Gdk::Pixbuf::create_from_file("exclusa_s.png"); - null = Gdk::Pixbuf::create_from_file("null.png"); + imageN = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/exclusa_h.png"); + imageS = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/exclusa_s.png"); + null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/null.png"); imgActual = 0; image = imageN; set_size_request(image->get_width(), image->get_height()); - Glib::RefPtr ref = Gnome::Glade::Xml::create("constructor.glade", "exclusa_pty_wnd"); + Glib::RefPtr ref = Gnome::Glade::Xml::create(PACKAGE_DATA_DIR"/plaqui-constructor/dialogs/constructor.glade", "exclusa_pty_wnd"); ref->get_widget_derived("exclusa_pty_wnd",exclusa_pty_wnd); exclusa_pty_wnd->exclusa = this; name = "exclusa"; diff --git a/Constructor/exclusaptywnd.cpp b/Constructor/src/exclusaptywnd.cpp similarity index 100% rename from Constructor/exclusaptywnd.cpp rename to Constructor/src/exclusaptywnd.cpp diff --git a/Constructor/item.cpp b/Constructor/src/item.cpp similarity index 96% rename from Constructor/item.cpp rename to Constructor/src/item.cpp index bab22b4..de63b69 100644 --- a/Constructor/item.cpp +++ b/Constructor/src/item.cpp @@ -13,7 +13,7 @@ CItem::CItem(const char *filename):Gtk::DrawingArea() CItem::CItem() { Glib::RefPtr ref; - ref = Gnome::Glade::Xml::create("constructor.glade", "item_pty_wnd"); + ref = Gnome::Glade::Xml::create(PACKAGE_DATA_DIR"/plaqui-constructor/dialogs/constructor.glade", "item_pty_wnd"); ref->get_widget_derived("item_pty_wnd",property_wnd); caudal_max = 0.0; is_union = true; diff --git a/Constructor/itemptywnd.cpp b/Constructor/src/itemptywnd.cpp similarity index 100% rename from Constructor/itemptywnd.cpp rename to Constructor/src/itemptywnd.cpp diff --git a/Constructor/main.cpp b/Constructor/src/main.cpp similarity index 86% rename from Constructor/main.cpp rename to Constructor/src/main.cpp index 715de7f..8ed4f3a 100644 --- a/Constructor/main.cpp +++ b/Constructor/src/main.cpp @@ -12,7 +12,7 @@ int main (int argc, char **argv) Glib::RefPtr refXml; try { - refXml = Gnome::Glade::Xml::create("constructor.glade"); + refXml = Gnome::Glade::Xml::create(PACKAGE_DATA_DIR"/plaqui-constructor/dialogs/constructor.glade"); } catch(const Gnome::Glade::XmlError& ex) { diff --git a/Constructor/not.cpp b/Constructor/src/not.cpp similarity index 84% rename from Constructor/not.cpp rename to Constructor/src/not.cpp index 187ccc3..b006f5e 100644 --- a/Constructor/not.cpp +++ b/Constructor/src/not.cpp @@ -2,11 +2,11 @@ Not::Not() { - imageN = Gdk::Pixbuf::create_from_file("not_n.png"); - imageS = Gdk::Pixbuf::create_from_file("not_s.png"); - imageE = Gdk::Pixbuf::create_from_file("not_e.png"); - imageO = Gdk::Pixbuf::create_from_file("not_o.png"); - null = Gdk::Pixbuf::create_from_file("null.png"); + imageN = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/not_n.png"); + imageS = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/not_s.png"); + imageE = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/not_e.png"); + imageO = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/not_o.png"); + null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/null.png"); imgActual = 0; image = imageE; set_size_request(image->get_width(), image->get_height()); diff --git a/Constructor/or.cpp b/Constructor/src/or.cpp similarity index 75% rename from Constructor/or.cpp rename to Constructor/src/or.cpp index cf4fe97..1d1534b 100644 --- a/Constructor/or.cpp +++ b/Constructor/src/or.cpp @@ -2,11 +2,11 @@ Or::Or() { - imageN = Gdk::Pixbuf::create_from_file("or_n.png"); - imageS = Gdk::Pixbuf::create_from_file("or_s.png"); - imageE = Gdk::Pixbuf::create_from_file("or_e.png"); - imageO = Gdk::Pixbuf::create_from_file("or_o.png"); - null = Gdk::Pixbuf::create_from_file("null.png"); + imageN = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/or_n.png"); + imageS = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/or_s.png"); + imageE = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/or_e.png"); + imageO = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/or_o.png"); + null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/null.png"); imgActual = 0; image = imageE; set_size_request(image->get_width(), image->get_height()); diff --git a/Constructor/propertywnd.cpp b/Constructor/src/propertywnd.cpp similarity index 100% rename from Constructor/propertywnd.cpp rename to Constructor/src/propertywnd.cpp diff --git a/Constructor/pump.cpp b/Constructor/src/pump.cpp similarity index 91% rename from Constructor/pump.cpp rename to Constructor/src/pump.cpp index 664b55d..629f392 100644 --- a/Constructor/pump.cpp +++ b/Constructor/src/pump.cpp @@ -3,14 +3,14 @@ Pump::Pump() { - imageE = Gdk::Pixbuf::create_from_file("bomba_e.png"); - imageO = Gdk::Pixbuf::create_from_file("bomba_o.png"); - null = Gdk::Pixbuf::create_from_file("bomba_null.png"); + imageE = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/bomba_e.png"); + imageO = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/bomba_o.png"); + null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/bomba_null.png"); imgActual = 0; image = imageE; set_size_request(image->get_width(), image->get_height()); - Glib::RefPtr ref = Gnome::Glade::Xml::create("constructor.glade", "pump_pty_wnd"); + Glib::RefPtr ref = Gnome::Glade::Xml::create(PACKAGE_DATA_DIR"/plaqui-constructor/dialogs/constructor.glade", "pump_pty_wnd"); ref->get_widget_derived("pump_pty_wnd",pump_pty_wnd); pump_pty_wnd->pump = this; name = "bomba"; diff --git a/Constructor/pumpptywnd.cpp b/Constructor/src/pumpptywnd.cpp similarity index 95% rename from Constructor/pumpptywnd.cpp rename to Constructor/src/pumpptywnd.cpp index cc5adba..0889599 100644 --- a/Constructor/pumpptywnd.cpp +++ b/Constructor/src/pumpptywnd.cpp @@ -8,7 +8,7 @@ PumpPtyWnd::PumpPtyWnd(BaseObjectType* cobject, const Glib::RefPtrget_widget("txt_pump_name",txt_pump_name); refGlade->get_widget("color_preview",color_preview); - Glib::RefPtr ref = Gnome::Glade::Xml::create("constructor.glade", "color_select_dlg"); + Glib::RefPtr ref = Gnome::Glade::Xml::create(PACKAGE_DATA_DIR"/plaqui-constructor/dialogs/constructor.glade", "color_select_dlg"); ref->get_widget("color_select_dlg",color_select_dlg); ref->get_widget("dlg_select_color_cancel",dlg_select_color_cancel); ref->get_widget("dlg_select_color_ok",dlg_select_color_ok); diff --git a/Constructor/splitter.cpp b/Constructor/src/splitter.cpp similarity index 94% rename from Constructor/splitter.cpp rename to Constructor/src/splitter.cpp index c228db6..0ca5af6 100644 --- a/Constructor/splitter.cpp +++ b/Constructor/src/splitter.cpp @@ -2,11 +2,11 @@ Splitter::Splitter() { - imageN = Gdk::Pixbuf::create_from_file("codo_n.png"); - imageS = Gdk::Pixbuf::create_from_file("codo_s.png"); - imageE = Gdk::Pixbuf::create_from_file("codo_e.png"); - imageO = Gdk::Pixbuf::create_from_file("codo_o.png"); - null = Gdk::Pixbuf::create_from_file("null.png"); + imageN = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/codo_n.png"); + imageS = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/codo_s.png"); + imageE = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/codo_e.png"); + imageO = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/codo_o.png"); + null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/null.png"); imgActual = 0; image = imageO; set_size_request(image->get_width(), image->get_height()); diff --git a/Constructor/union.cpp b/Constructor/src/union.cpp similarity index 94% rename from Constructor/union.cpp rename to Constructor/src/union.cpp index c2bef0c..b10ea12 100644 --- a/Constructor/union.cpp +++ b/Constructor/src/union.cpp @@ -2,11 +2,11 @@ Union::Union() { - imageN = Gdk::Pixbuf::create_from_file("y_n.png"); - imageS = Gdk::Pixbuf::create_from_file("y_s.png"); - imageE = Gdk::Pixbuf::create_from_file("y_e.png"); - imageO = Gdk::Pixbuf::create_from_file("y_o.png"); - null = Gdk::Pixbuf::create_from_file("null.png"); + imageN = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/y_n.png"); + imageS = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/y_s.png"); + imageE = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/y_e.png"); + imageO = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/y_o.png"); + null = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/null.png"); imgActual = 0; image = imageN; set_size_request(image->get_width(), image->get_height()); diff --git a/Constructor/workplace.cpp b/Constructor/src/workplace.cpp similarity index 96% rename from Constructor/workplace.cpp rename to Constructor/src/workplace.cpp index 652cf01..293aaf5 100644 --- a/Constructor/workplace.cpp +++ b/Constructor/src/workplace.cpp @@ -79,7 +79,7 @@ void WorkPlace::delete_line(int _id) { std::list::iterator i = lista_lineas.begin(); while ( i != lista_lineas.end() ){ - if ( (*i).logic->get_id() == _id || (*i).store->get_id == _id) + if ( ((*i).logic->get_id() == _id) || ((*i).store->get_id() == _id) ) lista_lineas.erase(i); i++; } -- 2.43.0