]> git.llucax.com Git - z.facultad/75.42/plaqui.git/commitdiff
* Se modifica la estructura de directorios : src include dialogs y pixmaps
authorRicardo Markiewicz <gazer.arg@gmail.com>
Tue, 18 Nov 2003 17:20:48 +0000 (17:20 +0000)
committerRicardo Markiewicz <gazer.arg@gmail.com>
Tue, 18 Nov 2003 17:20:48 +0000 (17:20 +0000)
* 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 !!

86 files changed:
Constructor/Makefile [deleted file]
Constructor/Makefile.am [new file with mode: 0644]
Constructor/configure.in [new file with mode: 0644]
Constructor/dialogs/Makefile.am [new file with mode: 0644]
Constructor/dialogs/constructor.glade [moved from Constructor/constructor.glade with 100% similarity]
Constructor/dialogs/constructor.gladep [moved from Constructor/constructor.gladep with 100% similarity]
Constructor/include/and.h [moved from Constructor/and.h with 100% similarity]
Constructor/include/cistern.h [moved from Constructor/cistern.h with 100% similarity]
Constructor/include/cisternptywnd.h [moved from Constructor/cisternptywnd.h with 100% similarity]
Constructor/include/conduct.h [moved from Constructor/conduct.h with 100% similarity]
Constructor/include/constructor.h [moved from Constructor/constructor.h with 100% similarity]
Constructor/include/drain.h [moved from Constructor/drain.h with 100% similarity]
Constructor/include/exclusa.h [moved from Constructor/exclusa.h with 100% similarity]
Constructor/include/exclusaptywnd.h [moved from Constructor/exclusaptywnd.h with 100% similarity]
Constructor/include/item.h [moved from Constructor/item.h with 100% similarity]
Constructor/include/itemptywnd.h [moved from Constructor/itemptywnd.h with 100% similarity]
Constructor/include/not.h [moved from Constructor/not.h with 100% similarity]
Constructor/include/or.h [moved from Constructor/or.h with 100% similarity]
Constructor/include/propertywnd.h [moved from Constructor/propertywnd.h with 100% similarity]
Constructor/include/pump.h [moved from Constructor/pump.h with 100% similarity]
Constructor/include/pumpptywnd.h [moved from Constructor/pumpptywnd.h with 100% similarity]
Constructor/include/splitter.h [moved from Constructor/splitter.h with 100% similarity]
Constructor/include/union.h [moved from Constructor/union.h with 100% similarity]
Constructor/include/workplace.h [moved from Constructor/workplace.h with 100% similarity]
Constructor/pixmaps/Makefile.am [new file with mode: 0644]
Constructor/pixmaps/and_e.png [moved from Constructor/and_e.png with 100% similarity]
Constructor/pixmaps/and_n.png [moved from Constructor/and_n.png with 100% similarity]
Constructor/pixmaps/and_o.png [moved from Constructor/and_o.png with 100% similarity]
Constructor/pixmaps/and_s.png [moved from Constructor/and_s.png with 100% similarity]
Constructor/pixmaps/bomba_e.png [moved from Constructor/bomba_e.png with 100% similarity]
Constructor/pixmaps/bomba_null.png [moved from Constructor/bomba_null.png with 100% similarity]
Constructor/pixmaps/bomba_o.png [moved from Constructor/bomba_o.png with 100% similarity]
Constructor/pixmaps/canio_n.png [moved from Constructor/canio_n.png with 100% similarity]
Constructor/pixmaps/canio_s.png [moved from Constructor/canio_s.png with 100% similarity]
Constructor/pixmaps/codo_e.png [moved from Constructor/codo_e.png with 100% similarity]
Constructor/pixmaps/codo_n.png [moved from Constructor/codo_n.png with 100% similarity]
Constructor/pixmaps/codo_o.png [moved from Constructor/codo_o.png with 100% similarity]
Constructor/pixmaps/codo_s.png [moved from Constructor/codo_s.png with 100% similarity]
Constructor/pixmaps/drain_e.png [moved from Constructor/drain_e.png with 100% similarity]
Constructor/pixmaps/drain_n.png [moved from Constructor/drain_n.png with 100% similarity]
Constructor/pixmaps/drain_o.png [moved from Constructor/drain_o.png with 100% similarity]
Constructor/pixmaps/drain_s.png [moved from Constructor/drain_s.png with 100% similarity]
Constructor/pixmaps/exclusa_h.png [moved from Constructor/exclusa_h.png with 100% similarity]
Constructor/pixmaps/exclusa_s.png [moved from Constructor/exclusa_s.png with 100% similarity]
Constructor/pixmaps/ico_bomba.png [moved from Constructor/ico_bomba.png with 100% similarity]
Constructor/pixmaps/ico_canio.png [moved from Constructor/ico_canio.png with 100% similarity]
Constructor/pixmaps/ico_codo.png [moved from Constructor/ico_codo.png with 100% similarity]
Constructor/pixmaps/ico_exclusa.png [moved from Constructor/ico_exclusa.png with 100% similarity]
Constructor/pixmaps/ico_tanque.png [moved from Constructor/ico_tanque.png with 100% similarity]
Constructor/pixmaps/ico_y.png [moved from Constructor/ico_y.png with 100% similarity]
Constructor/pixmaps/not_e.png [moved from Constructor/not_e.png with 100% similarity]
Constructor/pixmaps/not_n.png [moved from Constructor/not_n.png with 100% similarity]
Constructor/pixmaps/not_o.png [moved from Constructor/not_o.png with 100% similarity]
Constructor/pixmaps/not_s.png [moved from Constructor/not_s.png with 100% similarity]
Constructor/pixmaps/null.png [moved from Constructor/null.png with 100% similarity]
Constructor/pixmaps/or_e.png [moved from Constructor/or_e.png with 100% similarity]
Constructor/pixmaps/or_n.png [moved from Constructor/or_n.png with 100% similarity]
Constructor/pixmaps/or_o.png [moved from Constructor/or_o.png with 100% similarity]
Constructor/pixmaps/or_s.png [moved from Constructor/or_s.png with 100% similarity]
Constructor/pixmaps/tanque_e.png [moved from Constructor/tanque_e.png with 100% similarity]
Constructor/pixmaps/tanque_null.png [moved from Constructor/tanque_null.png with 100% similarity]
Constructor/pixmaps/tanque_o.png [moved from Constructor/tanque_o.png with 100% similarity]
Constructor/pixmaps/y_e.png [moved from Constructor/y_e.png with 100% similarity]
Constructor/pixmaps/y_n.png [moved from Constructor/y_n.png with 100% similarity]
Constructor/pixmaps/y_o.png [moved from Constructor/y_o.png with 100% similarity]
Constructor/pixmaps/y_s.png [moved from Constructor/y_s.png with 100% similarity]
Constructor/src/Makefile.am [new file with mode: 0644]
Constructor/src/and.cpp [moved from Constructor/and.cpp with 84% similarity]
Constructor/src/cistern.cpp [moved from Constructor/cistern.cpp with 93% similarity]
Constructor/src/cisternptywnd.cpp [moved from Constructor/cisternptywnd.cpp with 95% similarity]
Constructor/src/conduct.cpp [moved from Constructor/conduct.cpp with 95% similarity]
Constructor/src/constructor.cpp [moved from Constructor/constructor.cpp with 93% similarity]
Constructor/src/drain.cpp [moved from Constructor/drain.cpp with 88% similarity]
Constructor/src/exclusa.cpp [moved from Constructor/exclusa.cpp with 94% similarity]
Constructor/src/exclusaptywnd.cpp [moved from Constructor/exclusaptywnd.cpp with 100% similarity]
Constructor/src/item.cpp [moved from Constructor/item.cpp with 96% similarity]
Constructor/src/itemptywnd.cpp [moved from Constructor/itemptywnd.cpp with 100% similarity]
Constructor/src/main.cpp [moved from Constructor/main.cpp with 86% similarity]
Constructor/src/not.cpp [moved from Constructor/not.cpp with 84% similarity]
Constructor/src/or.cpp [moved from Constructor/or.cpp with 75% similarity]
Constructor/src/propertywnd.cpp [moved from Constructor/propertywnd.cpp with 100% similarity]
Constructor/src/pump.cpp [moved from Constructor/pump.cpp with 91% similarity]
Constructor/src/pumpptywnd.cpp [moved from Constructor/pumpptywnd.cpp with 95% similarity]
Constructor/src/splitter.cpp [moved from Constructor/splitter.cpp with 94% similarity]
Constructor/src/union.cpp [moved from Constructor/union.cpp with 94% similarity]
Constructor/src/workplace.cpp [moved from Constructor/workplace.cpp with 96% similarity]

diff --git a/Constructor/Makefile b/Constructor/Makefile
deleted file mode 100644 (file)
index 4347391..0000000
+++ /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 (file)
index 0000000..82816df
--- /dev/null
@@ -0,0 +1,3 @@
+
+SUBDIRS = src dialogs pixmaps
+
diff --git a/Constructor/configure.in b/Constructor/configure.in
new file mode 100644 (file)
index 0000000..82c7e61
--- /dev/null
@@ -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 (file)
index 0000000..82f9dac
--- /dev/null
@@ -0,0 +1,6 @@
+plaquidir = $(datadir)/plaqui-constructor/dialogs
+
+plaqui_DATA = constructor.glade
+
+EXTRA_DIST = $(plaqui_DATA)
+
similarity index 100%
rename from Constructor/and.h
rename to Constructor/include/and.h
similarity index 100%
rename from Constructor/not.h
rename to Constructor/include/not.h
similarity index 100%
rename from Constructor/or.h
rename to Constructor/include/or.h
diff --git a/Constructor/pixmaps/Makefile.am b/Constructor/pixmaps/Makefile.am
new file mode 100644 (file)
index 0000000..7e19fb6
--- /dev/null
@@ -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/src/Makefile.am b/Constructor/src/Makefile.am
new file mode 100644 (file)
index 0000000..7ad5d8d
--- /dev/null
@@ -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@
+
similarity index 84%
rename from Constructor/and.cpp
rename to Constructor/src/and.cpp
index 801cfd52ff54dac899164b87597a67525590c528..9ee2867a39b443a0f227a3ed0ae0eb049f06c3ba 100644 (file)
@@ -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());
similarity index 93%
rename from Constructor/cistern.cpp
rename to Constructor/src/cistern.cpp
index 8d5a78585a81c92066f59135f975297fc919ae73..6cb0323f2eaa8d38b9a501f15d5b828cf0742e64 100644 (file)
@@ -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<Gnome::Glade::Xml> ref = Gnome::Glade::Xml::create("constructor.glade", "cistern_pty_wnd");
+       Glib::RefPtr<Gnome::Glade::Xml> 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");   
similarity index 95%
rename from Constructor/cisternptywnd.cpp
rename to Constructor/src/cisternptywnd.cpp
index 12617e2da23d283bde1e39ea956f3e106f768226..f12867c2549a71a53233810c4890a9d02a85b2c1 100644 (file)
@@ -9,7 +9,7 @@ CisternPtyWnd::CisternPtyWnd(BaseObjectType* cobject, const Glib::RefPtr<Gnome::
        refGlade->get_widget("btn_select_color", btn_select_color);             
        refGlade->get_widget("color_preview",color_preview);
        
-       Glib::RefPtr<Gnome::Glade::Xml> ref = Gnome::Glade::Xml::create("constructor.glade", "color_select_dlg");
+       Glib::RefPtr<Gnome::Glade::Xml> 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);
similarity index 95%
rename from Constructor/conduct.cpp
rename to Constructor/src/conduct.cpp
index 2493f32a24fc3506ca94d14c9e1f7353fd80e696..c3557dc087e4fe656ef4b7e43a6b304c5c823aa4 100644 (file)
@@ -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());
similarity index 93%
rename from Constructor/constructor.cpp
rename to Constructor/src/constructor.cpp
index f754c48517a7d79b35d85a96e925f4fbb2b90e55..1dcc0074b15771bb6bcd8fad69158c6aa7d8a55a 100644 (file)
@@ -6,16 +6,16 @@ Constructor::Constructor(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glad
        set_title("Constructor");
        
        
-       ico_canio = Gdk::Pixbuf::create_from_file("canio_n.png");
-       ico_y     = Gdk::Pixbuf::create_from_file("y_n.png");
-       ico_codo  = Gdk::Pixbuf::create_from_file("codo_o.png");
-       ico_tanque  = Gdk::Pixbuf::create_from_file("tanque_e.png");
-       ico_exclusa = Gdk::Pixbuf::create_from_file("exclusa_h.png");
-       ico_drain = Gdk::Pixbuf::create_from_file("drain_n.png");
-       ico_bomba = Gdk::Pixbuf::create_from_file("bomba_e.png");
-       ico_and = Gdk::Pixbuf::create_from_file("and_e.png");
-       ico_or = Gdk::Pixbuf::create_from_file("or_e.png");
-       ico_not = Gdk::Pixbuf::create_from_file("not_e.png");
+       ico_canio = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/canio_n.png");
+       ico_y     = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/y_n.png");
+       ico_codo  = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/codo_o.png");
+       ico_tanque  = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/tanque_e.png");
+       ico_exclusa = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/exclusa_h.png");
+       ico_drain = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/drain_n.png");
+       ico_bomba = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/bomba_e.png");
+       ico_and = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/and_e.png");
+       ico_or = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/or_e.png");
+       ico_not = Gdk::Pixbuf::create_from_file(PACKAGE_DATA_DIR"/plaqui-constructor/pixmaps/not_e.png");
        
        refGlade->get_widget("btn_canio", btn_canio);
        refGlade->get_widget("btn_codo", btn_codo);
similarity index 88%
rename from Constructor/drain.cpp
rename to Constructor/src/drain.cpp
index 3625677a1638db537e082d23fce42d4e6f703366..1fe84eb305b424a8e4f7a9806863efadb315d084 100644 (file)
@@ -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());
similarity index 94%
rename from Constructor/exclusa.cpp
rename to Constructor/src/exclusa.cpp
index 0ffb1a6afebfcd6a4c852d58a2fc65000fe2d973..69eef26148049849ae7dcbff1ccc774815b6886a 100644 (file)
@@ -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<Gnome::Glade::Xml> ref = Gnome::Glade::Xml::create("constructor.glade", "exclusa_pty_wnd");
+       Glib::RefPtr<Gnome::Glade::Xml> 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";
similarity index 96%
rename from Constructor/item.cpp
rename to Constructor/src/item.cpp
index bab22b431f640f741997eda7ad6d3f4e27f21a9e..de63b6914b017e5534b241cdcb6c1316625846f4 100644 (file)
@@ -13,7 +13,7 @@ CItem::CItem(const char *filename):Gtk::DrawingArea()
 CItem::CItem()
 {
        Glib::RefPtr<Gnome::Glade::Xml> 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;
similarity index 86%
rename from Constructor/main.cpp
rename to Constructor/src/main.cpp
index 715de7fe41fa868b5c32a19e9f2a10307837bc53..8ed4f3a8d1cdded8830fdfafb9883e440a2cd2a1 100644 (file)
@@ -12,7 +12,7 @@ int main (int argc, char **argv)
   Glib::RefPtr<Gnome::Glade::Xml> 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)
   {
similarity index 84%
rename from Constructor/not.cpp
rename to Constructor/src/not.cpp
index 187ccc311983302c341a20bd2b61f79ea3561cee..b006f5e2184a77cc65fa6ce5a162a834dd6f4dba 100644 (file)
@@ -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());
similarity index 75%
rename from Constructor/or.cpp
rename to Constructor/src/or.cpp
index cf4fe97cb58319246f41ea12c4f83ebf471e5aa8..1d1534bcaf28b680ae449967ca6ede021faed886 100644 (file)
@@ -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());
similarity index 91%
rename from Constructor/pump.cpp
rename to Constructor/src/pump.cpp
index 664b55d094a712e825b2da5a5b0ec4b39cf58836..629f3924fe0786512242c2b389b69f51b06fe9e0 100644 (file)
@@ -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<Gnome::Glade::Xml> ref = Gnome::Glade::Xml::create("constructor.glade", "pump_pty_wnd");
+       Glib::RefPtr<Gnome::Glade::Xml> 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";
similarity index 95%
rename from Constructor/pumpptywnd.cpp
rename to Constructor/src/pumpptywnd.cpp
index cc5adba40d8bcb65fd280d5abc02f79b4664095f..0889599508d04e07a6788f4261d0da17d686ff94 100644 (file)
@@ -8,7 +8,7 @@ PumpPtyWnd::PumpPtyWnd(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
        refGlade->get_widget("txt_pump_name",txt_pump_name);
        refGlade->get_widget("color_preview",color_preview);
        
-       Glib::RefPtr<Gnome::Glade::Xml> ref = Gnome::Glade::Xml::create("constructor.glade", "color_select_dlg");
+       Glib::RefPtr<Gnome::Glade::Xml> 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);
similarity index 94%
rename from Constructor/splitter.cpp
rename to Constructor/src/splitter.cpp
index c228db6c51d51dc4ae702c58b27dd8857144e6d5..0ca5af6ec9835be22aeb81dc6d680d459f44ec32 100644 (file)
@@ -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());
similarity index 94%
rename from Constructor/union.cpp
rename to Constructor/src/union.cpp
index c2bef0c32f9ad2e89b52ad1acd692715f6e743ca..b10ea1287ef6d25d53f6aef7eda66ce056f4f064 100644 (file)
@@ -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());
similarity index 96%
rename from Constructor/workplace.cpp
rename to Constructor/src/workplace.cpp
index 652cf017cc168758336f4e3ae42014494831e473..293aaf58020a06993693364a00150ea771db2ba1 100644 (file)
@@ -79,7 +79,7 @@ void WorkPlace::delete_line(int _id)
 {
        std::list<t_line>::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++;
        }