[med-svn] [SCM] clinica branch, master, updated. 615bd5bd098481712a9f4aae4c6a48d4a9a51556

Leonardo Robol leo at robol.it
Mon Jul 15 12:29:41 UTC 2013


The following commit has been merged in the master branch:
commit 899e6dabe35a218bf4844632feb0bdd005b085bf
Author: Leonardo Robol <leo at robol.it>
Date:   Mon Jul 15 13:53:30 2013 +0200

    Updated packaging for 0.3.0 version of Clinica.

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..c96db69
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,95 @@
+cmake_minimum_required (VERSION 2.8)
+project (clinica C)
+
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake )
+
+set(GETTEXT_PACKAGE "clinica")
+set(VERSION "0.3.0")
+set(PACKAGE_VERSION "0.3.0")
+set(MAJOR_VERSION "0")
+set(MINOR_VERSION "3")
+set(PATCH_VERSION "0")
+set(RESOURCE_BASE "/org/phcteam/clinica/")
+
+find_package(Vala REQUIRED)
+include(ValaVersion)
+ensure_vala_version("0.16.0" MINIMUM)
+include(ValaPrecompile)
+
+set (GSETTINGS_COMPILE_IN_PLACE off)
+set (CLINICA_VALAFLAGS "")
+
+find_program (G_IR_COMPILER
+	g-ir-compiler
+)
+
+find_program (GLIB_COMPILE_RESOURCES
+	glib-compile-resources
+)
+
+if(NOT GLIB_COMPILE_RESOURCES)
+  message(FATAL_ERROR
+	"Could not found the glib-compile-resource command.")
+endif(NOT GLIB_COMPILE_RESOURCES)
+
+find_package(PkgConfig)
+pkg_check_modules(DEPS REQUIRED
+	gee-1.0>=0.6.0 
+	gtk+-3.0>=3.0 
+	sqlite3>=3.7.4 
+	libsoup-2.4 
+	gio-2.0 
+	glib-2.0 
+	librsvg-2.0
+	jansson
+)
+
+IF(NOT DISABLE_PLUGINS)
+pkg_check_modules(PLUGINS REQUIRED
+	libpeas-gtk-1.0
+	libpeas-1.0>=1.0
+)
+set (PLUGINS_PACKAGES
+	libpeas-1.0 libpeas-gtk-1.0
+)
+LIST(APPEND CLINICA_VALAFLAGS -D HAVE_PLUGINS)
+ENDIF(NOT DISABLE_PLUGINS)
+
+find_package(PkgConfig)
+
+set (CLINICA_USED_PACKAGES
+	sqlite3 libsoup-2.4 gtk+-3.0 gio-2.0 glib-2.0 gmodule-2.0 gee-1.0 
+        ${PLUGINS_PACKAGES} config posix librsvg-2.0 jansson
+)
+
+set (CLINICA_USED_LIBRARIES
+	${DEPS_LDFLAGS} ${DEPS_LIBRARIES}
+	${PLUGINS_LDFLAGS} ${PLUGINS_LIBRARIES}
+)
+IF (WINDOWS_BUILD)
+        LIST(APPEND CLINICA_USED_LIBRARIES -mwindows)
+ENDIF (WINDOWS_BUILD)
+
+
+LIST (APPEND CLINICA_VALAFLAGS
+	--vapidir=${CMAKE_SOURCE_DIR}/vapi
+	--vapidir=${CMAKE_BINARY_DIR}/libclinica
+	-g --thread --target-glib=2.32
+)
+
+set (CLINICA_USED_CFLAGS
+	${DEPS_CFLAGS} ${PLUGINS_CFLAGS} -Werror=format-security
+	-include ${CMAKE_BINARY_DIR}/config.h -I${CMAKE_BINARY_DIR}
+	-I${CMAKE_BINARY_DIR}/libclinica -g
+)
+
+configure_file (config.h.in config.h)
+
+add_subdirectory(libclinica)
+add_subdirectory(clinica)
+add_subdirectory(po)
+add_subdirectory(data)
+add_subdirectory(doc)
+add_subdirectory(plugins)
+
+
diff --git a/Changelog b/Changelog
index 39b3470..b44affd 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,19 @@
+clinica 0.3.0 (2013 Jul, 15)
+
+ * Reworked the UI to fix some usability issues
+ * Moved the CMake build system
+ * Added an abstraction to the DataProvider to allow integration
+   with external data sources. 
+ * Added a Network service to share data across LAN
+ * Added a DBus service to ease integration in the desktop
+   environment. 
+ * Added Backup and Import/Export functionality
+ * Gtk+-3.0 only
+ * Various fixes
+ * Added integration of files in the visits
+ * Added a local medicine database
+ * Allow to search medicines in more than one database
+
 clinica 0.2.1 (2011 Dec, 20)
 
  * Major cleanup of the installation process
diff --git a/README b/README
index 80ca295..db51e58 100644
--- a/README
+++ b/README
@@ -4,19 +4,75 @@ to a single doctor.
 1) Installation instructions
 
 Installing Clinica from a release tarball is as simple as:
- 
- $ ./waf configure
- $ ./waf build
- $ sudo ./waf install 
+
+ $ mkdir build  
+ $ cmake ..
+ $ make 
+ $ make install 
  
 You will need a bunch of dependencies that configure will list
 if missing, that more or less are: libgtk-3-dev, libgee-dev, 
-libpeas-dev, libpeasgtk-dev, libsqlite3-dev, 
-gobject-introspection and valac.
+libpeas-dev, libpeasgtk-dev, libsqlite3-dev, libjson-glib,
+gobject-introspection, valac, librsvg2 and libsoup-2.4
+
+1.1) Cross compile from Linux to Windows
+
+If you need to create a Windows build of Clinica from Linux you may follow
+these steps:
+
+ *) Install the cross compiler i686-w64-mingw32-gcc
+ *) Download all the dependencies needed. OBS is your friend here 
+    You will need the script download-mingw-rpm.py that is easily
+    found searching in Google and then execute in a folder:
+
+     python3 download-mingw-rpm.py --no-clean --deps gtk3-devel
+     python3 download-mingw-rpm.py --no-clean --deps librsvg-devel
+     python3 download-mingw-rpm.py --no-clean --deps -r openSUSE_12.2 -p home:lrobol jansson-devel
+     python3 download-mingw-rpm.py --no-clean --deps libsqlite-devel
+     python3 download-mingw-rpm.py --no-clean --deps libgee-devel
+     python3 download-mingw-rpm.py --no-clean --deps libsoup-devel
+
+     python3 download-mingw-rpm.py --no-clean --deps sqlite
+     python3 download-mingw-rpm.py --no-clean --deps libgee
+     python3 download-mingw-rpm.py --no-clean --deps libjson-glib
+     python3 download-mingw-rpm.py --no-clean --deps libsoup
+     python3 download-mingw-rpm.py --no-clean --deps librsvg
+
+    *) Let's say that the folder where the script has been executed
+    is /path/to/mingw/root. Now go in the source directory of
+    Clinica and execute the following command:
+
+     mkdir build && cd build/
+     export PKG_CONFIG_PATH=/path/to/mingw/root/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig
+     export PKG_CONFIG_SYSROOT_DIR=/path/to/mingw/root
+     cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-Windows.cmake ..
+
+     make 
+
+    *) Copy the executables in the same place:
+
+     # Copy the executables in the same place
+     cp clinica/clinica.exe .
+     cp libclinica/libclinica.dll .
+     cp /path/to/mingw/root/usr/i686-w64-mingw32/sys-root/mingw/usr/bin*.dll .
+
+    *) Compile gsettings schema:
+
+     cp ../data/org.phcteam.clinica.gschema.xml .
+     glib-compile-schemas .
+
+    *) You may now build the installer, if you have makensis.exe installed (works
+    nice with wine). 
+
+     cp ../data/clinica-installer.nsi
+     wine ~/.wine/drive_c/Program\ Files/NSIS/makensis.exe clinica-installer.nsi
+
+    *) Execute clinica for testing:
+    
+     wine clinica.exe
+
+    *) Distribute the installer SetupClinica.exe
 
-If you checked out the repository from Launchpad or from the git
-repo you should use ./autogen.sh instead of ./configure (that will
-be not present).
 
 2) Using Clinica
 
diff --git a/clinica.desktop b/clinica.desktop
deleted file mode 100644
index c96b5b4..0000000
--- a/clinica.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Version=1.0
-Type=Application
-Categories=Application;GTK;
-Name=Clinica
-Comment=Medical records manager
-Exec=clinica
-Icon=clinica
-Terminal=false
diff --git a/clinica/CMakeLists.txt b/clinica/CMakeLists.txt
new file mode 100644
index 0000000..2633155
--- /dev/null
+++ b/clinica/CMakeLists.txt
@@ -0,0 +1,46 @@
+set (CLINICA_SRC
+	Clinica.vala
+)
+
+find_package(PkgConfig)
+pkg_check_modules(DEPS REQUIRED
+        gee-1.0>=0.6.0
+        gtk+-3.0>=3.0
+        libpeas-1.0>=1.0
+        sqlite3>=3.7.4
+        json-glib-1.0
+        libsoup-2.4
+        libpeas-gtk-1.0
+        gio-2.0
+        glib-2.0
+)
+
+set(CLINICA_PACKAGES
+	${CLINICA_USED_PACKAGES} clinica
+)
+vala_precompile (CLINICA_C clinica-vala
+	${CLINICA_SRC}
+PACKAGES
+	${CLINICA_PACKAGES}
+OPTIONS
+	--vapidir=${CMAKE_SOURCE_DIR}/vapi
+	--vapidir=${CMAKE_BINARY_DIR}/libclinica
+)
+
+if (WINDOWS_BUILD)
+add_custom_command (
+	OUTPUT clinica-rc.o
+	COMMAND ${CMAKE_RC_COMPILER} -o clinica-rc.o -O coff ${CMAKE_SOURCE_DIR}/data/clinica.rc
+)
+set (CLINICA_RC clinica-rc.o)
+endif (WINDOWS_BUILD)
+
+add_executable(clinica-client ${CLINICA_C} ${CLINICA_RC})
+add_definitions(${CLINICA_USED_CFLAGS} -I${CMAKE_BINARY_DIR}/libclinica)
+target_link_libraries (clinica-client clinica ${DEPS_LIBRARIES})
+set_target_properties(clinica-client PROPERTIES OUTPUT_NAME clinica)
+set_target_properties(clinica-client PROPERTIES LINKER_LANGUAGE C)
+
+INSTALL (TARGETS clinica-client
+	RUNTIME DESTINATION bin
+)
diff --git a/clinica/Clinica.vala b/clinica/Clinica.vala
index 0d3b983..2f2bca8 100644
--- a/clinica/Clinica.vala
+++ b/clinica/Clinica.vala
@@ -19,77 +19,11 @@
  */
  
 using Gtk;
- 
-namespace Clinica {
-    
-    /**
-     * @brief Main application 
-     */
-    public class Application {
-        
-        private static bool version;
-        
-        private const OptionEntry[] option_entries = {
-            { "version", 'v', 0, OptionArg.NONE, ref version, "Print version and exit", null },
-            { null }
-        };
-        
-        public static int main (string[] args) {
 
-            /* Init gtk */
-            Gtk.init (ref args);
-            
-            /* Init gdk threads */
-            Gdk.threads_init ();
-            
-            /* Parse options */
-            try {
-                var opt_context = new OptionContext ("- medical records manager");
-                opt_context.set_help_enabled (true);
-                opt_context.add_main_entries (option_entries, "clinica");
-                opt_context.parse (ref args);
-            } catch (OptionError e) {
-                stderr.printf ("Option parsing failed: %s\n", e.message);
-                return 1;
-            }
-            
-            if (version) {
-                stderr.printf (_("Clinica %s\n").printf (Config.PACKAGE_VERSION));
-                return 0;
-            }
-        
-            /* Init resource manager and connect error function
-             * to a message display for the user */
-            Gdk.threads_enter ();
-            var resources = new ResourceManager (args[0], Utils.show_error_message);
-            
-            /* Init gettext translation system */
-            Intl.textdomain("clinica");
-            
-            /* Check where are the translations. At the moment being we are sure that Italian
-             * translations are present, so check for them in the /usr/share/locale/ directory.
-             * If they are not present there, type with /usr/local, and if not present there, 
-             * try with autodetection. */
-            if (FileUtils.test("/usr/share/locale/it/LC_MESSAGES/clinica.mo", FileTest.IS_REGULAR))
-	            Intl.bindtextdomain("clinica", "/usr/share/locale");
-	        else if (FileUtils.test("/usr/local/share/locale/it/LC_MESSAGES/clinica.mo", FileTest.IS_REGULAR))
-	        	Intl.bindtextdomain("clinica", "/usr/local/share/locale");
-	        else
-	        	Intl.bindtextdomain("clinica", null);
-                                                            
-            /* Init resources */
-            resources.initResources();
+static int main (string [] args) {
 
-            /* Start interface and connect error signal */
-            var user_interface = new UserInterface (resources);
-            
-            /* Actually start the application */
-            user_interface.start ();
-            Gdk.threads_leave ();
-            
-            return 0;
-        }
-    } 
- 
- }
+    /* Create a new Clinica Application and run it. */
+    var app = new Clinica.Application (args);
+    return app.run (args);
 
+}
diff --git a/clinica/wscript b/clinica/wscript
deleted file mode 100644
index 90f5e03..0000000
--- a/clinica/wscript
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env python
-
-def build(bld):
-	bld.add_group ("clinica")
-	prog = bld(features='c cprogram')
-	bld.set_group ("clinica")
-
-	# symbolic name used to reference this object
-	prog.name = 'clinica.program'
-
-	# name of the resulting program
-	prog.target = 'clinica'
-	prog.source = 'Clinica.vala'
-
-	# Modules
-	prog.uselib = 'GOBJECT PEAS GTK+ GEE SQLITE PEASGTK'
-	prog.use = 'clinica.shlib'
-
-	# Vala packages to use
-	prog.packages = 'gtk+-3.0 Peas-1.0 PeasGtk-1.0 sqlite3 gee-1.0 config clinica'
-
-	# Extra vapi dirs
-	prog.vapi_dirs = [ '../vapi', '../libclinica' ]
-
-	# Extra includes
-	prog.includes = [ '.', '../libclinica' ]
diff --git a/cmake/FindVala.cmake b/cmake/FindVala.cmake
new file mode 100644
index 0000000..aa3a6e7
--- /dev/null
+++ b/cmake/FindVala.cmake
@@ -0,0 +1,65 @@
+##
+# Copyright 2009-2010 Jakob Westhoff. All rights reserved.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 
+#    1. Redistributions of source code must retain the above copyright notice,
+#       this list of conditions and the following disclaimer.
+# 
+#    2. Redistributions in binary form must reproduce the above copyright notice,
+#       this list of conditions and the following disclaimer in the documentation
+#       and/or other materials provided with the distribution.
+# 
+# THIS SOFTWARE IS PROVIDED BY JAKOB WESTHOFF ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL JAKOB WESTHOFF OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 
+# The views and conclusions contained in the software and documentation are those
+# of the authors and should not be interpreted as representing official policies,
+# either expressed or implied, of Jakob Westhoff
+##
+
+##
+# Find module for the Vala compiler (valac)
+#
+# This module determines wheter a Vala compiler is installed on the current
+# system and where its executable is.
+#
+# Call the module using "find_package(Vala) from within your CMakeLists.txt.
+#
+# The following variables will be set after an invocation:
+#
+#  VALA_FOUND       Whether the vala compiler has been found or not
+#  VALA_EXECUTABLE  Full path to the valac executable if it has been found
+#  VALA_VERSION     Version number of the available valac
+##
+
+
+# Search for the valac executable in the usual system paths.
+find_program(VALA_EXECUTABLE
+  NAMES valac)
+
+# Handle the QUIETLY and REQUIRED arguments, which may be given to the find call.
+# Furthermore set VALA_FOUND to TRUE if Vala has been found (aka.
+# VALA_EXECUTABLE is set)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Vala DEFAULT_MSG VALA_EXECUTABLE)
+
+mark_as_advanced(VALA_EXECUTABLE)
+
+# Determine the valac version
+if(VALA_FOUND)
+    execute_process(COMMAND ${VALA_EXECUTABLE} "--version" 
+                    OUTPUT_VARIABLE "VALA_VERSION")
+    string(REPLACE "Vala" "" "VALA_VERSION" ${VALA_VERSION})
+    string(STRIP ${VALA_VERSION} "VALA_VERSION")
+endif(VALA_FOUND)
diff --git a/cmake/GSettings.cmake b/cmake/GSettings.cmake
new file mode 100644
index 0000000..5902baa
--- /dev/null
+++ b/cmake/GSettings.cmake
@@ -0,0 +1,108 @@
+# GSettings.cmake
+# Originally based on CMake macros written for Marlin
+# Updated by Yorba for newer versions of GLib.
+#
+# NOTE: This module does an in-place compilation of GSettings; the
+#       resulting gschemas.compiled file will end up in the same
+#       source folder as the original schema(s).
+
+option(GSETTINGS_COMPILE "Compile GSettings schemas. Can be disabled for packaging reasons." ON)
+option(GSETTINGS_COMPILE_IN_PLACE "Compile GSettings schemas in the build folder. This is used for running an appliction without installing the GSettings systemwide.  The application will need to set GSETTINGS_SCHEMA_DIR" ON)
+
+if (GSETTINGS_COMPILE)
+    message(STATUS "GSettings schemas will be compiled.")
+endif ()
+
+if (GSETTINGS_COMPILE_IN_PLACE)
+    message(STATUS "GSettings schemas will be compiled in-place.")
+endif ()
+
+macro(add_schemas GSETTINGS_TARGET SCHEMA_DIRECTORY)
+    set(PKG_CONFIG_EXECUTABLE pkg-config)
+    
+    # Locate all schema files.
+    file(GLOB all_schema_files
+        "${SCHEMA_DIRECTORY}/*.gschema.xml"
+    )
+    
+    # Find the GLib path for schema installation
+    execute_process(
+        COMMAND
+            ${PKG_CONFIG_EXECUTABLE}
+            glib-2.0
+            --variable prefix
+        OUTPUT_VARIABLE
+            _glib_prefix
+        OUTPUT_STRIP_TRAILING_WHITESPACE
+    )
+    
+    set(GSETTINGS_DIR "${_glib_prefix}/share/glib-2.0/schemas/" CACHE INTERNAL "")
+    
+    # Fetch path for schema compiler from pkg-config
+    execute_process(
+        COMMAND
+            ${PKG_CONFIG_EXECUTABLE}
+            gio-2.0
+            --variable
+            glib_compile_schemas
+        OUTPUT_VARIABLE
+            _glib_compile_schemas
+        OUTPUT_STRIP_TRAILING_WHITESPACE
+    )
+    
+    set(glib_schema_compiler ${_glib_compile_schemas} CACHE INTERNAL "")
+    
+    if (GSETTINGS_COMPILE_IN_PLACE)
+        set(COMPILE_IN_PLACE_DIR ${CMAKE_BINARY_DIR}/gsettings)
+        add_custom_command(
+            TARGET
+                ${GSETTINGS_TARGET}
+            COMMAND 
+                ${CMAKE_COMMAND} -E make_directory "${COMPILE_IN_PLACE_DIR}"
+        )
+        
+        # Copy all schemas to the build folder.
+        foreach(schema_file ${all_schema_files})
+            add_custom_command(
+                TARGET
+                    ${GSETTINGS_TARGET}
+                COMMAND 
+                    ${CMAKE_COMMAND} -E copy "${schema_file}" "${COMPILE_IN_PLACE_DIR}"
+                COMMENT "Copying schema ${schema_file} to ${COMPILE_IN_PLACE_DIR}"
+            )
+        endforeach()
+        
+        # Compile schema in-place.
+        add_custom_command(
+            TARGET 
+                ${GSETTINGS_TARGET}
+            COMMAND
+                ${glib_schema_compiler} ${COMPILE_IN_PLACE_DIR}
+            COMMENT "Compiling schemas in folder: ${COMPILE_IN_PLACE_DIR}"
+        )
+    endif ()
+        
+    # Install and recompile schemas
+    message(STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}")
+    
+    install(
+        FILES
+            ${all_schema_files}
+        DESTINATION
+            ${GSETTINGS_DIR}
+        OPTIONAL
+    )
+    
+    if (GSETTINGS_COMPILE)
+        install(
+            CODE
+                "message (STATUS \"Compiling GSettings schemas\")"
+        )
+        
+        install(
+            CODE
+                "execute_process (COMMAND ${glib_schema_compiler} ${GSETTINGS_DIR})"
+        )
+    endif ()
+endmacro(add_schemas)
+
diff --git a/cmake/ParseArguments.cmake b/cmake/ParseArguments.cmake
new file mode 100644
index 0000000..717c0f5
--- /dev/null
+++ b/cmake/ParseArguments.cmake
@@ -0,0 +1,36 @@
+##
+# This is a helper Macro to parse optional arguments in Macros/Functions
+# It has been taken from the public CMake wiki.  
+# See http://www.cmake.org/Wiki/CMakeMacroParseArguments for documentation and
+# licensing.
+##
+macro(parse_arguments prefix arg_names option_names)
+  set(DEFAULT_ARGS)
+  foreach(arg_name ${arg_names})
+    set(${prefix}_${arg_name})
+  endforeach(arg_name)
+  foreach(option ${option_names})
+    set(${prefix}_${option} FALSE)
+  endforeach(option)
+
+  set(current_arg_name DEFAULT_ARGS)
+  set(current_arg_list)
+  foreach(arg ${ARGN})
+    set(larg_names ${arg_names})
+    list(FIND larg_names "${arg}" is_arg_name)
+    if(is_arg_name GREATER -1)
+      set(${prefix}_${current_arg_name} ${current_arg_list})
+      set(current_arg_name ${arg})
+      set(current_arg_list)
+    else(is_arg_name GREATER -1)
+      set(loption_names ${option_names})
+      list(FIND loption_names "${arg}" is_option)
+      if(is_option GREATER -1)
+	    set(${prefix}_${arg} TRUE)
+      else(is_option GREATER -1)
+	    set(current_arg_list ${current_arg_list} ${arg})
+      endif(is_option GREATER -1)
+    endif(is_arg_name GREATER -1)
+  endforeach(arg)
+  set(${prefix}_${current_arg_name} ${current_arg_list})
+endmacro(parse_arguments)
diff --git a/cmake/README.rst b/cmake/README.rst
new file mode 100644
index 0000000..bcc59b7
--- /dev/null
+++ b/cmake/README.rst
@@ -0,0 +1,173 @@
+==========
+Vala CMake
+==========
+:Author: 
+    Jakob Westhoff
+:Version:
+    Draft
+
+
+Overview
+========
+
+Vala CMake is a collection of macros for the CMake_ build system to allow the
+creation and management of projects developed using the Vala_ programming
+language or its "Genie" flavor (less tested).
+
+
+Installation
+============
+
+To use the Vala macros in your own project you need to copy the macro files to
+an arbitrary folder in your projects directory and reference them in your
+``CMakeLists.txt`` file.
+
+Assuming the macros are stored under ``cmake/vala`` in your projects folder you
+need to add the following information to your base ``CMakeLists.txt``::
+
+    list(APPEND CMAKE_MODULE_PATH 
+        ${CMAKE_SOURCE_DIR}/cmake/vala
+    )
+
+After the new module path as been added you can simply include the provided
+modules or use the provided find routines.
+
+
+Finding Vala
+============
+
+The find module for vala works like any other Find module in CMake.
+You can use it by simply calling the usual ``find_package`` function. Default
+parameters like ``REQUIRED`` and ``QUIETLY`` are supported.
+
+::
+
+    find_package(Vala REQUIRED)
+
+After a successful call to the find_package function the following variables 
+will be set:
+
+VALA_FOUND
+    Whether the vala compiler has been found or not
+
+VALA_EXECUTABLE
+    Full path to the valac executable if it has been found
+
+VALA_VERSION
+    Version number of the available valac
+
+
+Precompiling Vala sources
+=========================
+
+CMake is mainly supposed to handle c or c++ based projects. Luckily every vala
+program is translated into plain c code using the vala compiler, followed by
+normal compilation of the generated c program using gcc.
+
+The macro ``vala_precompile`` uses that fact to create c files from your .vala
+sources for further CMake processing. 
+
+The first parameter provided is a variable, which will be filled with a list of
+c files outputted by the vala compiler. This list can than be used in
+conjunction with functions like ``add_executable`` or others to create the
+necessary compile rules with CMake.
+
+The initial variable is followed by a list of .vala files to be compiled.
+Please take care to add every vala file belonging to the currently compiled
+project or library as Vala will otherwise not be able to resolve all
+dependencies.
+
+The following sections may be specified afterwards to provide certain options
+to the vala compiler:
+
+PACKAGES  
+    A list of vala packages/libraries to be used during the compile cycle. The
+    package names are exactly the same, as they would be passed to the valac
+    "--pkg=" option.
+
+OPTIONS
+    A list of optional options to be passed to the valac executable. This can be
+    used to pass "--thread" for example to enable multi-threading support.
+
+DIRECTORY
+    Specify the directory where the output source files will be stored. If 
+    ommitted, the source files will be stored in CMAKE_CURRENT_BINARY_DIR.
+
+CUSTOM_VAPIS
+    A list of custom vapi files to be included for compilation. This can be
+    useful to include freshly created vala libraries without having to install
+    them in the system.
+
+GENERATE_VAPI
+    Pass all the needed flags to the compiler to create an internal vapi for
+    the compiled library. The provided name will be used for this and a
+    <provided_name>.vapi file will be created.
+
+GENERATE_HEADER
+    Let the compiler generate a header file for the compiled code. There will
+    be a header file as well as an internal header file being generated called
+    <provided_name>.h and <provided_name>_internal.h
+
+The following call is a simple example to the vala_precompile macro showing an
+example to every of the optional sections::
+
+    vala_precompile(VALA_C
+        source1.vala
+        source2.vala
+        source3.vala
+    PACKAGES
+        gtk+-2.0
+        gio-1.0
+        posix
+    OPTIONS
+        --thread
+    CUSTOM_VAPIS
+        some_vapi.vapi
+    GENERATE_VAPI
+        myvapi
+    GENERATE_HEADER
+        myheader
+    )
+
+Most important is the variable VALA_C which will contain all the generated c
+file names after the call. The easiest way to use this information is to tell
+CMake to create an executable out of it.
+
+::
+
+    add_executable(myexecutable ${VALA_C})
+
+
+Further reading
+===============
+
+The `Pdf Presenter Console`__ , which is a vala based project of mine, makes
+heavy usage of the here described macros.  To look at a real world example of
+these macros the mentioned project is the right place to take a look. The svn
+trunk of it can be found at::
+
+	svn://pureenergy.cc/pdf_presenter_console/trunk
+
+
+__ http://westhoffswelt.de/projects/pdf_presenter_console.html
+
+
+Acknowledgments
+===============
+
+Thanks go out to Florian Sowade, a fellow local PHP-Usergroupie, who helped me
+a lot with the initial version of this macros and always answered my mostly
+dumb CMake questions.
+
+.. _CMake: http://cmake.org
+.. _Vala: http://live.gnome.org/Vala
+.. _Genie: http://live.gnome.org/Genie
+
+
+

+..
+   Local Variables:
+   mode: rst
+   fill-column: 79
+   End: 
+   vim: et syn=rst tw=79
diff --git a/cmake/Toolchain-Windows.cmake b/cmake/Toolchain-Windows.cmake
new file mode 100644
index 0000000..ad0c6c5
--- /dev/null
+++ b/cmake/Toolchain-Windows.cmake
@@ -0,0 +1,17 @@
+set(CMAKE_SYSTEM_NAME Windows)
+
+set(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
+set(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
+set(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
+
+# adjust the default behaviour of the FIND_XXX() commands:
+# search headers and libraries in the target environment, search
+# programs in the host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
+# Set some custom variables to disable the part of 
+# Clinica that are not supported (yet) under Windows. 
+set(WINDOWS_BUILD 1)
+set(DISABLE_PLUGINS 1)
diff --git a/cmake/Translations.cmake b/cmake/Translations.cmake
new file mode 100644
index 0000000..6c3bf0d
--- /dev/null
+++ b/cmake/Translations.cmake
@@ -0,0 +1,42 @@
+# Translations.cmake, CMake macros written for Marlin, feel free to re-use them
+
+macro(add_translations_directory NLS_PACKAGE)
+    add_custom_target (i18n ALL COMMENT "Building i18n messages.")
+    find_program (MSGFMT_EXECUTABLE msgfmt)
+    file (GLOB PO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.po)
+    foreach (PO_INPUT ${PO_FILES})
+        get_filename_component (PO_INPUT_BASE ${PO_INPUT} NAME_WE)
+        set (MO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PO_INPUT_BASE}.mo)
+        add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT})
+
+        install (FILES ${MO_OUTPUT} DESTINATION
+            share/locale/${PO_INPUT_BASE}/LC_MESSAGES
+            RENAME ${NLS_PACKAGE}.mo)
+    endforeach (PO_INPUT ${PO_FILES})
+endmacro(add_translations_directory)
+
+
+macro(add_translations_catalog NLS_PACKAGE)
+    add_custom_target (pot COMMENT "Building translation catalog.")
+    find_program (XGETTEXT_EXECUTABLE xgettext)
+
+
+    set(C_SOURCE "")
+
+    foreach(FILES_INPUT ${ARGN})
+        file (GLOB SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT}/*.c)
+        foreach(C_FILE ${SOURCE_FILES})
+            set(C_SOURCE ${C_SOURCE} ${C_FILE})
+        endforeach()
+        file (GLOB SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT}/*.vala)
+        foreach(C_FILE ${SOURCE_FILES})
+            set(C_SOURCE ${C_SOURCE} ${C_FILE})
+        endforeach()
+    endforeach()
+
+    add_custom_command (TARGET pot COMMAND
+        ${XGETTEXT_EXECUTABLE} -d ${NLS_PACKAGE} -o ${CMAKE_CURRENT_SOURCE_DIR}/${NLS_PACKAGE}.pot
+        ${VALA_SOURCE} ${C_SOURCE} --keyword="_" --from-code=UTF-8
+        )
+endmacro()
+
diff --git a/cmake/ValaPrecompile.cmake b/cmake/ValaPrecompile.cmake
new file mode 100644
index 0000000..6ab7fb2
--- /dev/null
+++ b/cmake/ValaPrecompile.cmake
@@ -0,0 +1,213 @@
+##
+# Copyright 2009-2010 Jakob Westhoff. All rights reserved.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 
+#    1. Redistributions of source code must retain the above copyright notice,
+#       this list of conditions and the following disclaimer.
+# 
+#    2. Redistributions in binary form must reproduce the above copyright notice,
+#       this list of conditions and the following disclaimer in the documentation
+#       and/or other materials provided with the distribution.
+# 
+# THIS SOFTWARE IS PROVIDED BY JAKOB WESTHOFF ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL JAKOB WESTHOFF OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 
+# The views and conclusions contained in the software and documentation are those
+# of the authors and should not be interpreted as representing official policies,
+# either expressed or implied, of Jakob Westhoff
+##
+
+include(ParseArguments)
+find_package(Vala REQUIRED)
+
+##
+# Compile vala files to their c equivalents for further processing. 
+#
+# The "vala_precompile" macro takes care of calling the valac executable on the
+# given source to produce c files which can then be processed further using
+# default cmake functions.
+# 
+# The first parameter provided is a variable, which will be filled with a list
+# of c files outputted by the vala compiler. This list can than be used in
+# conjuction with functions like "add_executable" or others to create the
+# neccessary compile rules with CMake.
+# 
+# The initial variable is followed by a list of .vala files to be compiled.
+# Please take care to add every vala file belonging to the currently compiled
+# project or library as Vala will otherwise not be able to resolve all
+# dependencies.
+# 
+# The following sections may be specified afterwards to provide certain options
+# to the vala compiler:
+# 
+# PACKAGES
+#   A list of vala packages/libraries to be used during the compile cycle. The
+#   package names are exactly the same, as they would be passed to the valac
+#   "--pkg=" option.
+# 
+# OPTIONS
+#   A list of optional options to be passed to the valac executable. This can be
+#   used to pass "--thread" for example to enable multi-threading support.
+#
+# CUSTOM_VAPIS
+#   A list of custom vapi files to be included for compilation. This can be
+#   useful to include freshly created vala libraries without having to install
+#   them in the system.
+#
+# GENERATE_VAPI
+#   Pass all the needed flags to the compiler to create an internal vapi for
+#   the compiled library. The provided name will be used for this and a
+#   <provided_name>.vapi file will be created.
+# 
+# GENERATE_HEADER
+#   Let the compiler generate a header file for the compiled code. There will
+#   be a header file as well as an internal header file being generated called
+#   <provided_name>.h and <provided_name>_internal.h
+#
+# GENERATE_GIR
+#   Have the compiler generate a GObject-Introspection repository file with
+#   name: <provided_name>.gir. This can be later used to create a binary typelib
+#   using the GI compiler.
+#
+# GENERATE_SYMBOLS
+#   Output a <provided_name>.symbols file containing all the exported symbols.
+# 
+# The following call is a simple example to the vala_precompile macro showing
+# an example to every of the optional sections:
+#
+#   vala_precompile(VALA_C mytargetname
+#       source1.vala
+#       source2.vala
+#       source3.vala
+#   PACKAGES
+#       gtk+-2.0
+#       gio-1.0
+#       posix
+#   DIRECTORY
+#       gen
+#   OPTIONS
+#       --thread
+#   CUSTOM_VAPIS
+#       some_vapi.vapi
+#   GENERATE_VAPI
+#       myvapi
+#   GENERATE_HEADER
+#       myheader
+#   GENERATE_GIR
+#       mygir
+#   GENERATE_SYMBOLS
+#       mysymbols
+#   )
+#
+# Most important is the variable VALA_C which will contain all the generated c
+# file names after the call.
+##
+
+macro(vala_precompile output target_name)
+    parse_arguments(ARGS "TARGET;PACKAGES;OPTIONS;DIRECTORY;GENERATE_GIR;GENERATE_SYMBOLS;GENERATE_HEADER;GENERATE_VAPI;CUSTOM_VAPIS" "" ${ARGN})
+
+    if(ARGS_DIRECTORY)
+        set(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${ARGS_DIRECTORY})
+    else(ARGS_DIRECTORY)
+        set(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+    endif(ARGS_DIRECTORY)
+    include_directories(${DIRECTORY})
+    set(vala_pkg_opts "")
+    foreach(pkg ${ARGS_PACKAGES})
+        list(APPEND vala_pkg_opts "--pkg=${pkg}")
+    endforeach(pkg ${ARGS_PACKAGES})
+    set(in_files "")
+    set(out_files "")
+    set(out_files_display "")
+    set(${output} "")
+    foreach(src ${ARGS_DEFAULT_ARGS})
+        list(APPEND in_files "${CMAKE_CURRENT_SOURCE_DIR}/${src}")
+        string(REPLACE ".vala" ".c" src ${src})
+        string(REPLACE ".gs" ".c" src ${src})
+        set(out_file "${DIRECTORY}/${src}")
+        list(APPEND out_files "${DIRECTORY}/${src}")
+        list(APPEND out_files_display "${src}")
+        list(APPEND ${output} ${out_file})
+    endforeach(src ${ARGS_DEFAULT_ARGS})
+
+    set(custom_vapi_arguments "")
+    if(ARGS_CUSTOM_VAPIS)
+        foreach(vapi ${ARGS_CUSTOM_VAPIS})
+            list(APPEND custom_vapi_arguments ${vapi})
+        endforeach(vapi ${ARGS_CUSTOM_VAPIS})
+    endif(ARGS_CUSTOM_VAPIS)
+
+    set(vapi_arguments "")
+    if(ARGS_GENERATE_VAPI)
+        list(APPEND out_files "${DIRECTORY}/${ARGS_GENERATE_VAPI}.vapi")
+        list(APPEND out_files_display "${ARGS_GENERATE_VAPI}.vapi")
+        set(vapi_arguments "--library=${ARGS_GENERATE_VAPI}" "--vapi=${ARGS_GENERATE_VAPI}.vapi")
+    endif(ARGS_GENERATE_VAPI)
+
+    set(header_arguments "")
+    if(ARGS_GENERATE_HEADER)
+        list(APPEND out_files "${DIRECTORY}/${ARGS_GENERATE_HEADER}.h")
+        list(APPEND out_files_display "${ARGS_GENERATE_HEADER}.h")
+        list(APPEND header_arguments "--header=${ARGS_GENERATE_HEADER}.h")
+    endif(ARGS_GENERATE_HEADER)
+
+    set(gir_arguments "")
+    if(ARGS_GENERATE_GIR)
+        list(APPEND out_files "${DIRECTORY}/${ARGS_GENERATE_GIR}.gir")
+        list(APPEND out_files_display "${ARGS_GENERATE_GIR}.gir")
+        set(gir_arguments "--gir=${ARGS_GENERATE_GIR}.gir")
+    endif(ARGS_GENERATE_GIR)
+
+    set(symbols_arguments "")
+    if(ARGS_GENERATE_SYMBOLS)
+        list(APPEND out_files "${DIRECTORY}/${ARGS_GENERATE_SYMBOLS}.symbols")
+        list(APPEND out_files_display "${ARGS_GENERATE_SYMBOLS}.symbols")
+        set(symbols_arguments "--symbols=${ARGS_GENERATE_SYMBOLS}.symbols")
+    endif(ARGS_GENERATE_SYMBOLS)
+
+    # Workaround for a bug that would make valac run twice. This file is written
+    # after the vala compiler generates C source code.
+    set(OUTPUT_STAMP ${CMAKE_CURRENT_BINARY_DIR}/${target_name}_valac.stamp)
+
+    add_custom_command(
+    OUTPUT
+        ${OUTPUT_STAMP}
+    COMMAND 
+        ${VALA_EXECUTABLE} 
+    ARGS 
+        "-C" 
+        ${header_arguments} 
+        ${vapi_arguments} 
+        ${gir_arguments} 
+        ${symbols_arguments} 
+        "-b" ${CMAKE_CURRENT_SOURCE_DIR} 
+        "-d" ${DIRECTORY} 
+        ${vala_pkg_opts} 
+        ${ARGS_OPTIONS} 
+        ${in_files} 
+        ${custom_vapi_arguments}
+    COMMAND
+        touch
+    ARGS
+        ${OUTPUT_STAMP}
+    DEPENDS 
+        ${in_files} 
+        ${ARGS_CUSTOM_VAPIS}
+    COMMENT
+        "Generating ${out_files_display}"
+    )
+
+    # This command will be run twice for some reason (pass a non-empty string to COMMENT
+    # in order to see it). Since valac is not executed from here, this won't be a problem.
+    add_custom_command(OUTPUT ${out_files} DEPENDS ${OUTPUT_STAMP} COMMENT "")
+endmacro(vala_precompile)
diff --git a/cmake/ValaVersion.cmake b/cmake/ValaVersion.cmake
new file mode 100644
index 0000000..3fff193
--- /dev/null
+++ b/cmake/ValaVersion.cmake
@@ -0,0 +1,96 @@
+##
+# Copyright 2009-2010 Jakob Westhoff. All rights reserved.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 
+#    1. Redistributions of source code must retain the above copyright notice,
+#       this list of conditions and the following disclaimer.
+# 
+#    2. Redistributions in binary form must reproduce the above copyright notice,
+#       this list of conditions and the following disclaimer in the documentation
+#       and/or other materials provided with the distribution.
+# 
+# THIS SOFTWARE IS PROVIDED BY JAKOB WESTHOFF ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL JAKOB WESTHOFF OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 
+# The views and conclusions contained in the software and documentation are those
+# of the authors and should not be interpreted as representing official policies,
+# either expressed or implied, of Jakob Westhoff
+##
+
+include(ParseArguments)
+find_package(Vala REQUIRED)
+
+##
+# Ensure a certain valac version is available
+#
+# The initial argument is the version to check for
+# 
+# It may be followed by a optional parameter to specifiy a version range. The
+# following options are valid:
+# 
+# EXACT
+#   Vala needs to be available in the exact version given
+# 
+# MINIMUM
+#   The provided version is the minimum version. Therefore Vala needs to be
+#   available in the given version or any higher version
+#
+# MAXIMUM
+#   The provided version is the maximum. Therefore Vala needs to be available
+#   in the given version or any version older than this
+#
+# If no option is specified the version will be treated as a minimal version.
+##
+macro(ensure_vala_version version)
+    parse_arguments(ARGS "" "MINIMUM;MAXIMUM;EXACT" ${ARGN})
+	set(compare_message "")
+	set(error_message "")
+	if(ARGS_MINIMUM)
+		set(compare_message "a minimum ")
+		set(error_message "or greater ")
+	elseif(ARGS_MAXIMUM)
+		set(compare_message "a maximum ")
+		set(error_message "or less ")
+	endif(ARGS_MINIMUM)
+	
+	message(STATUS 
+		"checking for ${compare_message}Vala version of ${version}"
+	)
+
+	unset(version_accepted)
+	
+	# MINIMUM is the default if no option is specified
+	if(ARGS_EXACT)
+		if(${VALA_VERSION} VERSION_EQUAL ${version} )
+			set(version_accepted TRUE)	
+		endif(${VALA_VERSION} VERSION_EQUAL ${version})
+	elseif(ARGS_MAXIMUM)
+		if(${VALA_VERSION} VERSION_LESS ${version} OR ${VALA_VERSION} VERSION_EQUAL ${version})
+			set(version_accepted TRUE)	
+		endif(${VALA_VERSION} VERSION_LESS ${version} OR ${VALA_VERSION} VERSION_EQUAL ${version})
+	else(ARGS_MAXIMUM)
+		if(${VALA_VERSION} VERSION_GREATER ${version} OR ${VALA_VERSION} VERSION_EQUAL ${version})
+			set(version_accepted TRUE)	
+		endif(${VALA_VERSION} VERSION_GREATER ${version} OR ${VALA_VERSION} VERSION_EQUAL ${version})
+	endif(ARGS_EXACT)
+
+	if (NOT version_accepted)
+		message(FATAL_ERROR 
+			"Vala version ${version} ${error_message}is required."
+		)
+	endif(NOT version_accepted)
+
+	message(STATUS
+		"  found Vala, version ${VALA_VERSION}"
+	)
+endmacro(ensure_vala_version)
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..60860ad
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,18 @@
+/*
+ * Header file with constants autogenerated
+ * in Clinica build process. 
+ */
+
+/* This is the version of the package built */
+#define VERSION "@VERSION@"
+
+/* The name of the Gettext package where translations 
+ * can be found. */
+#define GETTEXT_PACKAGE "@GETTEXT_PACKAGE@"
+
+/* The version of the package of Clinica */
+#define PACKAGE_VERSION "@PACKAGE_VERSION@"
+
+/* The base for the GResource items that will be loaded
+ * in Clinica. */
+#define RESOURCE_BASE "@RESOURCE_BASE@"
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
new file mode 100644
index 0000000..c224bf5
--- /dev/null
+++ b/data/CMakeLists.txt
@@ -0,0 +1,22 @@
+include (GSettings)
+add_schemas(clinica-schemas ${CMAKE_SOURCE_DIR}/data/org.phcteam.clinica.gschema.xml)
+
+install (FILES
+	clinica.desktop
+	DESTINATION share/applications
+)
+
+install (FILES
+	org.phcteam.clinica.gschema.xml
+	DESTINATION share/glib-2.0/schemas
+)
+
+install (FILES
+	clinica.svg
+	DESTINATION share/pixmaps
+)
+
+install (FILES org.phcteam.clinica.service
+	DESTINATION share/dbus-1/services)
+
+add_subdirectory (help)
diff --git a/data/build_windows_installer.sh b/data/build_windows_installer.sh
new file mode 100755
index 0000000..557c56c
--- /dev/null
+++ b/data/build_windows_installer.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+#
+# Build a Windows installer for Clinica using NSIS.
+# The current version of Clinica is downloaded from the most
+# recent one compiled by the OpenSUSE Build Service.
+#
+# You can check how recent that is by visiting http://build.opensuse.org/
+#
+# Author: Leonardo Robol <leo at robol.it>
+#
+# Please bear in mind that this script is not meant to be totally bullet-proof.
+# It's more like a guide on the installer creation process.
+
+OPENSUSE_VERSION="openSUSE_12.2"
+NSIS=`find ~/.wine/ -name makensis.exe -print0`
+
+if [ "$NSIS" == "" ]; then
+  echo "makensis.exe not found in ~/.wine. Please install NSIS"
+  exit 1
+fi
+
+SCRIPT=$(readlink -f $0)
+SCRIPTPATH=$(dirname $SCRIPT)
+
+if [ ! -x "download-mingw-rpm.py" ]; then
+  wget -q https://raw.github.com/mkbosmans/download-mingw-rpm/master/download-mingw-rpm.py
+  chmod a+x download-mingw-rpm.py
+fi
+
+rm -rf usr
+
+python3 download-mingw-rpm.py -p home:lrobol -r "$OPENSUSE_VERSION" --deps mingw32-clinica
+python3 download-mingw-rpm.py --no-clean -r "$OPENSUSE_VERSION" --deps \
+	mingw32-gtk3 mingw32-sqlite mingw32-glib2 mingw32-rsvg2 mingw32-libgee \
+	mingw32-librsvg mingw32-libsoup\
+
+# Compile GSettings schema
+glib-compile-schemas usr/i686-w64-mingw32/sys-root/mingw/share/glib-2.0/schemas/
+
+# Create NSIS installer
+cd usr/i686-w64-mingw32/sys-root/mingw/
+cat $SCRIPTPATH/clinica-installer.nsi | $NSIS -
+
+# Copy the result back  :)
+mv SetupClinica.exe ../../../../
diff --git a/data/clinica-installer.nsi b/data/clinica-installer.nsi
new file mode 100644
index 0000000..fa4d916
--- /dev/null
+++ b/data/clinica-installer.nsi
@@ -0,0 +1,155 @@
+; Clinica.nsi
+;
+; This script is based on example1.nsi, but it remember the directory, 
+; has uninstall support and (optionally) installs start menu shortcuts.
+;
+; It will install example2.nsi into a directory that the user selects,
+
+!include "MUI2.nsh"
+
+!define MUI_COMPONENTSPAGE_SMALLDESC "Clinica medical records manager";
+; !define MUI_UI "SetupClinica.exe" ;
+!define MUI_INSTFILESPAGE_COLORS "AAAAFF 000000" ;
+
+;--------------------------------
+
+; The name of the installer
+Name "Clinica"
+
+; The file to write
+OutFile "SetupClinica.exe"
+
+; The default installation directory
+InstallDir $PROGRAMFILES\PhcTeam\Clinica
+
+; Registry key to check for directory (so if you install again, it will 
+; overwrite the old one automatically)
+InstallDirRegKey HKLM "Software\NSIS_Clinica" "Install_Dir"
+
+; Request application privileges for Windows Vista
+RequestExecutionLevel admin
+
+Var StartMenuFolder
+
+!define MUI_ABORTWARNING
+
+!insertmacro MUI_LANGUAGE "English"
+
+;--------------------------------
+
+; Pages
+
+  !insertmacro MUI_PAGE_LICENSE "/usr/share/common-licenses/GPL-3"
+  !insertmacro MUI_PAGE_COMPONENTS
+  !insertmacro MUI_PAGE_DIRECTORY
+
+;Start Menu Folder Page Configuration
+  !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU" 
+  !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\NSIS_Clinica" 
+  !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Clinica"
+  
+  !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
+  
+  !insertmacro MUI_PAGE_INSTFILES
+  
+  !insertmacro MUI_UNPAGE_CONFIRM
+  !insertmacro MUI_UNPAGE_INSTFILES
+
+  !insertmacro MUI_UNPAGE_CONFIRM
+  !insertmacro MUI_UNPAGE_INSTFILES
+
+;--------------------------------
+
+; The stuff to install
+Section "Clinica" SecClinica
+
+  ; Set output path to the installation directory.
+  SetOutPath $INSTDIR
+  
+  ; Put file there
+  File /r *
+
+  ; Write the installation path into the registry
+  WriteRegStr HKLM SOFTWARE\NSIS_Clinica "Install_Dir" "$INSTDIR"
+  
+  ; Write the uninstall keys for Windows
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Clinica" "Clinica" "Clinica"
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Clinica" "Uninstall" '"$INSTDIR\uninstall.exe"'
+  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Clinica" "NoModify" 1
+  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Clinica" "NoRepair" 1
+  WriteUninstaller "uninstall.exe"
+
+  SetOutPath $INSTDIR\bin
+
+  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+    CreateDirectory "$SMPROGRAMS\Clinica"
+    CreateShortCut "$SMPROGRAMS\Clinica\Uninstall Clinica.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
+    CreateShortCut "$SMPROGRAMS\Clinica\Clinica.lnk" "$INSTDIR\bin\clinica.exe"
+  !insertmacro MUI_STARTMENU_WRITE_END
+  
+SectionEnd
+
+; Descriptions
+  LangString DESC_SecClinica ${LANG_ENGLISH} "Clinica components selection."
+  LangString MUI_TEXT_LICENSE_TITLE ${LANG_ENGLISH} "License terms for Clinica"
+  LangString MUI_TEXT_LICENSE_SUBTITLE ${LANG_ENGLISH} "Please accept the following terms to use Clinica."
+  LangString MUI_TEXT_COMPONENTS_TITLE ${LANG_ENGLISH} "Clinica components"
+  LangString MUI_TEXT_COMPONENTS_SUBTITLE ${LANG_ENGLISH} "Please select the components of Clinica that you want to install on the system."
+  	LangString MUI_INNERTEXT_LICENSE_BOTTOM ${LANG_ENGLISH} "For more information ses http://fsf.org/"
+	LangString MUI_INNERTEXT_LICENSE_TOP ${LANG_ENGLISH} "Clinica is licensed with GPL3"
+	LangString MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE ${LANG_ENGLISH} "Details"
+	LangString MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO ${LANG_ENGLISH}  "Base files for the Clinica installation"
+	LangString MUI_TEXT_DIRECTORY_TITLE ${LANG_ENGLISH}  "Clinica installation path"
+	LangString MUI_TEXT_DIRECTORY_SUBTITLE ${LANG_ENGLISH}  "Select the directory where Clinica will be installed"
+	LangString MUI_TEXT_STARTMENU_TITLE ${LANG_ENGLISH}  "Clinica"
+	LangString MUI_TEXT_STARTMENU_SUBTITLE ${LANG_ENGLISH}   "Installation of the start menu entries"
+	LangString MUI_INNERTEXT_STARTMENU_CHECKBOX ${LANG_ENGLISH} ""
+	LangString MUI_INNERTEXT_STARTMENU_TOP  ${LANG_ENGLISH} ""
+	LangString MUI_TEXT_INSTALLING_TITLE ${LANG_ENGLISH}  "Clinica is installing on the system"
+	LangString MUI_TEXT_INSTALLING_SUBTITLE  ${LANG_ENGLISH} "Please wait while all the files are copied in place"
+	LangString MUI_TEXT_FINISH_TITLE ${LANG_ENGLISH}  "Clinica has been installed"
+	LangString MUI_TEXT_FINISH_SUBTITLE ${LANG_ENGLISH}  "You may now start it from the Windows menu"
+	LangString MUI_TEXT_ABORT_TITLE ${LANG_ENGLISH}  "Aborting Clinica installation"
+	LangString MUI_TEXT_ABORT_SUBTITLE ${LANG_ENGLISH}  "Installation has been interrupted"
+	LangString MUI_UNTEXT_CONFIRM_TITLE  ${LANG_ENGLISH} ""
+	LangString MUI_UNTEXT_CONFIRM_SUBTITLE ${LANG_ENGLISH} ""
+	LangString MUI_UNTEXT_UNINSTALLING_TITLE ${LANG_ENGLISH} ""
+	LangString MUI_UNTEXT_UNINSTALLING_SUBTITLE ${LANG_ENGLISH} ""
+	LangString MUI_UNTEXT_FINISH_TITLE ${LANG_ENGLISH} ""
+	LangString MUI_UNTEXT_FINISH_SUBTITLE ${LANG_ENGLISH} ""
+	LangString MUI_UNTEXT_ABORT_TITLE ${LANG_ENGLISH} ""
+	LangString MUI_UNTEXT_ABORT_SUBTITLE ${LANG_ENGLISH} ""
+  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+    !insertmacro        MUI_DESCRIPTION_TEXT ${SecClinica} $(DESC_SecClinica)
+  !insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+
+; Uninstaller
+
+Section "Uninstall"
+  
+  ; Remove registry keys
+  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Clinica"
+  DeleteRegKey HKLM SOFTWARE\NSIS_Clinica
+
+  ; Remove files and uninstaller
+
+  Delete $INSTDIR\uninstall.exe
+
+  ; Remove shortcuts, if any
+  RMDir /r $INSTDIR\bin
+  RMDir /r $INSTDIR\lib
+  RMDir /r $INSTDIR\share
+  RMDir /r $INSTDIR\include
+  RMDir /r $INSTDIR\etc
+
+  RMDir $INSTDIR
+  
+  ; !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
+
+  ; Remove directories used
+  RMDir "$SMPROGRAMS\Clinica"
+
+  DeleteRegKey /ifempty HKCU "Software/NSIS_Clinica"
+
+SectionEnd
diff --git a/data/clinica.desktop b/data/clinica.desktop
new file mode 100644
index 0000000..a0b7b35
--- /dev/null
+++ b/data/clinica.desktop
@@ -0,0 +1,20 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=Clinica
+Comment=Medical records manager
+Exec=clinica
+Icon=clinica
+Terminal=false
+Categories=Application;GTK;
+X-Ayatana-Desktop-Shortcuts=NewPatient;Calendar;
+
+[NewPatient Shortcut Group]
+Name=Create a new patient
+Exec=clinica --new-patient
+OnlyShowIn=Unity;
+
+[Calendar Shortcut Group]
+Name=Show the calendar
+Exec=clinica --calendar
+OnlyShowIn=Unity;
diff --git a/data/clinica.gresource.xml b/data/clinica.gresource.xml
new file mode 100644
index 0000000..c8c0591
--- /dev/null
+++ b/data/clinica.gresource.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/phcteam/clinica">
+    <file preprocess="xml-stripblanks">ui/start_page.glade</file>
+    <file preprocess="xml-stripblanks">ui/doctor_editor.glade</file>
+    <file preprocess="xml-stripblanks">ui/doctor_list_toolbar.glade</file>
+    <file preprocess="xml-stripblanks">ui/patient_list_sidebar.glade</file>
+    <file preprocess="xml-stripblanks">ui/doctor_list_sidebar.glade</file>
+    <file preprocess="xml-stripblanks">ui/patient_list_toolbar.glade</file>
+    <file preprocess="xml-stripblanks">ui/patient_editor.glade</file>
+    <file preprocess="xml-stripblanks">ui/visit_scheduler.glade</file>
+    <file preprocess="xml-stripblanks">ui/authentication_dialog.glade</file>
+    <file preprocess="xml-stripblanks">ui/import_dialog.glade</file>
+    <file preprocess="xml-stripblanks">ui/settings_window.glade</file>
+    <file preprocess="xml-stripblanks">ui/wait_dialog.glade</file>
+    <file preprocess="xml-stripblanks">ui/medicine_editor.glade</file>
+    <file preprocess="xml-stripblanks">ui/medicine_browser.glade</file>
+    <file>ui/icons/logo.svg</file>
+    <file>ui/icons/small_close.png</file>
+    <file>ui/icons/small_print.png</file>
+    <file>ui/icons/small_remove_2.png</file>
+    <file>ui/icons/mobile.svg</file>
+    <file>ui/icons/doctor.png</file>
+    <file>ui/icons/small_plus.png</file>
+    <file>ui/icons/small_vcard.png</file>
+    <file>ui/icons/small_attach.png</file>
+    <file>ui/icons/small_calendar.png</file>
+    <file>ui/icons/flask.png</file>
+    <file>ui/icons/search.png</file>
+    <file>ui/icons/lens-nav-clinica.png</file>
+    <file>ui/icons/doctor.svg</file>
+    <file>ui/icons/small_left_arrow.png</file>
+    <file>ui/icons/small_file.png</file>
+    <file>ui/icons/patient.svg</file>
+    <file>ui/icons/clinica.png</file>
+    <file>ui/icons/logo.png</file>
+    <file>ui/icons/calendar_edit.png</file>
+    <file>ui/icons/small_unshare.png</file>
+    <file>ui/icons/flask.svg</file>
+    <file>ui/icons/small_notes_2.png</file>
+    <file>ui/icons/small_pencil.png</file>
+    <file>ui/icons/info.png</file>
+    <file>ui/icons/calendar.png</file>
+    <file>ui/icons/small_thin_arrow_left.png</file>
+    <file>ui/icons/doctors.png</file>
+    <file>ui/icons/patient.png</file>
+    <file>ui/icons/phone.svg</file>
+    <file>ui/icons/small_ok_2.png</file>
+    <file>ui/icons/doctors.svg</file>
+    <file>ui/icons/search.svg</file>
+    <file>ui/icons/lens-nav-clinica.svg</file>
+    <file>ui/icons/small_pdf.png</file>
+    <file>ui/icons/new_small_attach.png</file>
+    <file>ui/icons/calendar_delete.png</file>
+    <file>ui/icons/user.png</file>
+    <file>ui/icons/calendar.svg</file>
+    <file>ui/icons/patients.svg</file>
+    <file>ui/icons/small_log_file.png</file>
+    <file>ui/icons/small_medicinal_drink.png</file>
+    <file>ui/icons/small_cardio.png</file>
+    <file>ui/icons/mobile.png</file>
+    <file>ui/icons/phone.png</file>
+    <file>ui/icons/page_edit.png</file>
+    <file>ui/icons/patients.png</file>
+    <file>ui/icons/clinica.svg</file>
+    <file>ui.xml</file>
+  </gresource>
+</gresources>
diff --git a/data/clinica.ico b/data/clinica.ico
new file mode 100644
index 0000000..adee8f3
Binary files /dev/null and b/data/clinica.ico differ
diff --git a/data/clinica.lens b/data/clinica.lens
new file mode 100644
index 0000000..4b4cd89
--- /dev/null
+++ b/data/clinica.lens
@@ -0,0 +1,11 @@
+[Lens]
+DBusName=org.phcteam.clinica
+DBusPath=/org/phcteam/clinica/lens/patients
+Name=Patients
+Icon=/usr/share/unity/5/lens-nav-clinica.svg
+Description=A Lens to search my stuff
+SearchHint=Search your stuff
+Shortcut=c
+
+[Desktop Entry]
+X-Ubuntu-Gettext-Domain=clinica
diff --git a/data/clinica.rc b/data/clinica.rc
new file mode 100644
index 0000000..361863a
--- /dev/null
+++ b/data/clinica.rc
@@ -0,0 +1,25 @@
+id ICON clinica.ico
+1 VERSIONINFO
+FILEVERSION     1,0,0,0
+PRODUCTVERSION  1,0,0,0
+BEGIN
+  BLOCK "StringFileInfo"
+  BEGIN
+    BLOCK "080904E4"
+    BEGIN
+      VALUE "CompanyName", "PHCTeam"
+      VALUE "FileDescription", "Clinica"
+      VALUE "FileVersion", "0.2.9"
+      VALUE "InternalName", "clinica"
+      VALUE "LegalCopyright", "PHCTeam"
+      VALUE "OriginalFilename", "clinica.exe"
+      VALUE "ProductName", "Clinica"
+      VALUE "ProductVersion", "0.2.9"
+    END
+  END
+
+  BLOCK "VarFileInfo"
+  BEGIN
+    VALUE "Translation", 0x809, 1252
+  END
+END
diff --git a/help/C/figures/clinica.svg b/data/clinica.svg
similarity index 100%
copy from help/C/figures/clinica.svg
copy to data/clinica.svg
diff --git a/data/generate_resources.sh b/data/generate_resources.sh
new file mode 100755
index 0000000..9e37e9f
--- /dev/null
+++ b/data/generate_resources.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+#
+# Script to generate the clinica.gresource.xml file
+#
+#
+
+BASEDIR=resources
+RESOURCE_FILE=clinica.gresource.xml
+
+cat > "$RESOURCE_FILE" <<EOF
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/phcteam/clinica">
+EOF
+
+for file in `find $BASEDIR/ -type f`; do
+  filename=$(echo $file | sed "s/resources\///")
+  opts=""
+  echo $filename | grep "\.glade$" > /dev/null
+  if [ "$?" -eq "0" ]; then
+    opts=" preprocess=\"xml-stripblanks\""
+  fi
+  echo "    <file$opts>$filename</file>" >> "$RESOURCE_FILE"
+done
+
+cat >> "$RESOURCE_FILE" <<EOF
+  </gresource>
+</gresources>
+EOF
+
+
diff --git a/data/glade/clinica.xml b/data/glade/clinica.xml
new file mode 100644
index 0000000..60de449
--- /dev/null
+++ b/data/glade/clinica.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+  <glade-catalog name="clinica" library="libclinica.so" depends="gtk+">
+
+    <glade-widget-classes>
+      <glade-widget-class name="ClinicaCalendarView" generic-name="clinica_calendar_view" title="Calendar View" />
+      <glade-widget-class name="ClinicaDateTimePicker" generic-name="clinica_date_time_picker" title="DateTime picker" />
+      <glade-widget-class name="ClinicaPatientEntry" generic-name="clinica_patient_entry" title="Patient Entry" />
+      <glade-widget-class name="ClinicaToolbar" generic-name="clinica_toolbar" title="Clinica Toolbar" />
+    </glade-widget-classes>
+
+    <glade-widget-group name="clinica-widgets" title="Clinica Widgets">
+      <glade-widget-class-ref name="ClinicaCalendarView" />
+      <glade-widget-class-ref name="ClinicaPatientEntry" />
+      <glade-widget-class-ref name="ClinicaDateTimePicker" />
+      <glade-widget-class-ref name="ClinicaToolbar" />
+    </glade-widget-group>
+
+</glade-catalog>
diff --git a/help/C/clinica-calendar.page b/data/help/C/clinica-calendar.page
similarity index 100%
rename from help/C/clinica-calendar.page
rename to data/help/C/clinica-calendar.page
diff --git a/help/C/clinica-manage-doctors.page b/data/help/C/clinica-manage-doctors.page
similarity index 100%
rename from help/C/clinica-manage-doctors.page
rename to data/help/C/clinica-manage-doctors.page
diff --git a/help/C/clinica-manage-patients.page b/data/help/C/clinica-manage-patients.page
similarity index 100%
rename from help/C/clinica-manage-patients.page
rename to data/help/C/clinica-manage-patients.page
diff --git a/help/C/clinica-manage-visits.page b/data/help/C/clinica-manage-visits.page
similarity index 100%
rename from help/C/clinica-manage-visits.page
rename to data/help/C/clinica-manage-visits.page
diff --git a/help/C/clinica-search-medicines.page b/data/help/C/clinica-search-medicines.page
similarity index 100%
rename from help/C/clinica-search-medicines.page
rename to data/help/C/clinica-search-medicines.page
diff --git a/ui/icons/clinica.svg b/data/help/C/figures/clinica.svg
similarity index 100%
rename from ui/icons/clinica.svg
rename to data/help/C/figures/clinica.svg
diff --git a/help/C/index.page b/data/help/C/index.page
similarity index 100%
rename from help/C/index.page
rename to data/help/C/index.page
diff --git a/help/C/intro.page b/data/help/C/intro.page
similarity index 100%
rename from help/C/intro.page
rename to data/help/C/intro.page
diff --git a/data/help/CMakeLists.txt b/data/help/CMakeLists.txt
new file mode 100644
index 0000000..2caedc5
--- /dev/null
+++ b/data/help/CMakeLists.txt
@@ -0,0 +1,17 @@
+install (FILES
+
+C/index.page
+C/clinica-manage-doctors.page
+C/clinica-calendar.page
+C/clinica-manage-visits.page
+C/clinica-manage-patients.page
+C/intro.page
+C/clinica-search-medicines.page
+
+DESTINATION share/gnome/help/clinica/C)
+
+install (FILES
+	C/figures/clinica.svg
+	DESTINATION share/gnome/help/clinica/C/figures
+)
+
diff --git a/data/org.phcteam.clinica.gschema.xml b/data/org.phcteam.clinica.gschema.xml
new file mode 100644
index 0000000..e49a578
--- /dev/null
+++ b/data/org.phcteam.clinica.gschema.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schemalist>
+  <schema id="org.phcteam.clinica" path="/org/phcteam/clinica/" gettext-domain="clinica">
+    <key type="b" name="use-plugins">
+      <default>true</default>
+      <summary>Enable plugins loading in Clinica</summary>
+      <description>Setting this to true will load plugins in Clinica on startup. Otherwise they will not be available.</description>
+    </key>
+    <key name="active-plugins" type="as">
+      <default>["CodiceFiscale"]</default>
+      <summary>Active plugins</summary>
+      <description>A list of string with the name of the active plugins in Clinica</description>
+    </key>
+    <key name="medicine-search-engines" type="as">
+      <default>[]</default>
+      <summary>Selected medicine search engines</summary>
+      <description>The name of the search engines that the user wants to lookup medicines.</description>
+    </key>
+    <key name="data-provider" type="s">
+      <default>""</default>
+      <summary>Selected data provider</summary>
+      <description>The name of the data provider used to retrieve the data in Clinica.</description>
+    </key>
+    <key name="show-visit-file-manager" type="b">
+      <default>true</default>
+      <summary>Show "Open file browser" button in the visit window</summary>
+    </key>
+    <key name="password" type="s">
+      <default>"password"</default>
+      <summary>The password used to sync with the clinica instance via wireless</summary>
+    </key>
+    <key name="data-server-activated" type="b">
+      <default>false</default>
+      <summary>Allow other clinica client on the LAN to use the local database</summary>
+    </key>
+    <key name="data-server-username" type="s">
+      <default>""</default>
+      <summary>Username used to authenticate on the DataServer</summary>
+    </key>
+    <key name="data-server-password" type="s">
+      <default>""</default>
+      <summary>SHA1 hash of the password used to authenticate on the DataServer</summary>
+    </key>
+    <key name="network-data-provider-host" type="s">
+      <summary>Remote host to connect</summary>
+      <default>"localhost"</default>
+    </key>
+    <key name="network-data-provider-port" type="s">
+      <summary>Remote port for the connection</summary>
+      <default>"20843"</default>
+    </key>
+    <key name="personal-details-name" type="s">
+      <summary>The name of the doctor using clinica</summary>
+      <default>""</default>
+    </key>
+    <key name="personal-details-address" type="s">
+      <summary>The address of the doctor using clinica</summary>
+      <default>""</default>
+    </key>
+    <key name="personal-details-institution" type="s">
+      <summary>The institution whose the doctor using clinica is part of</summary>
+      <default>""</default>
+    </key>
+    <key name="personal-details-email" type="s">
+      <summary>The email of the doctor using clinica</summary>
+      <default>""</default>
+    </key>
+  </schema>
+</schemalist>
diff --git a/data/org.phcteam.clinica.service b/data/org.phcteam.clinica.service
new file mode 100644
index 0000000..aa16990
--- /dev/null
+++ b/data/org.phcteam.clinica.service
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.phcteam.clinica
+Exec=/usr/bin/clinica -d
diff --git a/data/resources/ui.xml b/data/resources/ui.xml
new file mode 100644
index 0000000..73d6898
--- /dev/null
+++ b/data/resources/ui.xml
@@ -0,0 +1,35 @@
+<ui>
+  <menubar name="MainMenu">
+    <menu name="FileMenu" action="FileAction">
+      <menuitem name="New Patient" action="NewPatientAction" />
+      <menuitem name="New Doctor" action="NewDoctorAction" />
+      <placeholder name="FileMenuAdditions" />
+      <separator />
+      <menuitem name="Quit" action="QuitAction" />
+    </menu>
+    
+    <menu name="ViewMenu" action="ViewAction">
+      <menuitem name="Start page" action="StartPageAction" />
+      <menuitem name="Patients" action="PatientsAction" />
+      <menuitem name="Doctors" action="DoctorsAction" />
+      <menuitem name="Search medicines" action="SearchMedicinesAction" />
+      <placeholder name="ViewMenuAdditions" />
+    </menu>
+    
+    <menu name="ToolsMenu" action="ToolsAction">
+      <menuitem name="Settings" action="SettingsAction" />
+      <menuitem name="Backup" action="BackupAction" />
+      <menuitem name="ImportData" action="ImportDataAction" />
+      <menuitem name="AddMedicines" action="AddMedicinesAction" />
+      <menuitem name="BrowseMedicines" action="BrowseMedicinesAction" />
+      <placeholder name="ToolsMenuAdditions" />
+    </menu>
+
+    <menu name="HelpMenu" action="HelpAction">
+      <menuitem name="Contents" action="ContentsAction" />
+      <menuitem name="Report a bug" action="ReportABugAction" />
+      <menuitem name="About" action="AboutAction" />
+      <placeholder name="HelpMenuAdditions" />
+    </menu>
+  </menubar>
+</ui>
diff --git a/data/resources/ui/authentication_dialog.glade b/data/resources/ui/authentication_dialog.glade
new file mode 100644
index 0000000..cd1d5d1
--- /dev/null
+++ b/data/resources/ui/authentication_dialog.glade
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkBox" id="content_area">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="margin_left">6</property>
+    <property name="margin_right">6</property>
+    <property name="margin_top">6</property>
+    <property name="margin_bottom">6</property>
+    <property name="orientation">vertical</property>
+    <property name="spacing">6</property>
+    <child>
+      <object class="GtkLabel" id="label1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">The server requires authentication. Please insert your credentials:</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkGrid" id="grid1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="row_spacing">6</property>
+        <property name="column_spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="label2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Username</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Password</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="username_entry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hexpand">True</property>
+            <property name="invisible_char">•</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="password_entry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hexpand">True</property>
+            <property name="visibility">False</property>
+            <property name="invisible_char">•</property>
+            <property name="activates_default">True</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkImage" id="image1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="stock">gtk-dialog-authentication</property>
+            <property name="icon-size">6</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">2</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/data/resources/ui/doctor_editor.glade b/data/resources/ui/doctor_editor.glade
new file mode 100644
index 0000000..a146972
--- /dev/null
+++ b/data/resources/ui/doctor_editor.glade
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkBox" id="content_area">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="orientation">vertical</property>
+    <property name="spacing">2</property>
+    <child>
+      <object class="GtkHBox" id="hbox2">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">8</property>
+        <child>
+          <object class="GtkImage" id="image1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="pixbuf">icons/doctor.png</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Doctor:</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="padding">8</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="given_name_entry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="invisible_char">•</property>
+            <property name="text" translatable="yes">Name</property>
+            <property name="invisible_char_set">True</property>
+            <property name="primary_icon_activatable">False</property>
+            <property name="secondary_icon_activatable">False</property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="surname_entry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="invisible_char">•</property>
+            <property name="text" translatable="yes">Surname</property>
+            <property name="invisible_char_set">True</property>
+            <property name="primary_icon_activatable">False</property>
+            <property name="secondary_icon_activatable">False</property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkHSeparator" id="hseparator1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="padding">8</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkAlignment" id="alignment1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="top_padding">10</property>
+        <property name="bottom_padding">10</property>
+        <property name="left_padding">20</property>
+        <property name="right_padding">20</property>
+        <child>
+          <object class="GtkTable" id="table1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="n_rows">2</property>
+            <property name="n_columns">3</property>
+            <property name="row_spacing">5</property>
+            <child>
+              <object class="GtkImage" id="image2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="pixbuf">icons/phone.png</property>
+                <property name="pixel_size">32</property>
+              </object>
+              <packing>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Phone:</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Mobile:</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="phone_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">•</property>
+                <property name="invisible_char_set">True</property>
+                <property name="primary_icon_activatable">False</property>
+                <property name="secondary_icon_activatable">False</property>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="mobile_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">•</property>
+                <property name="invisible_char_set">True</property>
+                <property name="primary_icon_activatable">False</property>
+                <property name="secondary_icon_activatable">False</property>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="right_attach">3</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkImage" id="image3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="pixbuf">icons/mobile.png</property>
+                <property name="pixel_size">32</property>
+              </object>
+              <packing>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="x_options">GTK_FILL</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">3</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/ui/doctor_list_sidebar.glade b/data/resources/ui/doctor_list_sidebar.glade
similarity index 100%
rename from ui/doctor_list_sidebar.glade
rename to data/resources/ui/doctor_list_sidebar.glade
diff --git a/ui/doctor_list_toolbar.glade b/data/resources/ui/doctor_list_toolbar.glade
similarity index 58%
rename from ui/doctor_list_toolbar.glade
rename to data/resources/ui/doctor_list_toolbar.glade
index bebb90c..f687c55 100644
--- a/ui/doctor_list_toolbar.glade
+++ b/data/resources/ui/doctor_list_toolbar.glade
@@ -1,22 +1,31 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <requires lib="gtk+" version="2.24"/>
-  <!-- interface-naming-policy project-wide -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkVBox" id="left_vbox">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <child>
-      <object class="GtkEntry" id="find_entry">
+      <object class="GtkBox" id="top_box">
         <property name="visible">True</property>
-        <property name="can_focus">True</property>
-        <property name="invisible_char">•</property>
-        <property name="invisible_char_set">True</property>
-        <property name="primary_icon_stock">gtk-find</property>
-        <property name="secondary_icon_stock">gtk-clear</property>
-        <property name="primary_icon_activatable">True</property>
-        <property name="secondary_icon_activatable">True</property>
-        <property name="primary_icon_sensitive">True</property>
-        <property name="secondary_icon_sensitive">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkEntry" id="find_entry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="invisible_char">•</property>
+            <property name="invisible_char_set">True</property>
+            <property name="primary_icon_stock">gtk-find</property>
+            <property name="secondary_icon_stock">gtk-clear</property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
       </object>
       <packing>
         <property name="expand">False</property>
@@ -29,13 +38,10 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="top_padding">5</property>
-        <property name="left_padding">0</property>
         <child>
           <object class="GtkScrolledWindow" id="treeview_scrolled_window">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
-            <property name="hscrollbar_policy">automatic</property>
-            <property name="vscrollbar_policy">automatic</property>
             <property name="shadow_type">in</property>
             <child>
               <placeholder/>
diff --git a/data/resources/ui/icons/calendar.png b/data/resources/ui/icons/calendar.png
new file mode 100644
index 0000000..badd75e
Binary files /dev/null and b/data/resources/ui/icons/calendar.png differ
diff --git a/ui/icons/calendar.svg b/data/resources/ui/icons/calendar.svg
similarity index 100%
rename from ui/icons/calendar.svg
rename to data/resources/ui/icons/calendar.svg
diff --git a/ui/icons/calendar_delete.png b/data/resources/ui/icons/calendar_delete.png
similarity index 100%
rename from ui/icons/calendar_delete.png
rename to data/resources/ui/icons/calendar_delete.png
diff --git a/ui/icons/calendar_edit.png b/data/resources/ui/icons/calendar_edit.png
similarity index 100%
rename from ui/icons/calendar_edit.png
rename to data/resources/ui/icons/calendar_edit.png
diff --git a/data/resources/ui/icons/clinica.png b/data/resources/ui/icons/clinica.png
new file mode 100644
index 0000000..59ddde0
Binary files /dev/null and b/data/resources/ui/icons/clinica.png differ
diff --git a/help/C/figures/clinica.svg b/data/resources/ui/icons/clinica.svg
similarity index 100%
copy from help/C/figures/clinica.svg
copy to data/resources/ui/icons/clinica.svg
diff --git a/data/resources/ui/icons/doctor.png b/data/resources/ui/icons/doctor.png
new file mode 100644
index 0000000..ab0d8da
Binary files /dev/null and b/data/resources/ui/icons/doctor.png differ
diff --git a/ui/icons/doctor.svg b/data/resources/ui/icons/doctor.svg
similarity index 100%
rename from ui/icons/doctor.svg
rename to data/resources/ui/icons/doctor.svg
diff --git a/data/resources/ui/icons/doctors.png b/data/resources/ui/icons/doctors.png
new file mode 100644
index 0000000..a544fc9
Binary files /dev/null and b/data/resources/ui/icons/doctors.png differ
diff --git a/ui/icons/doctors.svg b/data/resources/ui/icons/doctors.svg
similarity index 100%
rename from ui/icons/doctors.svg
rename to data/resources/ui/icons/doctors.svg
diff --git a/data/resources/ui/icons/flask.png b/data/resources/ui/icons/flask.png
new file mode 100644
index 0000000..e30932c
Binary files /dev/null and b/data/resources/ui/icons/flask.png differ
diff --git a/ui/icons/flask.svg b/data/resources/ui/icons/flask.svg
similarity index 100%
rename from ui/icons/flask.svg
rename to data/resources/ui/icons/flask.svg
diff --git a/ui/icons/info.png b/data/resources/ui/icons/info.png
similarity index 100%
rename from ui/icons/info.png
rename to data/resources/ui/icons/info.png
diff --git a/data/resources/ui/icons/lens-nav-clinica.png b/data/resources/ui/icons/lens-nav-clinica.png
new file mode 100644
index 0000000..37e8a74
Binary files /dev/null and b/data/resources/ui/icons/lens-nav-clinica.png differ
diff --git a/help/C/figures/clinica.svg b/data/resources/ui/icons/lens-nav-clinica.svg
similarity index 93%
rename from help/C/figures/clinica.svg
rename to data/resources/ui/icons/lens-nav-clinica.svg
index 5a10299..f7c5e64 100644
--- a/help/C/figures/clinica.svg
+++ b/data/resources/ui/icons/lens-nav-clinica.svg
@@ -14,7 +14,7 @@
    height="48px"
    id="svg8280"
    sodipodi:version="0.32"
-   inkscape:version="0.48.1 r9760"
+   inkscape:version="0.48.3.1 r9886"
    sodipodi:docname="clinica.svg"
    inkscape:output_extension="org.inkscape.output.svg.inkscape"
    version="1.1">
@@ -1417,6 +1417,111 @@
        y1="36.587513"
        x2="31.022463"
        y2="39.902069" />
+    <filter
+       id="filter4129"
+       inkscape:label="Desaturate"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       inkscape:menu="Color"
+       inkscape:menu-tooltip="Render in shades of gray by reducing saturation to zero"
+       color-interpolation-filters="sRGB">
+      <feColorMatrix
+         id="feColorMatrix4131"
+         type="saturate"
+         values="0" />
+    </filter>
+    <filter
+       id="filter4133"
+       inkscape:label="Desaturate"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       inkscape:menu="Color"
+       inkscape:menu-tooltip="Render in shades of gray by reducing saturation to zero"
+       color-interpolation-filters="sRGB">
+      <feColorMatrix
+         id="feColorMatrix4135"
+         type="saturate"
+         values="0" />
+    </filter>
+    <filter
+       id="filter4137"
+       inkscape:label="Desaturate"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       inkscape:menu="Color"
+       inkscape:menu-tooltip="Render in shades of gray by reducing saturation to zero"
+       color-interpolation-filters="sRGB">
+      <feColorMatrix
+         id="feColorMatrix4139"
+         type="saturate"
+         values="0" />
+    </filter>
+    <filter
+       id="filter4141"
+       inkscape:label="Desaturate"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       inkscape:menu="Color"
+       inkscape:menu-tooltip="Render in shades of gray by reducing saturation to zero"
+       color-interpolation-filters="sRGB">
+      <feColorMatrix
+         id="feColorMatrix4143"
+         type="saturate"
+         values="0" />
+    </filter>
+    <filter
+       id="filter4145"
+       inkscape:label="Desaturate"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       inkscape:menu="Color"
+       inkscape:menu-tooltip="Render in shades of gray by reducing saturation to zero"
+       color-interpolation-filters="sRGB">
+      <feColorMatrix
+         id="feColorMatrix4147"
+         type="saturate"
+         values="0" />
+    </filter>
+    <filter
+       id="filter4149"
+       inkscape:label="Desaturate"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       inkscape:menu="Color"
+       inkscape:menu-tooltip="Render in shades of gray by reducing saturation to zero"
+       color-interpolation-filters="sRGB">
+      <feColorMatrix
+         id="feColorMatrix4151"
+         type="saturate"
+         values="0" />
+    </filter>
+    <filter
+       id="filter4153"
+       inkscape:label="Desaturate"
+       x="0"
+       y="0"
+       width="1"
+       height="1"
+       inkscape:menu="Color"
+       inkscape:menu-tooltip="Render in shades of gray by reducing saturation to zero"
+       color-interpolation-filters="sRGB">
+      <feColorMatrix
+         id="feColorMatrix4155"
+         type="saturate"
+         values="0" />
+    </filter>
   </defs>
   <sodipodi:namedview
      id="base"
@@ -1445,6 +1550,7 @@
         <dc:format>image/svg+xml</dc:format>
         <dc:type
            rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
       </cc:Work>
     </rdf:RDF>
   </metadata>
@@ -1455,17 +1561,17 @@
     <path
        d="M 44.5,13.499999 C 44.509551,12.006147 44.007812,11.500064 42.5,11.500064 L 19.5,11.500064 L 17,9.0000636 C 16.733724,8.7406596 16.376484,8.4999986 16,8.4999986 L 5.4999966,8.4999986 C 4.0126556,8.4999986 3.4687466,9.0164676 3.4999966,10.5 L 3.4999966,41.5 L 44.5,41.5 L 44.5,13.499999 z"
        id="path15"
-       style="fill:#eeeeec;fill-opacity:1;stroke:url(#linearGradient17644);stroke-width:0.99986976;stroke-miterlimit:4;stroke-dasharray:none"
+       style="fill:#eeeeec;fill-opacity:1;stroke:url(#linearGradient17644);stroke-width:0.99986976000000005;stroke-miterlimit:4;stroke-dasharray:none;filter:url(#filter4129)"
        sodipodi:nodetypes="cccccccccc" />
     <path
        d="M 43.5,13.500063 C 43.491872,12.58655 43.444558,12.511112 42.5,12.500063 L 19,12.500063 L 16.5,10.000064 C 16.060821,9.3837566 15.95093,9.5313136 15,9.5000636 L 4.9999956,9.5000636 C 4.2856446,9.5000636 4.4999956,9.8123796 4.4999956,10.500064 L 4.4999966,40.5 L 43.5,40.5 L 43.5,13.500063 z"
        id="path7263"
-       style="opacity:1;fill:none;fill-opacity:1;stroke:url(#linearGradient17646);stroke-width:0.9999525;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       style="opacity:1;fill:none;fill-opacity:1;stroke:url(#linearGradient17646);stroke-width:0.99995250000000002;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4133)"
        sodipodi:nodetypes="cccccccccc" />
     <g
        id="g13071"
        transform="matrix(2.3640267e-2,0,0,2.1950125e-2,45.026494,37.807815)"
-       style="display:inline">
+       style="display:inline;filter:url(#filter4137)">
       <rect
          y="-150.69685"
          x="-1559.2523"
@@ -1485,16 +1591,16 @@
          sodipodi:nodetypes="cccc" />
     </g>
     <path
-       style="opacity:0.5;fill:url(#linearGradient9133);fill-opacity:1;display:inline;enable-background:new"
+       style="opacity:0.50000000000000000;fill:url(#linearGradient9133);fill-opacity:1;display:inline;enable-background:new;filter:url(#filter4141)"
        id="path39053"
        d="M 4.0007386,21 C 4.0038266,21.291666 4.0069146,21.625833 4.0100026,22 L 43.990736,22 C 43.993824,21.625833 43.996912,21.291666 44,21 L 3.9999976,21 L 4.0007386,21 z" />
     <path
        d="M 45.25,40.5 C 45.21963,41.085484 44.58205,41.500209 44,41.500209 L 3.9999986,41.500209 C 3.4179589,41.500209 2.7806889,41.085484 2.7499989,40.5 L 1.4999989,23.5 C 1.4576589,22.915583 1.9179489,22.499791 2.4999989,22.499791 L 45.5,22.499791 C 46.08205,22.499791 46.54444,22.915583 46.5,23.5 L 45.25,40.5 L 45.25,40.5 z"
        id="path39063"
-       style="opacity:0.9;fill:url(#linearGradient9645);fill-opacity:1;stroke:url(#linearGradient9647);stroke-width:0.99958181;stroke-miterlimit:4;stroke-dasharray:none;display:inline;enable-background:new"
+       style="opacity:0.90000000000000002;fill:url(#linearGradient9645);fill-opacity:1;stroke:url(#linearGradient9647);stroke-width:0.99958181000000002;stroke-miterlimit:4;stroke-dasharray:none;display:inline;enable-background:new;filter:url(#filter4145)"
        sodipodi:nodetypes="cccccccccc" />
     <rect
-       style="fill:url(#linearGradient9649);fill-opacity:1;stroke:none;display:inline;enable-background:new"
+       style="fill:url(#linearGradient9649);fill-opacity:1;stroke:none;display:inline;enable-background:new;filter:url(#filter4149)"
        id="rect3521-5"
        width="44"
        height="1"
@@ -1504,7 +1610,8 @@
        ry="0" />
     <g
        id="g4403"
-       transform="translate(-36.971583,-3.9395949)">
+       transform="translate(-36.971583,-3.9395949)"
+       style="filter:url(#filter4153)">
       <g
          transform="translate(30.609273,5.4334982)"
          id="g3912">
diff --git a/data/resources/ui/icons/logo.png b/data/resources/ui/icons/logo.png
new file mode 100644
index 0000000..ab752ca
Binary files /dev/null and b/data/resources/ui/icons/logo.png differ
diff --git a/ui/icons/logo.svg b/data/resources/ui/icons/logo.svg
similarity index 100%
rename from ui/icons/logo.svg
rename to data/resources/ui/icons/logo.svg
diff --git a/data/resources/ui/icons/mobile.png b/data/resources/ui/icons/mobile.png
new file mode 100644
index 0000000..1f9cd35
Binary files /dev/null and b/data/resources/ui/icons/mobile.png differ
diff --git a/ui/icons/mobile.svg b/data/resources/ui/icons/mobile.svg
similarity index 100%
rename from ui/icons/mobile.svg
rename to data/resources/ui/icons/mobile.svg
diff --git a/data/resources/ui/icons/new_small_attach.png b/data/resources/ui/icons/new_small_attach.png
new file mode 100644
index 0000000..7c5a106
Binary files /dev/null and b/data/resources/ui/icons/new_small_attach.png differ
diff --git a/ui/icons/page_edit.png b/data/resources/ui/icons/page_edit.png
similarity index 100%
rename from ui/icons/page_edit.png
rename to data/resources/ui/icons/page_edit.png
diff --git a/data/resources/ui/icons/patient.png b/data/resources/ui/icons/patient.png
new file mode 100644
index 0000000..5ab967c
Binary files /dev/null and b/data/resources/ui/icons/patient.png differ
diff --git a/ui/icons/patient.svg b/data/resources/ui/icons/patient.svg
similarity index 100%
rename from ui/icons/patient.svg
rename to data/resources/ui/icons/patient.svg
diff --git a/data/resources/ui/icons/patients.png b/data/resources/ui/icons/patients.png
new file mode 100644
index 0000000..aa5d397
Binary files /dev/null and b/data/resources/ui/icons/patients.png differ
diff --git a/ui/icons/patients.svg b/data/resources/ui/icons/patients.svg
similarity index 100%
rename from ui/icons/patients.svg
rename to data/resources/ui/icons/patients.svg
diff --git a/data/resources/ui/icons/phone.png b/data/resources/ui/icons/phone.png
new file mode 100644
index 0000000..cfdb19e
Binary files /dev/null and b/data/resources/ui/icons/phone.png differ
diff --git a/ui/icons/phone.svg b/data/resources/ui/icons/phone.svg
similarity index 100%
rename from ui/icons/phone.svg
rename to data/resources/ui/icons/phone.svg
diff --git a/data/resources/ui/icons/search.png b/data/resources/ui/icons/search.png
new file mode 100644
index 0000000..65afae2
Binary files /dev/null and b/data/resources/ui/icons/search.png differ
diff --git a/ui/icons/search.svg b/data/resources/ui/icons/search.svg
similarity index 100%
rename from ui/icons/search.svg
rename to data/resources/ui/icons/search.svg
diff --git a/data/resources/ui/icons/small_attach.png b/data/resources/ui/icons/small_attach.png
new file mode 100644
index 0000000..df16199
Binary files /dev/null and b/data/resources/ui/icons/small_attach.png differ
diff --git a/data/resources/ui/icons/small_calendar.png b/data/resources/ui/icons/small_calendar.png
new file mode 100644
index 0000000..793f663
Binary files /dev/null and b/data/resources/ui/icons/small_calendar.png differ
diff --git a/data/resources/ui/icons/small_cardio.png b/data/resources/ui/icons/small_cardio.png
new file mode 100644
index 0000000..d1cd70c
Binary files /dev/null and b/data/resources/ui/icons/small_cardio.png differ
diff --git a/data/resources/ui/icons/small_close.png b/data/resources/ui/icons/small_close.png
new file mode 100644
index 0000000..34abb6b
Binary files /dev/null and b/data/resources/ui/icons/small_close.png differ
diff --git a/data/resources/ui/icons/small_file.png b/data/resources/ui/icons/small_file.png
new file mode 100644
index 0000000..46ff7ca
Binary files /dev/null and b/data/resources/ui/icons/small_file.png differ
diff --git a/data/resources/ui/icons/small_left_arrow.png b/data/resources/ui/icons/small_left_arrow.png
new file mode 100644
index 0000000..5e72651
Binary files /dev/null and b/data/resources/ui/icons/small_left_arrow.png differ
diff --git a/data/resources/ui/icons/small_log_file.png b/data/resources/ui/icons/small_log_file.png
new file mode 100644
index 0000000..c7c7672
Binary files /dev/null and b/data/resources/ui/icons/small_log_file.png differ
diff --git a/data/resources/ui/icons/small_medicinal_drink.png b/data/resources/ui/icons/small_medicinal_drink.png
new file mode 100644
index 0000000..f071eeb
Binary files /dev/null and b/data/resources/ui/icons/small_medicinal_drink.png differ
diff --git a/data/resources/ui/icons/small_notes_2.png b/data/resources/ui/icons/small_notes_2.png
new file mode 100644
index 0000000..ed84e1f
Binary files /dev/null and b/data/resources/ui/icons/small_notes_2.png differ
diff --git a/data/resources/ui/icons/small_ok_2.png b/data/resources/ui/icons/small_ok_2.png
new file mode 100644
index 0000000..38fd865
Binary files /dev/null and b/data/resources/ui/icons/small_ok_2.png differ
diff --git a/data/resources/ui/icons/small_pdf.png b/data/resources/ui/icons/small_pdf.png
new file mode 100644
index 0000000..ca31892
Binary files /dev/null and b/data/resources/ui/icons/small_pdf.png differ
diff --git a/data/resources/ui/icons/small_pencil.png b/data/resources/ui/icons/small_pencil.png
new file mode 100644
index 0000000..e0ca8fe
Binary files /dev/null and b/data/resources/ui/icons/small_pencil.png differ
diff --git a/data/resources/ui/icons/small_plus.png b/data/resources/ui/icons/small_plus.png
new file mode 100644
index 0000000..be6ca03
Binary files /dev/null and b/data/resources/ui/icons/small_plus.png differ
diff --git a/data/resources/ui/icons/small_print.png b/data/resources/ui/icons/small_print.png
new file mode 100644
index 0000000..36bdeeb
Binary files /dev/null and b/data/resources/ui/icons/small_print.png differ
diff --git a/data/resources/ui/icons/small_remove_2.png b/data/resources/ui/icons/small_remove_2.png
new file mode 100644
index 0000000..4b3bcdc
Binary files /dev/null and b/data/resources/ui/icons/small_remove_2.png differ
diff --git a/data/resources/ui/icons/small_thin_arrow_left.png b/data/resources/ui/icons/small_thin_arrow_left.png
new file mode 100644
index 0000000..ec258c5
Binary files /dev/null and b/data/resources/ui/icons/small_thin_arrow_left.png differ
diff --git a/data/resources/ui/icons/small_unshare.png b/data/resources/ui/icons/small_unshare.png
new file mode 100644
index 0000000..a5cc285
Binary files /dev/null and b/data/resources/ui/icons/small_unshare.png differ
diff --git a/data/resources/ui/icons/small_vcard.png b/data/resources/ui/icons/small_vcard.png
new file mode 100644
index 0000000..98e2366
Binary files /dev/null and b/data/resources/ui/icons/small_vcard.png differ
diff --git a/ui/icons/user.png b/data/resources/ui/icons/user.png
similarity index 100%
rename from ui/icons/user.png
rename to data/resources/ui/icons/user.png
diff --git a/data/resources/ui/import_dialog.glade b/data/resources/ui/import_dialog.glade
new file mode 100644
index 0000000..4771b2f
--- /dev/null
+++ b/data/resources/ui/import_dialog.glade
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkBox" id="content_area">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="margin_left">6</property>
+    <property name="margin_right">6</property>
+    <property name="margin_top">6</property>
+    <property name="margin_bottom">6</property>
+    <property name="orientation">vertical</property>
+    <property name="spacing">6</property>
+    <child>
+      <object class="GtkBox" id="box1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="label1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">Source:	</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFileChooserButton" id="filechooserbutton">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <property name="action">select-folder</property>
+            <property name="title" translatable="yes">Select the backup folder</property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkLabel" id="label2">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="xalign">0</property>
+        <property name="label" translatable="yes"><b>Warning:</b> Please note that the current data in the database <b>will be definitely lost</b>. Consider performing a backup of the current data before importing the old one.</property>
+        <property name="use_markup">True</property>
+        <property name="wrap">True</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">2</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/data/resources/ui/medicine_browser.glade b/data/resources/ui/medicine_browser.glade
new file mode 100644
index 0000000..8aae8c3
--- /dev/null
+++ b/data/resources/ui/medicine_browser.glade
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkBox" id="content_area">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="orientation">vertical</property>
+    <child>
+      <object class="GtkToolbar" id="toolbar">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkToolButton" id="new_toolbutton">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="is_important">True</property>
+            <property name="label" translatable="yes">New medicine</property>
+            <property name="use_underline">True</property>
+            <property name="stock_id">gtk-new</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="homogeneous">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkToolButton" id="edit_toolbutton">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Edit medicine</property>
+            <property name="use_underline">True</property>
+            <property name="stock_id">gtk-edit</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="homogeneous">True</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkToolButton" id="delete_toolbutton">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Delete medicine</property>
+            <property name="use_underline">True</property>
+            <property name="stock_id">gtk-remove</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="homogeneous">True</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkScrolledWindow" id="scrolledwindow1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="shadow_type">in</property>
+        <child>
+          <object class="GtkTreeView" id="treeview">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <child>
+              <object class="GtkTreeViewColumn" id="treeviewcolumn1">
+                <property name="title" translatable="yes">Name</property>
+                <property name="expand">True</property>
+                <child>
+                  <object class="GtkCellRendererText" id="cellrenderertext1"/>
+                  <attributes>
+                    <attribute name="text">0</attribute>
+                  </attributes>
+                </child>
+              </object>
+            </child>
+            <child>
+              <object class="GtkTreeViewColumn" id="treeviewcolumn2">
+                <property name="title" translatable="yes">Price</property>
+                <child>
+                  <object class="GtkCellRendererText" id="cellrenderertext2"/>
+                  <attributes>
+                    <attribute name="text">4</attribute>
+                  </attributes>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/data/resources/ui/medicine_editor.glade b/data/resources/ui/medicine_editor.glade
new file mode 100644
index 0000000..87e267c
--- /dev/null
+++ b/data/resources/ui/medicine_editor.glade
@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkBox" id="content_area">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="margin_left">6</property>
+    <property name="margin_right">6</property>
+    <property name="margin_top">6</property>
+    <property name="orientation">vertical</property>
+    <child>
+      <object class="GtkBox" id="box1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkImage" id="image1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="pixbuf">icons/flask.png</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label7">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="yalign">0</property>
+            <property name="label" translatable="yes"><b>Note:</b> medicines inserted here will be available only on this Clinica installation. They will not be shared on the network, but they can be backupped with the menu item Tools -> Backup.</property>
+            <property name="use_markup">True</property>
+            <property name="wrap">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkSeparator" id="separator1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="margin_top">6</property>
+        <property name="margin_bottom">6</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkGrid" id="grid">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="row_spacing">6</property>
+        <property name="column_spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="label1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">Name:</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="name_entry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hexpand">True</property>
+            <property name="invisible_char">•</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">0</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">Description:</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="description_entry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="invisible_char">•</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">Active ingredient:</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">2</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="active_ingredient_entry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="invisible_char">•</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">2</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label4">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Storage reccomendations:</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">3</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label5">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">Price:</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">4</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label6">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="valign">start</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">Other notes:</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">5</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="storage_reccomendations_entry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="invisible_char">•</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">3</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="price_entry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="invisible_char">•</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">4</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkScrolledWindow" id="scrolledwindow1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="vexpand">True</property>
+            <property name="shadow_type">in</property>
+            <child>
+              <object class="GtkTextView" id="other_notes_textview">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">5</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">2</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/data/resources/ui/patient_editor.glade b/data/resources/ui/patient_editor.glade
new file mode 100644
index 0000000..78067f3
--- /dev/null
+++ b/data/resources/ui/patient_editor.glade
@@ -0,0 +1,373 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkBox" id="content_area">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="orientation">vertical</property>
+    <property name="spacing">2</property>
+    <child>
+      <object class="GtkHBox" id="hbox2">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="spacing">5</property>
+        <child>
+          <object class="GtkEventBox" id="patient_eventbox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkImage" id="patient_image">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="pixbuf">icons/patient.png</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Patient:</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="padding">8</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="given_name_entry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="invisible_char">•</property>
+            <property name="text" translatable="yes">Name</property>
+            <property name="invisible_char_set">True</property>
+            <property name="primary_icon_activatable">False</property>
+            <property name="secondary_icon_activatable">False</property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="surname_entry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="invisible_char">•</property>
+            <property name="text" translatable="yes">Surname</property>
+            <property name="invisible_char_set">True</property>
+            <property name="primary_icon_activatable">False</property>
+            <property name="secondary_icon_activatable">False</property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkHSeparator" id="hseparator1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="padding">10</property>
+        <property name="position">2</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkTable" id="table1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="n_rows">4</property>
+        <property name="n_columns">4</property>
+        <property name="column_spacing">5</property>
+        <property name="row_spacing">5</property>
+        <child>
+          <object class="GtkLabel" id="label5">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="xpad">5</property>
+            <property name="label" translatable="yes">Gender:</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkComboBox" id="gender_combobox">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="model">gender_store</property>
+            <property name="active">0</property>
+            <child>
+              <object class="GtkCellRendererText" id="cellrenderertext1"/>
+              <attributes>
+                <attribute name="text">0</attribute>
+              </attributes>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label4">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="xpad">5</property>
+            <property name="label" translatable="yes">Date of birth:</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="right_attach">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">2</property>
+            <child>
+              <object class="GtkEntry" id="day_entry">
+                <property name="width_request">24</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">•</property>
+                <property name="width_chars">2</property>
+                <property name="text" translatable="yes">dd</property>
+                <property name="invisible_char_set">True</property>
+                <property name="primary_icon_activatable">False</property>
+                <property name="secondary_icon_activatable">False</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">/</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="month_entry">
+                <property name="width_request">24</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">•</property>
+                <property name="width_chars">2</property>
+                <property name="text" translatable="yes">mm</property>
+                <property name="invisible_char_set">True</property>
+                <property name="primary_icon_activatable">False</property>
+                <property name="secondary_icon_activatable">False</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">/</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="year_entry">
+                <property name="width_request">48</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">•</property>
+                <property name="width_chars">4</property>
+                <property name="text" translatable="yes">yyyy</property>
+                <property name="invisible_char_set">True</property>
+                <property name="primary_icon_activatable">False</property>
+                <property name="secondary_icon_activatable">False</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">3</property>
+            <property name="right_attach">4</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="residence_address_entry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="invisible_char">•</property>
+            <property name="invisible_char_set">True</property>
+            <property name="primary_icon_activatable">False</property>
+            <property name="secondary_icon_activatable">False</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">2</property>
+            <property name="top_attach">1</property>
+            <property name="bottom_attach">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label8">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="xpad">5</property>
+            <property name="label" translatable="yes">Address:</property>
+          </object>
+          <packing>
+            <property name="top_attach">1</property>
+            <property name="bottom_attach">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label7">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="xpad">5</property>
+            <property name="label" translatable="yes">Phone:</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="right_attach">3</property>
+            <property name="top_attach">1</property>
+            <property name="bottom_attach">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="phone_entry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="invisible_char">•</property>
+            <property name="invisible_char_set">True</property>
+            <property name="primary_icon_activatable">False</property>
+            <property name="secondary_icon_activatable">False</property>
+          </object>
+          <packing>
+            <property name="left_attach">3</property>
+            <property name="right_attach">4</property>
+            <property name="top_attach">1</property>
+            <property name="bottom_attach">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label6">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="xpad">5</property>
+            <property name="label" translatable="yes">Doctor:</property>
+          </object>
+          <packing>
+            <property name="top_attach">3</property>
+            <property name="bottom_attach">4</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="doctor_entry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="invisible_char">•</property>
+            <property name="invisible_char_set">True</property>
+            <property name="primary_icon_activatable">False</property>
+            <property name="secondary_icon_activatable">False</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">4</property>
+            <property name="top_attach">3</property>
+            <property name="bottom_attach">4</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkEntry" id="codice_fiscale_entry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="invisible_char">•</property>
+            <property name="invisible_char_set">True</property>
+            <property name="primary_icon_activatable">False</property>
+            <property name="secondary_icon_activatable">False</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="right_attach">4</property>
+            <property name="top_attach">2</property>
+            <property name="bottom_attach">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label9">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="xpad">5</property>
+            <property name="label" translatable="yes">Codice fiscale:</property>
+          </object>
+          <packing>
+            <property name="top_attach">2</property>
+            <property name="bottom_attach">3</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">3</property>
+      </packing>
+    </child>
+  </object>
+  <object class="GtkListStore" id="gender_store">
+    <columns>
+      <!-- column-name gender -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Male</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Female</col>
+      </row>
+    </data>
+  </object>
+</interface>
diff --git a/ui/patient_list_sidebar.glade b/data/resources/ui/patient_list_sidebar.glade
similarity index 80%
rename from ui/patient_list_sidebar.glade
rename to data/resources/ui/patient_list_sidebar.glade
index 08287b8..812d1b6 100644
--- a/ui/patient_list_sidebar.glade
+++ b/data/resources/ui/patient_list_sidebar.glade
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk+" version="2.24"/>
-  <!-- interface-naming-policy project-wide -->
   <object class="GtkAlignment" id="sidebar">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
@@ -15,6 +14,7 @@
         <child>
           <object class="GtkButton" id="back_button">
             <property name="label">gtk-go-back</property>
+            <property name="use_action_appearance">False</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
@@ -43,6 +43,7 @@
         <child>
           <object class="GtkButton" id="add_button">
             <property name="label">gtk-add</property>
+            <property name="use_action_appearance">False</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
@@ -59,6 +60,7 @@
         <child>
           <object class="GtkButton" id="modify_button">
             <property name="label">gtk-edit</property>
+            <property name="use_action_appearance">False</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
@@ -75,6 +77,7 @@
         <child>
           <object class="GtkButton" id="edit_visit_button">
             <property name="label" translatable="yes">Visits</property>
+            <property name="use_action_appearance">False</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
@@ -90,6 +93,7 @@
         <child>
           <object class="GtkButton" id="remove_button">
             <property name="label">gtk-remove</property>
+            <property name="use_action_appearance">False</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
@@ -103,6 +107,22 @@
             <property name="position">5</property>
           </packing>
         </child>
+        <child>
+          <object class="GtkButton" id="schedule_button">
+            <property name="label" translatable="yes">Schedule a visit</property>
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="use_action_appearance">False</property>
+            <signal name="clicked" handler="clinica_patient_list_page_on_schedule_a_visit_button_clicked" swapped="no"/>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">6</property>
+          </packing>
+        </child>
       </object>
     </child>
   </object>
diff --git a/ui/patient_list_toolbar.glade b/data/resources/ui/patient_list_toolbar.glade
similarity index 57%
rename from ui/patient_list_toolbar.glade
rename to data/resources/ui/patient_list_toolbar.glade
index 62ef25e..f5822d2 100644
--- a/ui/patient_list_toolbar.glade
+++ b/data/resources/ui/patient_list_toolbar.glade
@@ -1,22 +1,32 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <requires lib="gtk+" version="2.24"/>
-  <!-- interface-naming-policy project-wide -->
+  <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkVBox" id="left_vbox">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <child>
-      <object class="GtkEntry" id="find_entry">
+      <object class="GtkBox" id="top_box">
         <property name="visible">True</property>
-        <property name="can_focus">True</property>
-        <property name="invisible_char">•</property>
-        <property name="invisible_char_set">True</property>
-        <property name="primary_icon_stock">gtk-find</property>
-        <property name="secondary_icon_stock">gtk-clear</property>
-        <property name="primary_icon_activatable">False</property>
-        <property name="secondary_icon_activatable">True</property>
-        <property name="primary_icon_sensitive">True</property>
-        <property name="secondary_icon_sensitive">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkEntry" id="find_entry">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="invisible_char">•</property>
+            <property name="invisible_char_set">True</property>
+            <property name="primary_icon_stock">gtk-find</property>
+            <property name="secondary_icon_stock">gtk-clear</property>
+            <property name="primary_icon_activatable">False</property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
       </object>
       <packing>
         <property name="expand">False</property>
@@ -29,13 +39,10 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="top_padding">5</property>
-        <property name="left_padding">0</property>
         <child>
           <object class="GtkScrolledWindow" id="treeview_scrolled_window">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
-            <property name="hscrollbar_policy">automatic</property>
-            <property name="vscrollbar_policy">automatic</property>
             <property name="shadow_type">in</property>
             <child>
               <placeholder/>
diff --git a/data/resources/ui/settings_window.glade b/data/resources/ui/settings_window.glade
new file mode 100644
index 0000000..7ffefe5
--- /dev/null
+++ b/data/resources/ui/settings_window.glade
@@ -0,0 +1,683 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkNotebook" id="content_area">
+    <property name="visible">True</property>
+    <property name="can_focus">True</property>
+    <property name="margin_left">6</property>
+    <property name="margin_right">6</property>
+    <property name="margin_top">6</property>
+    <property name="margin_bottom">6</property>
+    <child>
+      <object class="GtkBox" id="box1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="margin_left">6</property>
+        <property name="margin_right">6</property>
+        <property name="margin_top">6</property>
+        <property name="margin_bottom">6</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkBox" id="box2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkLabel" id="label4">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Use plugins (restart required)</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSwitch" id="plugins_switch">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="box3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkLabel" id="label5">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Allow to browse files in visits</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSwitch" id="browse_files_switch">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="box5">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkLabel" id="label7">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Data source</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkComboBox" id="data_sources_combobox">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkCellRendererText" id="cellrenderertext2"/>
+                  <attributes>
+                    <attribute name="text">0</attribute>
+                  </attributes>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child type="tab">
+      <object class="GtkLabel" id="label1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">General</property>
+      </object>
+      <packing>
+        <property name="tab_fill">False</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkBox" id="box10">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="margin_left">6</property>
+        <property name="margin_right">6</property>
+        <property name="margin_top">6</property>
+        <property name="margin_bottom">6</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="label22">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">Select the sources that you'd like to use to retrieve medicines information.</property>
+            <property name="wrap">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkTreeView" id="medicine_search_engines_treeview">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child internal-child="selection">
+              <object class="GtkTreeSelection" id="treeview-selection1"/>
+            </child>
+            <child>
+              <object class="GtkTreeViewColumn" id="treeviewcolumn1">
+                <property name="title" translatable="yes">Active</property>
+                <child>
+                  <object class="GtkCellRendererToggle" id="active_cellrenderer"/>
+                  <attributes>
+                    <attribute name="active">0</attribute>
+                  </attributes>
+                </child>
+              </object>
+            </child>
+            <child>
+              <object class="GtkTreeViewColumn" id="treeviewcolumn2">
+                <property name="title" translatable="yes">Search Engine</property>
+                <child>
+                  <object class="GtkCellRendererText" id="cellrenderertext3"/>
+                  <attributes>
+                    <attribute name="text">1</attribute>
+                  </attributes>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="position">1</property>
+      </packing>
+    </child>
+    <child type="tab">
+      <object class="GtkLabel" id="label21">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">Medicines</property>
+      </object>
+      <packing>
+        <property name="position">1</property>
+        <property name="tab_fill">False</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkBox" id="box6">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="margin_left">6</property>
+        <property name="margin_right">6</property>
+        <property name="margin_top">6</property>
+        <property name="margin_bottom">6</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkFrame" id="frame1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <object class="GtkAlignment" id="alignment1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkGrid" id="grid1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_right">6</property>
+                    <property name="margin_top">6</property>
+                    <property name="margin_bottom">6</property>
+                    <property name="row_spacing">6</property>
+                    <property name="column_spacing">6</property>
+                    <child>
+                      <object class="GtkLabel" id="label9">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Host</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">0</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label10">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Port</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">1</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="host_entry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hexpand">True</property>
+                        <property name="invisible_char">•</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">0</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="port_entry">
+                        <property name="can_focus">True</property>
+                        <property name="hexpand">True</property>
+                        <property name="invisible_char">•</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">1</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="connect_button">
+                        <property name="label" translatable="yes">button</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="hexpand">True</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">2</property>
+                        <property name="width">2</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label8">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Connection to a remote Clinica instance</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="frame2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <object class="GtkAlignment" id="alignment2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkBox" id="box7">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_right">6</property>
+                    <property name="margin_top">6</property>
+                    <property name="margin_bottom">6</property>
+                    <property name="orientation">vertical</property>
+                    <property name="spacing">6</property>
+                    <child>
+                      <object class="GtkBox" id="box8">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">6</property>
+                        <child>
+                          <object class="GtkLabel" id="label12">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Allow connections of other clinica from the LAN</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkSwitch" id="data_server_switch">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkGrid" id="grid2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="row_spacing">6</property>
+                        <property name="column_spacing">6</property>
+                        <child>
+                          <object class="GtkLabel" id="label13">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Username</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label14">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Password</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">1</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" id="username_entry">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hexpand">True</property>
+                            <property name="invisible_char">•</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" id="password_entry">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hexpand">True</property>
+                            <property name="visibility">False</property>
+                            <property name="invisible_char">•</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="top_attach">1</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label11">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Built-in server</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="position">2</property>
+      </packing>
+    </child>
+    <child type="tab">
+      <object class="GtkLabel" id="label2">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">Network</property>
+      </object>
+      <packing>
+        <property name="position">2</property>
+        <property name="tab_fill">False</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkBox" id="box9">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="margin_left">6</property>
+        <property name="margin_right">6</property>
+        <property name="margin_top">6</property>
+        <property name="margin_bottom">6</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">6</property>
+        <child>
+          <object class="GtkLabel" id="label16">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="xalign">0</property>
+            <property name="label" translatable="yes">The details that are inserted here will be used when generating
+the automatic visit reports. </property>
+            <property name="wrap">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkGrid" id="grid3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="row_spacing">6</property>
+            <property name="column_spacing">6</property>
+            <child>
+              <object class="GtkEntry" id="name_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="invisible_char">•</property>
+                <property name="invisible_char_set">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label17">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Name</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label18">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Address</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="address_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="invisible_char">•</property>
+                <property name="invisible_char_set">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label19">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Institution</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">2</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="institution_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">•</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">2</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label20">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Email</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">3</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="email_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">•</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">3</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="position">3</property>
+      </packing>
+    </child>
+    <child type="tab">
+      <object class="GtkLabel" id="label15">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">Personal details</property>
+      </object>
+      <packing>
+        <property name="position">3</property>
+        <property name="tab_fill">False</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkAlignment" id="plugins_alignment">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <placeholder/>
+        </child>
+      </object>
+      <packing>
+        <property name="position">4</property>
+      </packing>
+    </child>
+    <child type="tab">
+      <object class="GtkLabel" id="label3">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">Plugins</property>
+      </object>
+      <packing>
+        <property name="position">4</property>
+        <property name="tab_fill">False</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/ui/new_button.glade b/data/resources/ui/start_page.glade
similarity index 99%
rename from ui/new_button.glade
rename to data/resources/ui/start_page.glade
index 2581ee6..0d7d43b 100644
--- a/ui/new_button.glade
+++ b/data/resources/ui/start_page.glade
@@ -163,7 +163,7 @@
                           <object class="GtkImage" id="image2">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="pixbuf">icons/patients.svg</property>
+                            <property name="pixbuf">icons/patients.png</property>
                             <property name="icon-size">6</property>
                           </object>
                           <packing>
@@ -210,7 +210,7 @@
                           <object class="GtkImage" id="image3">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="pixbuf">icons/doctors.svg</property>
+                            <property name="pixbuf">icons/doctors.png</property>
                             <property name="icon-size">6</property>
                           </object>
                           <packing>
@@ -270,7 +270,7 @@
                           <object class="GtkImage" id="image5">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="pixbuf">icons/search.svg</property>
+                            <property name="pixbuf">icons/search.png</property>
                             <property name="icon-size">6</property>
                           </object>
                           <packing>
@@ -318,7 +318,7 @@
                           <object class="GtkImage" id="image6">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="pixbuf">icons/calendar.svg</property>
+                            <property name="pixbuf">icons/calendar.png</property>
                             <property name="icon-size">6</property>
                           </object>
                           <packing>
diff --git a/data/resources/ui/visit_scheduler.glade b/data/resources/ui/visit_scheduler.glade
new file mode 100644
index 0000000..c349d71
--- /dev/null
+++ b/data/resources/ui/visit_scheduler.glade
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <!-- interface-requires clinica 0.0 -->
+  <object class="GtkAlignment" id="content_area">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="top_padding">6</property>
+    <property name="bottom_padding">6</property>
+    <property name="left_padding">6</property>
+    <property name="right_padding">6</property>
+    <child>
+      <object class="GtkBox" id="box1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <child>
+          <object class="GtkBox" id="align_box">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">6</property>
+            <child>
+              <object class="GtkBox" id="box2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkImage" id="image1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="pixbuf">icons/calendar.png</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label2">
+                    <property name="width_request">40</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Select the date on which you'd like to schedule the visit.</property>
+                    <property name="wrap">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="padding">6</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="box4">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="margin_right">6</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Selected patient</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="ClinicaPatientEntry" id="patient_entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">•</property>
+                    <property name="invisible_char_set">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="padding">6</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="more_info">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="yalign">1</property>
+                <property name="label" translatable="yes"><b>Tip:</b> Once created this visit will be visible in the visit editor of this patient.</property>
+                <property name="use_markup">True</property>
+                <property name="wrap">True</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="ClinicaDateTimePicker" id="date_picker">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="padding">6</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/data/resources/ui/wait_dialog.glade b/data/resources/ui/wait_dialog.glade
new file mode 100644
index 0000000..b3b9ad2
--- /dev/null
+++ b/data/resources/ui/wait_dialog.glade
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkBox" id="content_area">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="margin_left">12</property>
+    <property name="margin_right">12</property>
+    <property name="margin_top">12</property>
+    <property name="margin_bottom">6</property>
+    <property name="orientation">vertical</property>
+    <property name="spacing">12</property>
+    <child>
+      <object class="GtkLabel" id="label">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">label</property>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkProgressBar" id="progressbar">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/debian/changelog b/debian/changelog
index 459ec09..d389f86 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+clinica (0.3.0-1) UNRELEASED; urgency=low
+
+  * New upstream version of Clinica.
+
+ -- Leonardo Robol <leo at robol.it>  Mon, 15 Jul 2013 11:27:05 +0200
+
 clinica (0.2.1~dfsg-1) unstable; urgency=low
 
   * Initial release (Closes: #652658)
diff --git a/debian/clinica-common.install b/debian/clinica-common.install
index 3243ada..9dcccf2 100644
--- a/debian/clinica-common.install
+++ b/debian/clinica-common.install
@@ -1,5 +1,4 @@
 debian/tmp/usr/share/gnome/help/clinica/*
-debian/tmp/usr/share/clinica/*
 debian/tmp/usr/share/glib-2.0/schemas/*.xml
 debian/tmp/usr/share/locale/*/LC_MESSAGES/clinica.mo
 debian/tmp/usr/share/pixmaps/*
diff --git a/debian/clinica.install b/debian/clinica.install
index b56354c..0e85469 100644
--- a/debian/clinica.install
+++ b/debian/clinica.install
@@ -1,3 +1,4 @@
 debian/tmp/usr/bin/clinica
 debian/tmp/usr/share/applications/*
 debian/tmp/usr/share/man/man1/*
+debian/tmp/usr/share/dbus-1/services/org.phcteam.clinica.service
diff --git a/debian/compat b/debian/compat
index 45a4fb7..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-8
+9
diff --git a/debian/control b/debian/control
index cb76378..5a6b13d 100644
--- a/debian/control
+++ b/debian/control
@@ -1,34 +1,39 @@
 Source: clinica
 Section: science
 Priority: optional
-Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
-DM-Upload-Allowed: yes
+Maintainer: Leonardo Robol <leo at robol.it>
 Uploaders: Leonardo Robol <leo at robol.it>
-Build-Depends: debhelper (>= 8), 
-	       python, 
+Build-Depends: debhelper (>= 9), 
+	       cmake,
 	       libglib2.0-dev, 
 	       libgee-dev, 
 	       libsqlite3-dev, 
 	       libgtk-3-dev, 
-	       valac-0.14, 
+               libsoup2.4-dev,
+               libjansson-dev,
+	       valac-0.16, 
 	       intltool (>= 0.35), 
 	       gobject-introspection (>= 0.9), 
-	       libpeas-dev, 
+	       libpeas-dev,
+               librsvg2-dev,
 	       gir1.2-peas-1.0, 
 	       gir1.2-gtk-3.0, 
 	       gir1.2-gee-1.0, 
 	       gir1.2-glib-2.0, 
-Standards-Version: 3.9.2
+	       gir1.2-json-1.0,
+	       gir1.2-soup-2.4,
+               gir1.2-rsvg-2.0
+Standards-Version: 3.9.4
 Homepage: http://launchpad.net/clinica-project
-Vcs-Browser: http://git.debian.org/?p=debian-med/clinica.git
-Vcs-Git: git://git.debian.org/git/debian-med/clinica.git
+Vcs-Bzr: https://code.launchpad.net/+branch/~phcteam/clinica-project/debian
 
 Package: clinica
 Architecture: any
+Replaces: clinica-common (<< ${binary:Version})
 Depends: ${shlibs:Depends}, 
 	 ${misc:Depends}, 
 	 ${gir:Depends},
-	 gir1.2-clinica-0.2,
+	 gir1.2-clinica-0.3,
 	 clinica-common,
 	 libclinica0
 Description: Simple medical records manager
@@ -37,13 +42,18 @@ Description: Simple medical records manager
  .
  It features:
   * Patient management
+ .
   * Doctor management (with associated patients)
+ .
   * Visit creation/editing
+ .
   * Medicine search online (via plugins)
+ .
   * Calendar for events and visits
+ .
   * Extensibility via plugins
 
-Package: gir1.2-clinica-0.2
+Package: gir1.2-clinica-0.3
 Architecture: any
 Section: introspection
 Depends: ${gir:Depends}, ${misc:Depends}
@@ -53,27 +63,37 @@ Description: Simple medical records manager (gobject introspection files)
  .
  It features:
   * Patient management
+ .
   * Doctor management (with associated patients)
+ .
   * Visit creation/editing
+ .
   * Medicine search online (via plugins)
+ .
   * Calendar for events and visits
+ .
   * Extensibility via plugins
  .
  This package contains the GObject introspection files.
 
 Package: clinica-plugins
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, clinica, gir1.2-clinica-0.2, gir1.2-gee-1.0, gir1.2-gtk-3.0, gir1.2-peas-1.0, clinica-dev
+Depends: ${shlibs:Depends}, ${misc:Depends}, clinica, gir1.2-clinica-0.3, gir1.2-gee-1.0, gir1.2-gtk-3.0, gir1.2-peas-1.0, clinica-dev
 Description: Simple medical records manager (plugins)
  Simple tool for the desktop to mantain medical records.
  It is thought to be easy to use and it's mainly addressed to a single doctor.
  .
  It features:
   * Patient management
+ .
   * Doctor management (with associated patients)
+ .
   * Visit creation/editing
+ .
   * Medicine search online (via plugins)
+ .
   * Calendar for events and visits
+ .
   * Extensibility via plugins
  .
  This package contains the plugins that are shipped with the tarball
@@ -81,17 +101,24 @@ Description: Simple medical records manager (plugins)
 
 Package: libclinica0
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, gir1.2-clinica-0.2
+Breaks: libclinica, libclinica0.2, clinica (<< 0.1.9)
+Replaces: libclinica, libclinica0.2, clinica (<< 0.1.9)
+Depends: ${shlibs:Depends}, ${misc:Depends}, gir1.2-clinica-0.3
 Description: Simple medical records manager (shared library)
  Simple tool for the desktop to mantain medical records.
  It is thought to be easy to use and it's mainly addressed to a single doctor.
  .
  It features:
   * Patient management
+ .
   * Doctor management (with associated patients)
+ .
   * Visit creation/editing
+ .
   * Medicine search online (via plugins)
+ .
   * Calendar for events and visits
+ .
   * Extensibility via plugins
  .
  This package contains the shared library with the routines shared by clinica
@@ -106,16 +133,23 @@ Description: Simple medical records manager (architecture independent files)
  .
  It features:
   * Patient management
+ .
   * Doctor management (with associated patients)
+ .
   * Visit creation/editing
+ .
   * Medicine search online (via plugins)
+ .
   * Calendar for events and visits
+ .
   * Extensibility via plugins
  .
  This package contains the architecture independent files.
 
 Package: clinica-dev
 Architecture: any
+Breaks: clinica (<< 0.1.9)
+Replaces: clinica (<< 0.1.9), libclinica0.2 (<< 0.2.0)
 Depends: clinica, libclinica0 (= ${binary:Version}), ${misc:Depends}
 Description: Simple medical records manager (development files)
  Simple tool for the desktop to mantain medical records.
@@ -123,10 +157,15 @@ Description: Simple medical records manager (development files)
  .
  It features:
   * Patient management
+ .
   * Doctor management (with associated patients)
+ .
   * Visit creation/editing
+ .
   * Medicine search online (via plugins)
+ .
   * Calendar for events and visits
+ .
   * Extensibility via plugins
  .
  This package contains the headers for the C routines of libclinica.
diff --git a/debian/gir1.2-clinica-0.2.install b/debian/gir1.2-clinica-0.3.install
similarity index 100%
rename from debian/gir1.2-clinica-0.2.install
rename to debian/gir1.2-clinica-0.3.install
diff --git a/debian/libclinica0.symbols b/debian/libclinica0.symbols
index 24ca266..edea87c 100644
--- a/debian/libclinica0.symbols
+++ b/debian/libclinica0.symbols
@@ -1,539 +1,713 @@
 libclinica.so.0 libclinica0 #MINVER#
- clinica_about_dialog_construct at Base 0.2.1~dfsg
- clinica_about_dialog_get_type at Base 0.2.1~dfsg
- clinica_about_dialog_new at Base 0.2.1~dfsg
- clinica_calendar_construct at Base 0.2.1~dfsg
- clinica_calendar_event_list_construct at Base 0.2.1~dfsg
- clinica_calendar_event_list_get_type at Base 0.2.1~dfsg
- clinica_calendar_event_list_new at Base 0.2.1~dfsg
- clinica_calendar_event_list_set_day at Base 0.2.1~dfsg
- clinica_calendar_focus_today at Base 0.2.1~dfsg
- clinica_calendar_get_days_to_prepend at Base 0.2.1~dfsg
- clinica_calendar_get_handler at Base 0.2.1~dfsg
- clinica_calendar_get_selected_date at Base 0.2.1~dfsg
- clinica_calendar_get_type at Base 0.2.1~dfsg
- clinica_calendar_header_construct at Base 0.2.1~dfsg
- clinica_calendar_header_get_type at Base 0.2.1~dfsg
- clinica_calendar_header_new at Base 0.2.1~dfsg
- clinica_calendar_new at Base 0.2.1~dfsg
- clinica_calendar_set_date at Base 0.2.1~dfsg
- clinica_calendar_toolbar_construct at Base 0.2.1~dfsg
- clinica_calendar_toolbar_get_type at Base 0.2.1~dfsg
- clinica_calendar_toolbar_new at Base 0.2.1~dfsg
- clinica_calendar_toolbar_on_add_button_clicked at Base 0.2.1~dfsg
- clinica_calendar_update_month at Base 0.2.1~dfsg
- clinica_calendar_view_construct at Base 0.2.1~dfsg
- clinica_calendar_view_get_calendar at Base 0.2.1~dfsg
- clinica_calendar_view_get_header at Base 0.2.1~dfsg
- clinica_calendar_view_get_resource_manager at Base 0.2.1~dfsg
- clinica_calendar_view_get_style_context at Base 0.2.1~dfsg
- clinica_calendar_view_get_toolbar at Base 0.2.1~dfsg
- clinica_calendar_view_get_type at Base 0.2.1~dfsg
- clinica_calendar_view_new at Base 0.2.1~dfsg
- clinica_calendar_view_set_toolbar at Base 0.2.1~dfsg
- clinica_calendar_window_construct at Base 0.2.1~dfsg
- clinica_calendar_window_get_calendar_view at Base 0.2.1~dfsg
- clinica_calendar_window_get_event_widget at Base 0.2.1~dfsg
- clinica_calendar_window_get_resource_manager at Base 0.2.1~dfsg
- clinica_calendar_window_get_toolbar at Base 0.2.1~dfsg
- clinica_calendar_window_get_type at Base 0.2.1~dfsg
- clinica_calendar_window_new at Base 0.2.1~dfsg
- clinica_calendar_window_on_day_selected at Base 0.2.1~dfsg
- clinica_calendar_window_set_calendar_view at Base 0.2.1~dfsg
- clinica_calendar_window_set_event_widget at Base 0.2.1~dfsg
- clinica_calendar_window_set_resource_manager at Base 0.2.1~dfsg
- clinica_date_handler_add_full_offset at Base 0.2.1~dfsg
- clinica_date_handler_add_month_offset at Base 0.2.1~dfsg
- clinica_date_handler_add_year_offset at Base 0.2.1~dfsg
- clinica_date_handler_construct at Base 0.2.1~dfsg
- clinica_date_handler_format at Base 0.2.1~dfsg
- clinica_date_handler_get_current_month at Base 0.2.1~dfsg
- clinica_date_handler_get_current_year at Base 0.2.1~dfsg
- clinica_date_handler_get_date at Base 0.2.1~dfsg
- clinica_date_handler_get_first_day_of_month at Base 0.2.1~dfsg
- clinica_date_handler_get_type at Base 0.2.1~dfsg
- clinica_date_handler_new at Base 0.2.1~dfsg
- clinica_date_switcher_construct at Base 0.2.1~dfsg
- clinica_date_switcher_get_hovered at Base 0.2.1~dfsg
- clinica_date_switcher_get_is_pressed at Base 0.2.1~dfsg
- clinica_date_switcher_get_label at Base 0.2.1~dfsg
- clinica_date_switcher_get_text at Base 0.2.1~dfsg
- clinica_date_switcher_get_type at Base 0.2.1~dfsg
- clinica_date_switcher_new at Base 0.2.1~dfsg
- clinica_date_switcher_set_hovered at Base 0.2.1~dfsg
- clinica_date_switcher_set_is_pressed at Base 0.2.1~dfsg
- clinica_date_switcher_set_label at Base 0.2.1~dfsg
- clinica_date_switcher_set_text at Base 0.2.1~dfsg
- clinica_day_add_event at Base 0.2.1~dfsg
- clinica_day_add_visit at Base 0.2.1~dfsg
- clinica_day_construct at Base 0.2.1~dfsg
- clinica_day_get_date at Base 0.2.1~dfsg
- clinica_day_get_type at Base 0.2.1~dfsg
- clinica_day_new at Base 0.2.1~dfsg
- clinica_day_remove_event at Base 0.2.1~dfsg
- clinica_day_remove_visit at Base 0.2.1~dfsg
- clinica_day_reset_events at Base 0.2.1~dfsg
- clinica_day_set_date at Base 0.2.1~dfsg
- clinica_doctor_all at Base 0.2.1~dfsg
- clinica_doctor_construct at Base 0.2.1~dfsg
- clinica_doctor_construct_with_id at Base 0.2.1~dfsg
- clinica_doctor_context_menu_construct at Base 0.2.1~dfsg
- clinica_doctor_context_menu_get_type at Base 0.2.1~dfsg
- clinica_doctor_context_menu_new at Base 0.2.1~dfsg
- clinica_doctor_editor_construct at Base 0.2.1~dfsg
- clinica_doctor_editor_construct_with_doctor at Base 0.2.1~dfsg
- clinica_doctor_editor_construct_with_name at Base 0.2.1~dfsg
- clinica_doctor_editor_destroy at Base 0.2.1~dfsg
- clinica_doctor_editor_get_type at Base 0.2.1~dfsg
- clinica_doctor_editor_new at Base 0.2.1~dfsg
- clinica_doctor_editor_new_with_doctor at Base 0.2.1~dfsg
- clinica_doctor_editor_new_with_name at Base 0.2.1~dfsg
- clinica_doctor_editor_on_name_focus_out_event at Base 0.2.1~dfsg
- clinica_doctor_editor_on_surname_focus_out_event at Base 0.2.1~dfsg
- clinica_doctor_editor_response_get_type at Base 0.2.1~dfsg
- clinica_doctor_editor_run at Base 0.2.1~dfsg
- clinica_doctor_filtered_list_store_construct at Base 0.2.1~dfsg
- clinica_doctor_filtered_list_store_get_type at Base 0.2.1~dfsg
- clinica_doctor_filtered_list_store_new at Base 0.2.1~dfsg
- clinica_doctor_filtered_list_store_on_find_entry_changed at Base 0.2.1~dfsg
- clinica_doctor_get_complete_name at Base 0.2.1~dfsg
- clinica_doctor_get_given_name at Base 0.2.1~dfsg
- clinica_doctor_get_mobile at Base 0.2.1~dfsg
- clinica_doctor_get_phone at Base 0.2.1~dfsg
- clinica_doctor_get_surname at Base 0.2.1~dfsg
- clinica_doctor_get_type at Base 0.2.1~dfsg
- clinica_doctor_has_patients at Base 0.2.1~dfsg
- clinica_doctor_iterator_construct at Base 0.2.1~dfsg
- clinica_doctor_iterator_get at Base 0.2.1~dfsg
- clinica_doctor_iterator_get_type at Base 0.2.1~dfsg
- clinica_doctor_iterator_iterator at Base 0.2.1~dfsg
- clinica_doctor_iterator_new at Base 0.2.1~dfsg
- clinica_doctor_list_page_construct at Base 0.2.1~dfsg
- clinica_doctor_list_page_get_type at Base 0.2.1~dfsg
- clinica_doctor_list_page_new at Base 0.2.1~dfsg
- clinica_doctor_list_page_on_add_button_clicked at Base 0.2.1~dfsg
- clinica_doctor_list_page_on_back_button_clicked at Base 0.2.1~dfsg
- clinica_doctor_list_page_on_modify_button_clicked at Base 0.2.1~dfsg
- clinica_doctor_list_page_on_remove_button_clicked at Base 0.2.1~dfsg
- clinica_doctor_list_store_add_doctor at Base 0.2.1~dfsg
- clinica_doctor_list_store_construct at Base 0.2.1~dfsg
- clinica_doctor_list_store_get_type at Base 0.2.1~dfsg
- clinica_doctor_list_store_new at Base 0.2.1~dfsg
- clinica_doctor_list_store_reload_doctor at Base 0.2.1~dfsg
- clinica_doctor_list_view_construct at Base 0.2.1~dfsg
- clinica_doctor_list_view_get_selected_doctor at Base 0.2.1~dfsg
- clinica_doctor_list_view_get_type at Base 0.2.1~dfsg
- clinica_doctor_list_view_new at Base 0.2.1~dfsg
- clinica_doctor_list_view_remove_selected_doctor at Base 0.2.1~dfsg
- clinica_doctor_new at Base 0.2.1~dfsg
- clinica_doctor_new_with_id at Base 0.2.1~dfsg
- clinica_doctor_remove at Base 0.2.1~dfsg
- clinica_doctor_set_given_name at Base 0.2.1~dfsg
- clinica_doctor_set_mobile at Base 0.2.1~dfsg
- clinica_doctor_set_phone at Base 0.2.1~dfsg
- clinica_doctor_set_surname at Base 0.2.1~dfsg
- clinica_event_all at Base 0.2.1~dfsg
- clinica_event_construct at Base 0.2.1~dfsg
- clinica_event_construct_with_id at Base 0.2.1~dfsg
- clinica_event_detail_construct at Base 0.2.1~dfsg
- clinica_event_detail_get_type at Base 0.2.1~dfsg
- clinica_event_detail_new at Base 0.2.1~dfsg
- clinica_event_editor_construct at Base 0.2.1~dfsg
- clinica_event_editor_construct_with_date at Base 0.2.1~dfsg
- clinica_event_editor_get_selected_event at Base 0.2.1~dfsg
- clinica_event_editor_get_type at Base 0.2.1~dfsg
- clinica_event_editor_new at Base 0.2.1~dfsg
- clinica_event_editor_new_with_date at Base 0.2.1~dfsg
- clinica_event_editor_select_patient at Base 0.2.1~dfsg
- clinica_event_for_day at Base 0.2.1~dfsg
- clinica_event_get_date at Base 0.2.1~dfsg
- clinica_event_get_description at Base 0.2.1~dfsg
- clinica_event_get_patient at Base 0.2.1~dfsg
- clinica_event_get_title at Base 0.2.1~dfsg
- clinica_event_get_type at Base 0.2.1~dfsg
- clinica_event_get_venue at Base 0.2.1~dfsg
- clinica_event_get_visit at Base 0.2.1~dfsg
- clinica_event_iterator_construct at Base 0.2.1~dfsg
- clinica_event_iterator_construct_with_day at Base 0.2.1~dfsg
- clinica_event_iterator_get at Base 0.2.1~dfsg
- clinica_event_iterator_get_type at Base 0.2.1~dfsg
- clinica_event_iterator_iterator at Base 0.2.1~dfsg
- clinica_event_iterator_new at Base 0.2.1~dfsg
- clinica_event_iterator_new_with_day at Base 0.2.1~dfsg
- clinica_event_list_store_add_event at Base 0.2.1~dfsg
- clinica_event_list_store_construct at Base 0.2.1~dfsg
- clinica_event_list_store_get_type at Base 0.2.1~dfsg
- clinica_event_list_store_new at Base 0.2.1~dfsg
- clinica_event_list_store_remove_event at Base 0.2.1~dfsg
- clinica_event_new at Base 0.2.1~dfsg
- clinica_event_new_with_id at Base 0.2.1~dfsg
- clinica_event_set_date at Base 0.2.1~dfsg
- clinica_event_set_description at Base 0.2.1~dfsg
- clinica_event_set_patient at Base 0.2.1~dfsg
- clinica_event_set_title at Base 0.2.1~dfsg
- clinica_event_set_venue at Base 0.2.1~dfsg
- clinica_event_set_visit at Base 0.2.1~dfsg
- clinica_find_entry_construct at Base 0.2.1~dfsg
- clinica_find_entry_get_type at Base 0.2.1~dfsg
- clinica_find_entry_new at Base 0.2.1~dfsg
- clinica_gender_get_type at Base 0.2.1~dfsg
- clinica_has_gsettings at Base 0.2.1~dfsg
- clinica_medicine_construct at Base 0.2.1~dfsg
- clinica_medicine_detail_dialog_construct at Base 0.2.1~dfsg
- clinica_medicine_detail_dialog_get_type at Base 0.2.1~dfsg
- clinica_medicine_detail_dialog_new at Base 0.2.1~dfsg
- clinica_medicine_get_active_ingredient at Base 0.2.1~dfsg
- clinica_medicine_get_description at Base 0.2.1~dfsg
- clinica_medicine_get_id at Base 0.2.1~dfsg
- clinica_medicine_get_name at Base 0.2.1~dfsg
- clinica_medicine_get_other_notes at Base 0.2.1~dfsg
- clinica_medicine_get_price at Base 0.2.1~dfsg
- clinica_medicine_get_storage_reccomendations at Base 0.2.1~dfsg
- clinica_medicine_get_type at Base 0.2.1~dfsg
- clinica_medicine_new at Base 0.2.1~dfsg
- clinica_medicine_search_engine_abort_search at Base 0.2.1~dfsg
- clinica_medicine_search_engine_get_name at Base 0.2.1~dfsg
- clinica_medicine_search_engine_get_type at Base 0.2.1~dfsg
- clinica_medicine_search_engine_search_medicine at Base 0.2.1~dfsg
- clinica_medicine_search_engine_selector_construct at Base 0.2.1~dfsg
- clinica_medicine_search_engine_selector_get_type at Base 0.2.1~dfsg
- clinica_medicine_search_engine_selector_new at Base 0.2.1~dfsg
- clinica_medicine_search_page_construct at Base 0.2.1~dfsg
- clinica_medicine_search_page_get_type at Base 0.2.1~dfsg
- clinica_medicine_search_page_new at Base 0.2.1~dfsg
- clinica_medicine_set_active_ingredient at Base 0.2.1~dfsg
- clinica_medicine_set_description at Base 0.2.1~dfsg
- clinica_medicine_set_id at Base 0.2.1~dfsg
- clinica_medicine_set_name at Base 0.2.1~dfsg
- clinica_medicine_set_other_notes at Base 0.2.1~dfsg
- clinica_medicine_set_price at Base 0.2.1~dfsg
- clinica_medicine_set_storage_reccomendations at Base 0.2.1~dfsg
- clinica_medicine_tree_view_clear at Base 0.2.1~dfsg
- clinica_medicine_tree_view_construct at Base 0.2.1~dfsg
- clinica_medicine_tree_view_get_type at Base 0.2.1~dfsg
- clinica_medicine_tree_view_new at Base 0.2.1~dfsg
- clinica_medicine_tree_view_push_medicine at Base 0.2.1~dfsg
- clinica_page_connect_signal at Base 0.2.1~dfsg
- clinica_page_get_resource_manager at Base 0.2.1~dfsg
- clinica_page_get_type at Base 0.2.1~dfsg
- clinica_page_set_resource_manager at Base 0.2.1~dfsg
- clinica_page_setup at Base 0.2.1~dfsg
- clinica_param_spec_sql_column at Base 0.2.1~dfsg
- clinica_patient_all at Base 0.2.1~dfsg
- clinica_patient_construct at Base 0.2.1~dfsg
- clinica_patient_construct_with_id at Base 0.2.1~dfsg
- clinica_patient_context_menu_construct at Base 0.2.1~dfsg
- clinica_patient_context_menu_get_type at Base 0.2.1~dfsg
- clinica_patient_context_menu_new at Base 0.2.1~dfsg
- clinica_patient_detail_construct at Base 0.2.1~dfsg
- clinica_patient_detail_get_type at Base 0.2.1~dfsg
- clinica_patient_detail_new at Base 0.2.1~dfsg
- clinica_patient_editor_activatable_activate at Base 0.2.1~dfsg
- clinica_patient_editor_activatable_deactivate at Base 0.2.1~dfsg
- clinica_patient_editor_activatable_get_patient_editor at Base 0.2.1~dfsg
- clinica_patient_editor_activatable_get_type at Base 0.2.1~dfsg
- clinica_patient_editor_activatable_set_patient_editor at Base 0.2.1~dfsg
- clinica_patient_editor_activatable_update_state at Base 0.2.1~dfsg
- clinica_patient_editor_check_input_data at Base 0.2.1~dfsg
- clinica_patient_editor_construct at Base 0.2.1~dfsg
- clinica_patient_editor_construct_with_name at Base 0.2.1~dfsg
- clinica_patient_editor_construct_with_patient at Base 0.2.1~dfsg
- clinica_patient_editor_destroy at Base 0.2.1~dfsg
- clinica_patient_editor_doctor_completion_action_get_type at Base 0.2.1~dfsg
- clinica_patient_editor_get_type at Base 0.2.1~dfsg
- clinica_patient_editor_is_birth_date_valid at Base 0.2.1~dfsg
- clinica_patient_editor_is_doctor_valid at Base 0.2.1~dfsg
- clinica_patient_editor_new at Base 0.2.1~dfsg
- clinica_patient_editor_new_with_name at Base 0.2.1~dfsg
- clinica_patient_editor_new_with_patient at Base 0.2.1~dfsg
- clinica_patient_editor_on_name_focus_out_event at Base 0.2.1~dfsg
- clinica_patient_editor_on_surname_focus_out_event at Base 0.2.1~dfsg
- clinica_patient_editor_response_get_type at Base 0.2.1~dfsg
- clinica_patient_editor_run at Base 0.2.1~dfsg
- clinica_patient_editor_setup_extension_set at Base 0.2.1~dfsg
- clinica_patient_entry_construct at Base 0.2.1~dfsg
- clinica_patient_entry_get_patient at Base 0.2.1~dfsg
- clinica_patient_entry_get_type at Base 0.2.1~dfsg
- clinica_patient_entry_is_valid at Base 0.2.1~dfsg
- clinica_patient_entry_new at Base 0.2.1~dfsg
- clinica_patient_entry_select_patient at Base 0.2.1~dfsg
- clinica_patient_filtered_list_store_construct at Base 0.2.1~dfsg
- clinica_patient_filtered_list_store_get_type at Base 0.2.1~dfsg
- clinica_patient_filtered_list_store_new at Base 0.2.1~dfsg
- clinica_patient_filtered_list_store_on_find_entry_changed at Base 0.2.1~dfsg
- clinica_patient_get_age at Base 0.2.1~dfsg
- clinica_patient_get_birth_date at Base 0.2.1~dfsg
- clinica_patient_get_complete_name at Base 0.2.1~dfsg
- clinica_patient_get_doctor at Base 0.2.1~dfsg
- clinica_patient_get_gender at Base 0.2.1~dfsg
- clinica_patient_get_given_name at Base 0.2.1~dfsg
- clinica_patient_get_identification_code at Base 0.2.1~dfsg
- clinica_patient_get_phone at Base 0.2.1~dfsg
- clinica_patient_get_residence_address at Base 0.2.1~dfsg
- clinica_patient_get_surname at Base 0.2.1~dfsg
- clinica_patient_get_type at Base 0.2.1~dfsg
- clinica_patient_get_visit_ids at Base 0.2.1~dfsg
- clinica_patient_iterator_construct at Base 0.2.1~dfsg
- clinica_patient_iterator_get at Base 0.2.1~dfsg
- clinica_patient_iterator_get_type at Base 0.2.1~dfsg
- clinica_patient_iterator_iterator at Base 0.2.1~dfsg
- clinica_patient_iterator_new at Base 0.2.1~dfsg
- clinica_patient_list_page_construct at Base 0.2.1~dfsg
- clinica_patient_list_page_get_type at Base 0.2.1~dfsg
- clinica_patient_list_page_new at Base 0.2.1~dfsg
- clinica_patient_list_page_on_add_button_clicked at Base 0.2.1~dfsg
- clinica_patient_list_page_on_back_button_clicked at Base 0.2.1~dfsg
- clinica_patient_list_page_on_edit_visit_button_clicked at Base 0.2.1~dfsg
- clinica_patient_list_page_on_modify_button_clicked at Base 0.2.1~dfsg
- clinica_patient_list_page_on_remove_button_clicked at Base 0.2.1~dfsg
- clinica_patient_list_store_add_patient at Base 0.2.1~dfsg
- clinica_patient_list_store_construct at Base 0.2.1~dfsg
- clinica_patient_list_store_get_patients_of at Base 0.2.1~dfsg
- clinica_patient_list_store_get_type at Base 0.2.1~dfsg
- clinica_patient_list_store_new at Base 0.2.1~dfsg
- clinica_patient_list_store_patient_to_iter at Base 0.2.1~dfsg
- clinica_patient_list_store_reload_patient at Base 0.2.1~dfsg
- clinica_patient_list_store_remove_patient at Base 0.2.1~dfsg
- clinica_patient_list_store_remove_patient_from_iter at Base 0.2.1~dfsg
- clinica_patient_list_view_construct at Base 0.2.1~dfsg
- clinica_patient_list_view_get_selected_patient at Base 0.2.1~dfsg
- clinica_patient_list_view_get_type at Base 0.2.1~dfsg
- clinica_patient_list_view_new at Base 0.2.1~dfsg
- clinica_patient_list_view_remove_selected_patient at Base 0.2.1~dfsg
- clinica_patient_new at Base 0.2.1~dfsg
- clinica_patient_new_with_id at Base 0.2.1~dfsg
- clinica_patient_set_birth_date at Base 0.2.1~dfsg
- clinica_patient_set_doctor at Base 0.2.1~dfsg
- clinica_patient_set_gender at Base 0.2.1~dfsg
- clinica_patient_set_given_name at Base 0.2.1~dfsg
- clinica_patient_set_identification_code at Base 0.2.1~dfsg
- clinica_patient_set_phone at Base 0.2.1~dfsg
- clinica_patient_set_residence_address at Base 0.2.1~dfsg
- clinica_patient_set_surname at Base 0.2.1~dfsg
- clinica_plugin_engine_construct at Base 0.2.1~dfsg
- clinica_plugin_engine_get_type at Base 0.2.1~dfsg
- clinica_plugin_engine_new at Base 0.2.1~dfsg
- clinica_plugin_manager_construct at Base 0.2.1~dfsg
- clinica_plugin_manager_get_type at Base 0.2.1~dfsg
- clinica_plugin_manager_new at Base 0.2.1~dfsg
- clinica_resource_manager_construct at Base 0.2.1~dfsg
- clinica_resource_manager_getDoctor at Base 0.2.1~dfsg
- clinica_resource_manager_getPatient at Base 0.2.1~dfsg
- clinica_resource_manager_getVisit at Base 0.2.1~dfsg
- clinica_resource_manager_get_image_file at Base 0.2.1~dfsg
- clinica_resource_manager_get_plugins_dir at Base 0.2.1~dfsg
- clinica_resource_manager_get_type at Base 0.2.1~dfsg
- clinica_resource_manager_get_ui_file at Base 0.2.1~dfsg
- clinica_resource_manager_initResources at Base 0.2.1~dfsg
- clinica_resource_manager_load_plugins at Base 0.2.1~dfsg
- clinica_resource_manager_load_plugins_finish at Base 0.2.1~dfsg
- clinica_resource_manager_new at Base 0.2.1~dfsg
- clinica_resource_manager_register_medicine_search_engine at Base 0.2.1~dfsg
- clinica_resource_manager_unregister_medicine_search_engine at Base 0.2.1~dfsg
- clinica_settings_activate_plugin at Base 0.2.1~dfsg
- clinica_settings_construct at Base 0.2.1~dfsg
- clinica_settings_deactivate_plugin at Base 0.2.1~dfsg
- clinica_settings_get_active_plugins at Base 0.2.1~dfsg
- clinica_settings_get_medicine_search_engine at Base 0.2.1~dfsg
- clinica_settings_get_type at Base 0.2.1~dfsg
- clinica_settings_is_plugin_active at Base 0.2.1~dfsg
- clinica_settings_manager_construct at Base 0.2.1~dfsg
- clinica_settings_manager_get_type at Base 0.2.1~dfsg
- clinica_settings_manager_new at Base 0.2.1~dfsg
- clinica_settings_new at Base 0.2.1~dfsg
- clinica_settings_switch_construct at Base 0.2.1~dfsg
- clinica_settings_switch_get_type at Base 0.2.1~dfsg
- clinica_settings_switch_new at Base 0.2.1~dfsg
- clinica_sql_column_construct at Base 0.2.1~dfsg
- clinica_sql_column_get_type at Base 0.2.1~dfsg
- clinica_sql_column_new at Base 0.2.1~dfsg
- clinica_sql_column_ref at Base 0.2.1~dfsg
- clinica_sql_column_unref at Base 0.2.1~dfsg
- clinica_sql_data_iterator_construct at Base 0.2.1~dfsg
- clinica_sql_data_iterator_construct_with_like at Base 0.2.1~dfsg
- clinica_sql_data_iterator_get at Base 0.2.1~dfsg
- clinica_sql_data_iterator_get_type at Base 0.2.1~dfsg
- clinica_sql_data_iterator_iterator at Base 0.2.1~dfsg
- clinica_sql_data_iterator_new at Base 0.2.1~dfsg
- clinica_sql_data_iterator_new_with_like at Base 0.2.1~dfsg
- clinica_sql_data_iterator_next at Base 0.2.1~dfsg
- clinica_sql_data_type_add_date_field at Base 0.2.1~dfsg
- clinica_sql_data_type_add_integer_field at Base 0.2.1~dfsg
- clinica_sql_data_type_add_text_field at Base 0.2.1~dfsg
- clinica_sql_data_type_associated_ids at Base 0.2.1~dfsg
- clinica_sql_data_type_construct at Base 0.2.1~dfsg
- clinica_sql_data_type_construct_with_id at Base 0.2.1~dfsg
- clinica_sql_data_type_datetime_to_string at Base 0.2.1~dfsg
- clinica_sql_data_type_get at Base 0.2.1~dfsg
- clinica_sql_data_type_get_date at Base 0.2.1~dfsg
- clinica_sql_data_type_get_db_table_name at Base 0.2.1~dfsg
- clinica_sql_data_type_get_id at Base 0.2.1~dfsg
- clinica_sql_data_type_get_integer at Base 0.2.1~dfsg
- clinica_sql_data_type_get_text at Base 0.2.1~dfsg
- clinica_sql_data_type_get_type at Base 0.2.1~dfsg
- clinica_sql_data_type_init_database at Base 0.2.1~dfsg
- clinica_sql_data_type_init_resources at Base 0.2.1~dfsg
- clinica_sql_data_type_load at Base 0.2.1~dfsg
- clinica_sql_data_type_new at Base 0.2.1~dfsg
- clinica_sql_data_type_new_with_id at Base 0.2.1~dfsg
- clinica_sql_data_type_quote at Base 0.2.1~dfsg
- clinica_sql_data_type_remove at Base 0.2.1~dfsg
- clinica_sql_data_type_save at Base 0.2.1~dfsg
- clinica_sql_data_type_set at Base 0.2.1~dfsg
- clinica_sql_data_type_set_date at Base 0.2.1~dfsg
- clinica_sql_data_type_set_integer at Base 0.2.1~dfsg
- clinica_sql_data_type_set_text at Base 0.2.1~dfsg
- clinica_start_page_construct at Base 0.2.1~dfsg
- clinica_start_page_get_type at Base 0.2.1~dfsg
- clinica_start_page_new at Base 0.2.1~dfsg
- clinica_start_page_on_calendar_window_button_clicked at Base 0.2.1~dfsg
- clinica_start_page_on_find_entry_changed at Base 0.2.1~dfsg
- clinica_start_page_on_medicines_search_page_button_clicked at Base 0.2.1~dfsg
- clinica_start_page_on_new_button_clicked at Base 0.2.1~dfsg
- clinica_start_page_set_name at Base 0.2.1~dfsg
- clinica_user_interface_activatable_activate at Base 0.2.1~dfsg
- clinica_user_interface_activatable_deactivate at Base 0.2.1~dfsg
- clinica_user_interface_activatable_get_resource_manager at Base 0.2.1~dfsg
- clinica_user_interface_activatable_get_type at Base 0.2.1~dfsg
- clinica_user_interface_activatable_get_user_interface at Base 0.2.1~dfsg
- clinica_user_interface_activatable_set_resource_manager at Base 0.2.1~dfsg
- clinica_user_interface_activatable_set_user_interface at Base 0.2.1~dfsg
- clinica_user_interface_activatable_update_state at Base 0.2.1~dfsg
- clinica_user_interface_construct at Base 0.2.1~dfsg
- clinica_user_interface_error_callback at Base 0.2.1~dfsg
- clinica_user_interface_get_started at Base 0.2.1~dfsg
- clinica_user_interface_get_type at Base 0.2.1~dfsg
- clinica_user_interface_load_pages at Base 0.2.1~dfsg
- clinica_user_interface_load_pages_finish at Base 0.2.1~dfsg
- clinica_user_interface_load_plugins at Base 0.2.1~dfsg
- clinica_user_interface_load_plugins_finish at Base 0.2.1~dfsg
- clinica_user_interface_new at Base 0.2.1~dfsg
- clinica_user_interface_on_about_menu_item_activate at Base 0.2.1~dfsg
- clinica_user_interface_on_browse_doctor_list_requested at Base 0.2.1~dfsg
- clinica_user_interface_on_browse_patient_list_requested at Base 0.2.1~dfsg
- clinica_user_interface_on_doctor_menu_item_activate at Base 0.2.1~dfsg
- clinica_user_interface_on_help_menu_item_activate at Base 0.2.1~dfsg
- clinica_user_interface_on_home_menu_item_activate at Base 0.2.1~dfsg
- clinica_user_interface_on_new_doctor_menu_item_activate at Base 0.2.1~dfsg
- clinica_user_interface_on_new_patient_menu_item_activate at Base 0.2.1~dfsg
- clinica_user_interface_on_patient_menu_item_activate at Base 0.2.1~dfsg
- clinica_user_interface_on_search_medicines_menu_item_activate at Base 0.2.1~dfsg
- clinica_user_interface_on_settings_menu_item_activate at Base 0.2.1~dfsg
- clinica_user_interface_on_window_destroy at Base 0.2.1~dfsg
- clinica_user_interface_setup_extension_set at Base 0.2.1~dfsg
- clinica_user_interface_show_calendar_window at Base 0.2.1~dfsg
- clinica_user_interface_show_doctor_list_page at Base 0.2.1~dfsg
- clinica_user_interface_show_medicines_search_page at Base 0.2.1~dfsg
- clinica_user_interface_show_patient_list_page at Base 0.2.1~dfsg
- clinica_user_interface_show_start_page at Base 0.2.1~dfsg
- clinica_user_interface_show_visit_window at Base 0.2.1~dfsg
- clinica_user_interface_start at Base 0.2.1~dfsg
- clinica_utils_capitalize at Base 0.2.1~dfsg
- clinica_utils_check_date at Base 0.2.1~dfsg
- clinica_utils_set_alert_state at Base 0.2.1~dfsg
- clinica_utils_set_widget_size at Base 0.2.1~dfsg
- clinica_utils_show_error_message at Base 0.2.1~dfsg
- clinica_value_get_sql_column at Base 0.2.1~dfsg
- clinica_value_set_sql_column at Base 0.2.1~dfsg
- clinica_value_take_sql_column at Base 0.2.1~dfsg
- clinica_visit_actions_construct at Base 0.2.1~dfsg
- clinica_visit_actions_get_type at Base 0.2.1~dfsg
- clinica_visit_actions_new at Base 0.2.1~dfsg
- clinica_visit_actions_set_active_tab at Base 0.2.1~dfsg
- clinica_visit_all at Base 0.2.1~dfsg
- clinica_visit_browser_construct at Base 0.2.1~dfsg
- clinica_visit_browser_delete_focused_visit at Base 0.2.1~dfsg
- clinica_visit_browser_focus_new_page at Base 0.2.1~dfsg
- clinica_visit_browser_get_type at Base 0.2.1~dfsg
- clinica_visit_browser_new at Base 0.2.1~dfsg
- clinica_visit_browser_save_focused_visit at Base 0.2.1~dfsg
- clinica_visit_browser_save_focused_visit_as_pdf at Base 0.2.1~dfsg
- clinica_visit_construct at Base 0.2.1~dfsg
- clinica_visit_construct_with_id at Base 0.2.1~dfsg
- clinica_visit_detail_construct at Base 0.2.1~dfsg
- clinica_visit_detail_get_type at Base 0.2.1~dfsg
- clinica_visit_detail_new at Base 0.2.1~dfsg
- clinica_visit_for_day at Base 0.2.1~dfsg
- clinica_visit_get_anamnesis at Base 0.2.1~dfsg
- clinica_visit_get_date at Base 0.2.1~dfsg
- clinica_visit_get_diagnosis at Base 0.2.1~dfsg
- clinica_visit_get_histopathology at Base 0.2.1~dfsg
- clinica_visit_get_laboratory_exam at Base 0.2.1~dfsg
- clinica_visit_get_patient at Base 0.2.1~dfsg
- clinica_visit_get_physical_examination at Base 0.2.1~dfsg
- clinica_visit_get_subsequent_checks at Base 0.2.1~dfsg
- clinica_visit_get_systemic_therapy at Base 0.2.1~dfsg
- clinica_visit_get_topical_therapy at Base 0.2.1~dfsg
- clinica_visit_get_type at Base 0.2.1~dfsg
- clinica_visit_iterator_construct at Base 0.2.1~dfsg
- clinica_visit_iterator_construct_with_day at Base 0.2.1~dfsg
- clinica_visit_iterator_construct_with_patient at Base 0.2.1~dfsg
- clinica_visit_iterator_get at Base 0.2.1~dfsg
- clinica_visit_iterator_get_type at Base 0.2.1~dfsg
- clinica_visit_iterator_iterator at Base 0.2.1~dfsg
- clinica_visit_iterator_new at Base 0.2.1~dfsg
- clinica_visit_iterator_new_with_day at Base 0.2.1~dfsg
- clinica_visit_iterator_new_with_patient at Base 0.2.1~dfsg
- clinica_visit_list_store_add_visit at Base 0.2.1~dfsg
- clinica_visit_list_store_construct at Base 0.2.1~dfsg
- clinica_visit_list_store_get_type at Base 0.2.1~dfsg
- clinica_visit_list_store_get_visits_of at Base 0.2.1~dfsg
- clinica_visit_list_store_iter_to_visit at Base 0.2.1~dfsg
- clinica_visit_list_store_new at Base 0.2.1~dfsg
- clinica_visit_list_store_reload_visit at Base 0.2.1~dfsg
- clinica_visit_list_store_remove_visit at Base 0.2.1~dfsg
- clinica_visit_list_store_remove_visit_from_iter at Base 0.2.1~dfsg
- clinica_visit_list_store_visit_to_iter at Base 0.2.1~dfsg
- clinica_visit_new at Base 0.2.1~dfsg
- clinica_visit_new_with_id at Base 0.2.1~dfsg
- clinica_visit_printer_construct at Base 0.2.1~dfsg
- clinica_visit_printer_get_field_empty_font at Base 0.2.1~dfsg
- clinica_visit_printer_get_font_description at Base 0.2.1~dfsg
- clinica_visit_printer_get_height at Base 0.2.1~dfsg
- clinica_visit_printer_get_margin at Base 0.2.1~dfsg
- clinica_visit_printer_get_type at Base 0.2.1~dfsg
- clinica_visit_printer_get_width at Base 0.2.1~dfsg
- clinica_visit_printer_new at Base 0.2.1~dfsg
- clinica_visit_printer_print_report at Base 0.2.1~dfsg
- clinica_visit_printer_set_field_empty_font at Base 0.2.1~dfsg
- clinica_visit_printer_set_font_description at Base 0.2.1~dfsg
- clinica_visit_printer_set_height at Base 0.2.1~dfsg
- clinica_visit_printer_set_margin at Base 0.2.1~dfsg
- clinica_visit_printer_set_width at Base 0.2.1~dfsg
- clinica_visit_set_anamnesis at Base 0.2.1~dfsg
- clinica_visit_set_date at Base 0.2.1~dfsg
- clinica_visit_set_diagnosis at Base 0.2.1~dfsg
- clinica_visit_set_histopathology at Base 0.2.1~dfsg
- clinica_visit_set_laboratory_exam at Base 0.2.1~dfsg
- clinica_visit_set_patient at Base 0.2.1~dfsg
- clinica_visit_set_physical_examination at Base 0.2.1~dfsg
- clinica_visit_set_subsequent_checks at Base 0.2.1~dfsg
- clinica_visit_set_systemic_therapy at Base 0.2.1~dfsg
- clinica_visit_set_topical_therapy at Base 0.2.1~dfsg
- clinica_visit_tab_construct at Base 0.2.1~dfsg
- clinica_visit_tab_construct_with_patient at Base 0.2.1~dfsg
- clinica_visit_tab_delete_visit at Base 0.2.1~dfsg
- clinica_visit_tab_fill_data at Base 0.2.1~dfsg
- clinica_visit_tab_get_type at Base 0.2.1~dfsg
- clinica_visit_tab_get_visit_id at Base 0.2.1~dfsg
- clinica_visit_tab_grab_focus at Base 0.2.1~dfsg
- clinica_visit_tab_new at Base 0.2.1~dfsg
- clinica_visit_tab_new_with_patient at Base 0.2.1~dfsg
- clinica_visit_tab_save_visit at Base 0.2.1~dfsg
- clinica_visit_tab_text_multi_line_construct at Base 0.2.1~dfsg
- clinica_visit_tab_text_multi_line_get_content at Base 0.2.1~dfsg
- clinica_visit_tab_text_multi_line_get_type at Base 0.2.1~dfsg
- clinica_visit_tab_text_multi_line_grab_focus at Base 0.2.1~dfsg
- clinica_visit_tab_text_multi_line_new at Base 0.2.1~dfsg
- clinica_visit_tab_text_multi_line_on_view_focus_in_event at Base 0.2.1~dfsg
- clinica_visit_tab_text_multi_line_on_view_focus_out_event at Base 0.2.1~dfsg
- clinica_visit_tab_text_multi_line_set_content at Base 0.2.1~dfsg
- clinica_visit_toolbar_construct at Base 0.2.1~dfsg
- clinica_visit_toolbar_get_type at Base 0.2.1~dfsg
- clinica_visit_toolbar_new at Base 0.2.1~dfsg
- clinica_visit_window_close at Base 0.2.1~dfsg
- clinica_visit_window_construct at Base 0.2.1~dfsg
- clinica_visit_window_get_type at Base 0.2.1~dfsg
- clinica_visit_window_new at Base 0.2.1~dfsg
- clinica_visit_window_on_visit_window_destroy at Base 0.2.1~dfsg
- clinica_visit_window_select_visit at Base 0.2.1~dfsg
+ CLINICA_APPLICATION_option_entries at Base 0.3.0
+ clinica_about_dialog_construct at Base 0.3.0
+ clinica_about_dialog_get_type at Base 0.3.0
+ clinica_about_dialog_new at Base 0.3.0
+ clinica_application_args at Base 0.3.0
+ clinica_application_args_length1 at Base 0.3.0
+ clinica_application_construct at Base 0.3.0
+ clinica_application_daemon_mode at Base 0.3.0
+ clinica_application_do_activate at Base 0.3.0
+ clinica_application_get_type at Base 0.3.0
+ clinica_application_new at Base 0.3.0
+ clinica_application_show_user_interface at Base 0.3.0
+ clinica_application_show_visits at Base 0.3.0
+ clinica_application_start_dbus at Base 0.3.0
+ clinica_application_version at Base 0.3.0
+ clinica_auth_domain_construct at Base 0.3.0
+ clinica_auth_domain_get_type at Base 0.3.0
+ clinica_auth_domain_new at Base 0.3.0
+ clinica_auth_domain_perform_authentication at Base 0.3.0
+ clinica_authentication_dialog_construct at Base 0.3.0
+ clinica_authentication_dialog_get_password at Base 0.3.0
+ clinica_authentication_dialog_get_type at Base 0.3.0
+ clinica_authentication_dialog_get_username at Base 0.3.0
+ clinica_authentication_dialog_new at Base 0.3.0
+ clinica_backup_engine_backup at Base 0.3.0
+ clinica_backup_engine_construct at Base 0.3.0
+ clinica_backup_engine_get_type at Base 0.3.0
+ clinica_backup_engine_import at Base 0.3.0
+ clinica_backup_engine_import_finish at Base 0.3.0
+ clinica_backup_engine_new at Base 0.3.0
+ clinica_buildable_get_type at Base 0.3.0
+ clinica_buildable_setup at Base 0.3.0
+ clinica_builder_add_from_resource at Base 0.3.0
+ clinica_builder_construct at Base 0.3.0
+ clinica_builder_construct_with_filename at Base 0.3.0
+ clinica_builder_get_type at Base 0.3.0
+ clinica_builder_load_into_dialog at Base 0.3.0
+ clinica_builder_load_into_window at Base 0.3.0
+ clinica_builder_new at Base 0.3.0
+ clinica_builder_new_with_filename at Base 0.3.0
+ clinica_calendar_construct at Base 0.3.0
+ clinica_calendar_event_list_construct at Base 0.3.0
+ clinica_calendar_event_list_get_type at Base 0.3.0
+ clinica_calendar_event_list_new at Base 0.3.0
+ clinica_calendar_event_list_set_day at Base 0.3.0
+ clinica_calendar_focus_today at Base 0.3.0
+ clinica_calendar_get_days_to_prepend at Base 0.3.0
+ clinica_calendar_get_handler at Base 0.3.0
+ clinica_calendar_get_selected_date at Base 0.3.0
+ clinica_calendar_get_type at Base 0.3.0
+ clinica_calendar_header_construct at Base 0.3.0
+ clinica_calendar_header_get_type at Base 0.3.0
+ clinica_calendar_header_new at Base 0.3.0
+ clinica_calendar_new at Base 0.3.0
+ clinica_calendar_set_date at Base 0.3.0
+ clinica_calendar_toolbar_construct at Base 0.3.0
+ clinica_calendar_toolbar_get_type at Base 0.3.0
+ clinica_calendar_toolbar_new at Base 0.3.0
+ clinica_calendar_toolbar_on_add_button_clicked at Base 0.3.0
+ clinica_calendar_update_month at Base 0.3.0
+ clinica_calendar_view_construct at Base 0.3.0
+ clinica_calendar_view_get_calendar at Base 0.3.0
+ clinica_calendar_view_get_header at Base 0.3.0
+ clinica_calendar_view_get_resource_manager at Base 0.3.0
+ clinica_calendar_view_get_style_context at Base 0.3.0
+ clinica_calendar_view_get_toolbar at Base 0.3.0
+ clinica_calendar_view_get_type at Base 0.3.0
+ clinica_calendar_view_new at Base 0.3.0
+ clinica_calendar_view_set_resource_manager at Base 0.3.0
+ clinica_calendar_view_set_toolbar at Base 0.3.0
+ clinica_calendar_window_construct at Base 0.3.0
+ clinica_calendar_window_get_calendar_view at Base 0.3.0
+ clinica_calendar_window_get_event_widget at Base 0.3.0
+ clinica_calendar_window_get_resource_manager at Base 0.3.0
+ clinica_calendar_window_get_toolbar at Base 0.3.0
+ clinica_calendar_window_get_type at Base 0.3.0
+ clinica_calendar_window_new at Base 0.3.0
+ clinica_calendar_window_on_day_selected at Base 0.3.0
+ clinica_calendar_window_set_calendar_view at Base 0.3.0
+ clinica_calendar_window_set_event_widget at Base 0.3.0
+ clinica_calendar_window_set_resource_manager at Base 0.3.0
+ clinica_core_activatable_activate at Base 0.3.0
+ clinica_core_activatable_deactivate at Base 0.3.0
+ clinica_core_activatable_get_resource_manager at Base 0.3.0
+ clinica_core_activatable_get_type at Base 0.3.0
+ clinica_core_activatable_set_resource_manager at Base 0.3.0
+ clinica_core_activatable_update_state at Base 0.3.0
+ clinica_data_provider_doctors at Base 0.3.0
+ clinica_data_provider_events at Base 0.3.0
+ clinica_data_provider_get_doctor at Base 0.3.0
+ clinica_data_provider_get_event at Base 0.3.0
+ clinica_data_provider_get_file_store at Base 0.3.0
+ clinica_data_provider_get_name at Base 0.3.0
+ clinica_data_provider_get_patient at Base 0.3.0
+ clinica_data_provider_get_type at Base 0.3.0
+ clinica_data_provider_get_visit at Base 0.3.0
+ clinica_data_provider_model_construct at Base 0.3.0
+ clinica_data_provider_model_get_type at Base 0.3.0
+ clinica_data_provider_model_new at Base 0.3.0
+ clinica_data_provider_patients at Base 0.3.0
+ clinica_data_provider_remove_doctor at Base 0.3.0
+ clinica_data_provider_remove_event at Base 0.3.0
+ clinica_data_provider_remove_patient at Base 0.3.0
+ clinica_data_provider_remove_visit at Base 0.3.0
+ clinica_data_provider_save_doctor at Base 0.3.0
+ clinica_data_provider_save_event at Base 0.3.0
+ clinica_data_provider_save_patient at Base 0.3.0
+ clinica_data_provider_save_visit at Base 0.3.0
+ clinica_data_provider_sort_order_get_type at Base 0.3.0
+ clinica_data_provider_visits at Base 0.3.0
+ clinica_data_server_construct at Base 0.3.0
+ clinica_data_server_default_handler at Base 0.3.0
+ clinica_data_server_format_response at Base 0.3.0
+ clinica_data_server_get_type at Base 0.3.0
+ clinica_data_server_new at Base 0.3.0
+ clinica_data_server_rpc_handler at Base 0.3.0
+ clinica_data_server_start at Base 0.3.0
+ clinica_data_server_stop at Base 0.3.0
+ clinica_date_handler_add_full_offset at Base 0.3.0
+ clinica_date_handler_add_month_offset at Base 0.3.0
+ clinica_date_handler_add_year_offset at Base 0.3.0
+ clinica_date_handler_construct at Base 0.3.0
+ clinica_date_handler_format at Base 0.3.0
+ clinica_date_handler_get_current_month at Base 0.3.0
+ clinica_date_handler_get_current_year at Base 0.3.0
+ clinica_date_handler_get_date at Base 0.3.0
+ clinica_date_handler_get_first_day_of_month at Base 0.3.0
+ clinica_date_handler_get_type at Base 0.3.0
+ clinica_date_handler_new at Base 0.3.0
+ clinica_date_switcher_construct at Base 0.3.0
+ clinica_date_switcher_get_hovered at Base 0.3.0
+ clinica_date_switcher_get_is_pressed at Base 0.3.0
+ clinica_date_switcher_get_label at Base 0.3.0
+ clinica_date_switcher_get_text at Base 0.3.0
+ clinica_date_switcher_get_type at Base 0.3.0
+ clinica_date_switcher_new at Base 0.3.0
+ clinica_date_switcher_set_hovered at Base 0.3.0
+ clinica_date_switcher_set_is_pressed at Base 0.3.0
+ clinica_date_switcher_set_label at Base 0.3.0
+ clinica_date_switcher_set_text at Base 0.3.0
+ clinica_date_time_picker_construct at Base 0.3.0
+ clinica_date_time_picker_get_datetime at Base 0.3.0
+ clinica_date_time_picker_get_type at Base 0.3.0
+ clinica_date_time_picker_new at Base 0.3.0
+ clinica_date_time_picker_set_date at Base 0.3.0
+ clinica_day_add_event at Base 0.3.0
+ clinica_day_add_visit at Base 0.3.0
+ clinica_day_construct at Base 0.3.0
+ clinica_day_get_date at Base 0.3.0
+ clinica_day_get_type at Base 0.3.0
+ clinica_day_new at Base 0.3.0
+ clinica_day_remove_event at Base 0.3.0
+ clinica_day_remove_visit at Base 0.3.0
+ clinica_day_reset_events at Base 0.3.0
+ clinica_day_set_date at Base 0.3.0
+ clinica_doctor_construct at Base 0.3.0
+ clinica_doctor_construct_from_json at Base 0.3.0
+ clinica_doctor_context_menu_construct at Base 0.3.0
+ clinica_doctor_context_menu_get_type at Base 0.3.0
+ clinica_doctor_context_menu_new at Base 0.3.0
+ clinica_doctor_editor_construct at Base 0.3.0
+ clinica_doctor_editor_construct_with_doctor at Base 0.3.0
+ clinica_doctor_editor_construct_with_name at Base 0.3.0
+ clinica_doctor_editor_get_type at Base 0.3.0
+ clinica_doctor_editor_new at Base 0.3.0
+ clinica_doctor_editor_new_with_doctor at Base 0.3.0
+ clinica_doctor_editor_new_with_name at Base 0.3.0
+ clinica_doctor_editor_on_name_focus_out_event at Base 0.3.0
+ clinica_doctor_editor_on_surname_focus_out_event at Base 0.3.0
+ clinica_doctor_editor_response_get_type at Base 0.3.0
+ clinica_doctor_editor_run at Base 0.3.0
+ clinica_doctor_filtered_list_store_construct at Base 0.3.0
+ clinica_doctor_filtered_list_store_get_type at Base 0.3.0
+ clinica_doctor_filtered_list_store_new at Base 0.3.0
+ clinica_doctor_filtered_list_store_on_find_entry_changed at Base 0.3.0
+ clinica_doctor_get_complete_name at Base 0.3.0
+ clinica_doctor_get_given_name at Base 0.3.0
+ clinica_doctor_get_id at Base 0.3.0
+ clinica_doctor_get_mobile at Base 0.3.0
+ clinica_doctor_get_phone at Base 0.3.0
+ clinica_doctor_get_surname at Base 0.3.0
+ clinica_doctor_get_type at Base 0.3.0
+ clinica_doctor_has_patients at Base 0.3.0
+ clinica_doctor_iterator_get at Base 0.3.0
+ clinica_doctor_iterator_get_type at Base 0.3.0
+ clinica_doctor_iterator_iterator at Base 0.3.0
+ clinica_doctor_iterator_next at Base 0.3.0
+ clinica_doctor_list_page_construct at Base 0.3.0
+ clinica_doctor_list_page_get_type at Base 0.3.0
+ clinica_doctor_list_page_new at Base 0.3.0
+ clinica_doctor_list_page_on_remove_item_activated at Base 0.3.0
+ clinica_doctor_list_store_construct at Base 0.3.0
+ clinica_doctor_list_store_get_type at Base 0.3.0
+ clinica_doctor_list_store_load_data at Base 0.3.0
+ clinica_doctor_list_store_new at Base 0.3.0
+ clinica_doctor_list_view_construct at Base 0.3.0
+ clinica_doctor_list_view_get_selected_doctor at Base 0.3.0
+ clinica_doctor_list_view_get_selected_iter at Base 0.3.0
+ clinica_doctor_list_view_get_type at Base 0.3.0
+ clinica_doctor_list_view_new at Base 0.3.0
+ clinica_doctor_list_view_remove_selected_doctor at Base 0.3.0
+ clinica_doctor_new at Base 0.3.0
+ clinica_doctor_new_from_json at Base 0.3.0
+ clinica_doctor_patients at Base 0.3.0
+ clinica_doctor_set_given_name at Base 0.3.0
+ clinica_doctor_set_id at Base 0.3.0
+ clinica_doctor_set_mobile at Base 0.3.0
+ clinica_doctor_set_phone at Base 0.3.0
+ clinica_doctor_set_surname at Base 0.3.0
+ clinica_doctor_to_json at Base 0.3.0
+ clinica_empty_visit_iterator_construct at Base 0.3.0
+ clinica_empty_visit_iterator_get_type at Base 0.3.0
+ clinica_empty_visit_iterator_iterator at Base 0.3.0
+ clinica_empty_visit_iterator_new at Base 0.3.0
+ clinica_event_construct at Base 0.3.0
+ clinica_event_construct_from_json at Base 0.3.0
+ clinica_event_detail_construct at Base 0.3.0
+ clinica_event_detail_get_type at Base 0.3.0
+ clinica_event_detail_new at Base 0.3.0
+ clinica_event_editor_construct at Base 0.3.0
+ clinica_event_editor_construct_with_date at Base 0.3.0
+ clinica_event_editor_get_selected_event at Base 0.3.0
+ clinica_event_editor_get_type at Base 0.3.0
+ clinica_event_editor_new at Base 0.3.0
+ clinica_event_editor_new_with_date at Base 0.3.0
+ clinica_event_editor_select_patient at Base 0.3.0
+ clinica_event_get_date at Base 0.3.0
+ clinica_event_get_description at Base 0.3.0
+ clinica_event_get_id at Base 0.3.0
+ clinica_event_get_patient at Base 0.3.0
+ clinica_event_get_title at Base 0.3.0
+ clinica_event_get_type at Base 0.3.0
+ clinica_event_get_venue at Base 0.3.0
+ clinica_event_get_visit at Base 0.3.0
+ clinica_event_iterator_get at Base 0.3.0
+ clinica_event_iterator_get_type at Base 0.3.0
+ clinica_event_iterator_iterator at Base 0.3.0
+ clinica_event_iterator_next at Base 0.3.0
+ clinica_event_list_store_add_event at Base 0.3.0
+ clinica_event_list_store_construct at Base 0.3.0
+ clinica_event_list_store_get_type at Base 0.3.0
+ clinica_event_list_store_load_data at Base 0.3.0
+ clinica_event_list_store_new at Base 0.3.0
+ clinica_event_list_store_remove_event at Base 0.3.0
+ clinica_event_new at Base 0.3.0
+ clinica_event_new_from_json at Base 0.3.0
+ clinica_event_set_date at Base 0.3.0
+ clinica_event_set_description at Base 0.3.0
+ clinica_event_set_id at Base 0.3.0
+ clinica_event_set_patient at Base 0.3.0
+ clinica_event_set_title at Base 0.3.0
+ clinica_event_set_venue at Base 0.3.0
+ clinica_event_set_visit at Base 0.3.0
+ clinica_event_to_json at Base 0.3.0
+ clinica_file_detail_construct at Base 0.3.0
+ clinica_file_detail_get_type at Base 0.3.0
+ clinica_file_detail_new at Base 0.3.0
+ clinica_file_object_construct at Base 0.3.0
+ clinica_file_object_get_file at Base 0.3.0
+ clinica_file_object_get_file_name at Base 0.3.0
+ clinica_file_object_get_file_path at Base 0.3.0
+ clinica_file_object_get_id at Base 0.3.0
+ clinica_file_object_get_type at Base 0.3.0
+ clinica_file_object_new at Base 0.3.0
+ clinica_file_object_ref at Base 0.3.0
+ clinica_file_object_unref at Base 0.3.0
+ clinica_file_store_get_files at Base 0.3.0
+ clinica_file_store_get_id_path at Base 0.3.0
+ clinica_file_store_get_type at Base 0.3.0
+ clinica_file_store_remove_file at Base 0.3.0
+ clinica_file_store_store_file at Base 0.3.0
+ clinica_find_entry_construct at Base 0.3.0
+ clinica_find_entry_get_type at Base 0.3.0
+ clinica_find_entry_new at Base 0.3.0
+ clinica_gender_get_type at Base 0.3.0
+ clinica_get_resource at Base 0.3.0
+ clinica_has_gsettings at Base 0.3.0
+ clinica_import_dialog_construct at Base 0.3.0
+ clinica_import_dialog_get_filename at Base 0.3.0
+ clinica_import_dialog_get_type at Base 0.3.0
+ clinica_import_dialog_new at Base 0.3.0
+ clinica_local_file_store_construct at Base 0.3.0
+ clinica_local_file_store_get_type at Base 0.3.0
+ clinica_local_file_store_new at Base 0.3.0
+ clinica_local_medicine_iter_construct at Base 0.3.0
+ clinica_local_medicine_iter_get_type at Base 0.3.0
+ clinica_local_medicine_iter_new at Base 0.3.0
+ clinica_local_medicine_iter_ref at Base 0.3.0
+ clinica_local_medicine_iter_unref at Base 0.3.0
+ clinica_local_medicines_database_add_medicine at Base 0.3.0
+ clinica_local_medicines_database_construct at Base 0.3.0
+ clinica_local_medicines_database_delete_medicine at Base 0.3.0
+ clinica_local_medicines_database_get_resource_manager at Base 0.3.0
+ clinica_local_medicines_database_get_type at Base 0.3.0
+ clinica_local_medicines_database_new at Base 0.3.0
+ clinica_local_medicines_database_set_resource_manager at Base 0.3.0
+ clinica_local_medicines_database_update_medicine at Base 0.3.0
+ clinica_medicine_browser_dialog_construct at Base 0.3.0
+ clinica_medicine_browser_dialog_get_type at Base 0.3.0
+ clinica_medicine_browser_dialog_new at Base 0.3.0
+ clinica_medicine_construct at Base 0.3.0
+ clinica_medicine_detail_dialog_construct at Base 0.3.0
+ clinica_medicine_detail_dialog_get_type at Base 0.3.0
+ clinica_medicine_detail_dialog_new at Base 0.3.0
+ clinica_medicine_editor_construct at Base 0.3.0
+ clinica_medicine_editor_get_type at Base 0.3.0
+ clinica_medicine_editor_new at Base 0.3.0
+ clinica_medicine_editor_response_get_type at Base 0.3.0
+ clinica_medicine_editor_run at Base 0.3.0
+ clinica_medicine_get_active_ingredient at Base 0.3.0
+ clinica_medicine_get_description at Base 0.3.0
+ clinica_medicine_get_id at Base 0.3.0
+ clinica_medicine_get_name at Base 0.3.0
+ clinica_medicine_get_other_notes at Base 0.3.0
+ clinica_medicine_get_price at Base 0.3.0
+ clinica_medicine_get_storage_reccomendations at Base 0.3.0
+ clinica_medicine_get_type at Base 0.3.0
+ clinica_medicine_new at Base 0.3.0
+ clinica_medicine_search_engine_abort_search at Base 0.3.0
+ clinica_medicine_search_engine_get_name at Base 0.3.0
+ clinica_medicine_search_engine_get_type at Base 0.3.0
+ clinica_medicine_search_engine_model_construct at Base 0.3.0
+ clinica_medicine_search_engine_model_get_type at Base 0.3.0
+ clinica_medicine_search_engine_model_new at Base 0.3.0
+ clinica_medicine_search_engine_search_medicine at Base 0.3.0
+ clinica_medicine_search_page_construct at Base 0.3.0
+ clinica_medicine_search_page_get_type at Base 0.3.0
+ clinica_medicine_search_page_new at Base 0.3.0
+ clinica_medicine_set_active_ingredient at Base 0.3.0
+ clinica_medicine_set_description at Base 0.3.0
+ clinica_medicine_set_id at Base 0.3.0
+ clinica_medicine_set_name at Base 0.3.0
+ clinica_medicine_set_other_notes at Base 0.3.0
+ clinica_medicine_set_price at Base 0.3.0
+ clinica_medicine_set_storage_reccomendations at Base 0.3.0
+ clinica_medicine_tree_view_clear at Base 0.3.0
+ clinica_medicine_tree_view_construct at Base 0.3.0
+ clinica_medicine_tree_view_get_type at Base 0.3.0
+ clinica_medicine_tree_view_new at Base 0.3.0
+ clinica_medicine_tree_view_push_medicine at Base 0.3.0
+ clinica_networked_data_provider_connect_to_server at Base 0.3.0
+ clinica_networked_data_provider_construct at Base 0.3.0
+ clinica_networked_data_provider_disconnect_from_server at Base 0.3.0
+ clinica_networked_data_provider_get_connected at Base 0.3.0
+ clinica_networked_data_provider_get_type at Base 0.3.0
+ clinica_networked_data_provider_new at Base 0.3.0
+ clinica_networked_data_provider_try_authentication at Base 0.3.0
+ clinica_networked_doctor_iterator_construct at Base 0.3.0
+ clinica_networked_doctor_iterator_get_type at Base 0.3.0
+ clinica_networked_doctor_iterator_new at Base 0.3.0
+ clinica_networked_event_iterator_construct at Base 0.3.0
+ clinica_networked_event_iterator_get_type at Base 0.3.0
+ clinica_networked_event_iterator_new at Base 0.3.0
+ clinica_networked_patient_iterator_construct at Base 0.3.0
+ clinica_networked_patient_iterator_get_type at Base 0.3.0
+ clinica_networked_patient_iterator_new at Base 0.3.0
+ clinica_networked_visit_iterator_construct at Base 0.3.0
+ clinica_networked_visit_iterator_get_type at Base 0.3.0
+ clinica_networked_visit_iterator_new at Base 0.3.0
+ clinica_page_get_parent_entry at Base 0.3.0
+ clinica_page_get_resource_manager at Base 0.3.0
+ clinica_page_get_sidebar_entry at Base 0.3.0
+ clinica_page_get_title at Base 0.3.0
+ clinica_page_get_type at Base 0.3.0
+ clinica_page_set_resource_manager at Base 0.3.0
+ clinica_param_spec_file_object at Base 0.3.0
+ clinica_param_spec_local_medicine_iter at Base 0.3.0
+ clinica_patient_construct at Base 0.3.0
+ clinica_patient_construct_from_json at Base 0.3.0
+ clinica_patient_context_menu_construct at Base 0.3.0
+ clinica_patient_context_menu_get_type at Base 0.3.0
+ clinica_patient_context_menu_new at Base 0.3.0
+ clinica_patient_detail_construct at Base 0.3.0
+ clinica_patient_detail_get_type at Base 0.3.0
+ clinica_patient_detail_new at Base 0.3.0
+ clinica_patient_editor_activatable_activate at Base 0.3.0
+ clinica_patient_editor_activatable_deactivate at Base 0.3.0
+ clinica_patient_editor_activatable_get_patient_editor at Base 0.3.0
+ clinica_patient_editor_activatable_get_type at Base 0.3.0
+ clinica_patient_editor_activatable_set_patient_editor at Base 0.3.0
+ clinica_patient_editor_activatable_update_state at Base 0.3.0
+ clinica_patient_editor_check_input_data at Base 0.3.0
+ clinica_patient_editor_construct at Base 0.3.0
+ clinica_patient_editor_construct_with_name at Base 0.3.0
+ clinica_patient_editor_construct_with_patient at Base 0.3.0
+ clinica_patient_editor_doctor_completion_action_get_type at Base 0.3.0
+ clinica_patient_editor_get_type at Base 0.3.0
+ clinica_patient_editor_is_birth_date_valid at Base 0.3.0
+ clinica_patient_editor_is_doctor_valid at Base 0.3.0
+ clinica_patient_editor_new at Base 0.3.0
+ clinica_patient_editor_new_with_name at Base 0.3.0
+ clinica_patient_editor_new_with_patient at Base 0.3.0
+ clinica_patient_editor_on_name_focus_out_event at Base 0.3.0
+ clinica_patient_editor_on_surname_focus_out_event at Base 0.3.0
+ clinica_patient_editor_response_get_type at Base 0.3.0
+ clinica_patient_editor_run at Base 0.3.0
+ clinica_patient_editor_setup_extension_set at Base 0.3.0
+ clinica_patient_entry_construct at Base 0.3.0
+ clinica_patient_entry_get_patient at Base 0.3.0
+ clinica_patient_entry_get_type at Base 0.3.0
+ clinica_patient_entry_is_valid at Base 0.3.0
+ clinica_patient_entry_new at Base 0.3.0
+ clinica_patient_entry_select_patient at Base 0.3.0
+ clinica_patient_filtered_list_store_construct at Base 0.3.0
+ clinica_patient_filtered_list_store_get_type at Base 0.3.0
+ clinica_patient_filtered_list_store_new at Base 0.3.0
+ clinica_patient_filtered_list_store_on_find_entry_changed at Base 0.3.0
+ clinica_patient_get_birth_date at Base 0.3.0
+ clinica_patient_get_complete_name at Base 0.3.0
+ clinica_patient_get_doctor at Base 0.3.0
+ clinica_patient_get_gender at Base 0.3.0
+ clinica_patient_get_given_name at Base 0.3.0
+ clinica_patient_get_id at Base 0.3.0
+ clinica_patient_get_identification_code at Base 0.3.0
+ clinica_patient_get_phone at Base 0.3.0
+ clinica_patient_get_residence_address at Base 0.3.0
+ clinica_patient_get_surname at Base 0.3.0
+ clinica_patient_get_type at Base 0.3.0
+ clinica_patient_iterator_get at Base 0.3.0
+ clinica_patient_iterator_get_type at Base 0.3.0
+ clinica_patient_iterator_iterator at Base 0.3.0
+ clinica_patient_iterator_next at Base 0.3.0
+ clinica_patient_list_page_construct at Base 0.3.0
+ clinica_patient_list_page_get_type at Base 0.3.0
+ clinica_patient_list_page_new at Base 0.3.0
+ clinica_patient_list_store_construct at Base 0.3.0
+ clinica_patient_list_store_get_type at Base 0.3.0
+ clinica_patient_list_store_load_data at Base 0.3.0
+ clinica_patient_list_store_new at Base 0.3.0
+ clinica_patient_list_store_remove_patient at Base 0.3.0
+ clinica_patient_list_store_update_signals at Base 0.3.0
+ clinica_patient_list_view_construct at Base 0.3.0
+ clinica_patient_list_view_get_selected_patient at Base 0.3.0
+ clinica_patient_list_view_get_type at Base 0.3.0
+ clinica_patient_list_view_new at Base 0.3.0
+ clinica_patient_list_view_remove_selected_patient at Base 0.3.0
+ clinica_patient_new at Base 0.3.0
+ clinica_patient_new_from_json at Base 0.3.0
+ clinica_patient_set_birth_date at Base 0.3.0
+ clinica_patient_set_doctor at Base 0.3.0
+ clinica_patient_set_gender at Base 0.3.0
+ clinica_patient_set_given_name at Base 0.3.0
+ clinica_patient_set_id at Base 0.3.0
+ clinica_patient_set_identification_code at Base 0.3.0
+ clinica_patient_set_phone at Base 0.3.0
+ clinica_patient_set_residence_address at Base 0.3.0
+ clinica_patient_set_surname at Base 0.3.0
+ clinica_patient_to_json at Base 0.3.0
+ clinica_patient_visits at Base 0.3.0
+ clinica_plugin_engine_construct at Base 0.3.0
+ clinica_plugin_engine_get_type at Base 0.3.0
+ clinica_plugin_engine_new at Base 0.3.0
+ clinica_plugin_manager_construct at Base 0.3.0
+ clinica_plugin_manager_get_type at Base 0.3.0
+ clinica_plugin_manager_new at Base 0.3.0
+ clinica_resource_manager_construct at Base 0.3.0
+ clinica_resource_manager_get_data_path at Base 0.3.0
+ clinica_resource_manager_get_data_provider at Base 0.3.0
+ clinica_resource_manager_get_filestore_dir at Base 0.3.0
+ clinica_resource_manager_get_plugins_dirs at Base 0.3.0
+ clinica_resource_manager_get_type at Base 0.3.0
+ clinica_resource_manager_load_plugins at Base 0.3.0
+ clinica_resource_manager_load_plugins_finish at Base 0.3.0
+ clinica_resource_manager_new at Base 0.3.0
+ clinica_resource_manager_register_data_provider at Base 0.3.0
+ clinica_resource_manager_register_medicine_search_engine at Base 0.3.0
+ clinica_resource_manager_select_data_provider at Base 0.3.0
+ clinica_resource_manager_setup_extension_set at Base 0.3.0
+ clinica_resource_manager_unregister_data_provider at Base 0.3.0
+ clinica_resource_manager_unregister_medicine_search_engine at Base 0.3.0
+ clinica_rpc_type_get_type at Base 0.3.0
+ clinica_service_construct at Base 0.3.0
+ clinica_service_get_doctor_data at Base 0.3.0
+ clinica_service_get_event_data at Base 0.3.0
+ clinica_service_get_events at Base 0.3.0
+ clinica_service_get_patient_data at Base 0.3.0
+ clinica_service_get_patient_doctor at Base 0.3.0
+ clinica_service_get_patient_name at Base 0.3.0
+ clinica_service_get_patient_visits at Base 0.3.0
+ clinica_service_get_type at Base 0.3.0
+ clinica_service_get_visit_data at Base 0.3.0
+ clinica_service_new at Base 0.3.0
+ clinica_service_open_visits at Base 0.3.0
+ clinica_service_patients_filter at Base 0.3.0
+ clinica_service_register_object at Base 0.3.0
+ clinica_service_version at Base 0.3.0
+ clinica_settings_activate_medicine_search_engine at Base 0.3.0
+ clinica_settings_activate_plugin at Base 0.3.0
+ clinica_settings_construct at Base 0.3.0
+ clinica_settings_deactivate_medicine_search_engine at Base 0.3.0
+ clinica_settings_deactivate_plugin at Base 0.3.0
+ clinica_settings_get_active_plugins at Base 0.3.0
+ clinica_settings_get_medicine_search_engines at Base 0.3.0
+ clinica_settings_get_type at Base 0.3.0
+ clinica_settings_is_plugin_active at Base 0.3.0
+ clinica_settings_manager_construct at Base 0.3.0
+ clinica_settings_manager_get_type at Base 0.3.0
+ clinica_settings_manager_new at Base 0.3.0
+ clinica_settings_new at Base 0.3.0
+ clinica_sidebar_add_entry at Base 0.3.0
+ clinica_sidebar_calendar_entry_construct at Base 0.3.0
+ clinica_sidebar_calendar_entry_get_type at Base 0.3.0
+ clinica_sidebar_calendar_entry_new at Base 0.3.0
+ clinica_sidebar_construct at Base 0.3.0
+ clinica_sidebar_entry_get_type at Base 0.3.0
+ clinica_sidebar_entry_pixbuf at Base 0.3.0
+ clinica_sidebar_entry_title at Base 0.3.0
+ clinica_sidebar_expand_all at Base 0.3.0
+ clinica_sidebar_get_type at Base 0.3.0
+ clinica_sidebar_new at Base 0.3.0
+ clinica_sidebar_page_entry_construct at Base 0.3.0
+ clinica_sidebar_page_entry_get_type at Base 0.3.0
+ clinica_sidebar_page_entry_new at Base 0.3.0
+ clinica_sidebar_remove_entry at Base 0.3.0
+ clinica_sidebar_search_entry at Base 0.3.0
+ clinica_sidebar_select_entry at Base 0.3.0
+ clinica_sqlite_data_provider_construct at Base 0.3.0
+ clinica_sqlite_data_provider_datetime_to_string at Base 0.3.0
+ clinica_sqlite_data_provider_get_type at Base 0.3.0
+ clinica_sqlite_data_provider_init_resources at Base 0.3.0
+ clinica_sqlite_data_provider_new at Base 0.3.0
+ clinica_sqlite_data_provider_string_to_datetime at Base 0.3.0
+ clinica_sqlite_doctor_iterator_construct at Base 0.3.0
+ clinica_sqlite_doctor_iterator_get_type at Base 0.3.0
+ clinica_sqlite_doctor_iterator_new at Base 0.3.0
+ clinica_sqlite_event_iterator_construct at Base 0.3.0
+ clinica_sqlite_event_iterator_get_type at Base 0.3.0
+ clinica_sqlite_event_iterator_new at Base 0.3.0
+ clinica_sqlite_patient_iterator_construct at Base 0.3.0
+ clinica_sqlite_patient_iterator_get_type at Base 0.3.0
+ clinica_sqlite_patient_iterator_new at Base 0.3.0
+ clinica_sqlite_visit_iterator_construct at Base 0.3.0
+ clinica_sqlite_visit_iterator_get_type at Base 0.3.0
+ clinica_sqlite_visit_iterator_new at Base 0.3.0
+ clinica_start_page_construct at Base 0.3.0
+ clinica_start_page_get_type at Base 0.3.0
+ clinica_start_page_new at Base 0.3.0
+ clinica_start_page_on_calendar_window_button_clicked at Base 0.3.0
+ clinica_start_page_on_find_entry_changed at Base 0.3.0
+ clinica_start_page_on_medicines_search_page_button_clicked at Base 0.3.0
+ clinica_start_page_on_new_button_clicked at Base 0.3.0
+ clinica_start_page_set_name at Base 0.3.0
+ clinica_toolbar_construct at Base 0.3.0
+ clinica_toolbar_get_type at Base 0.3.0
+ clinica_toolbar_insert at Base 0.3.0
+ clinica_toolbar_item_construct at Base 0.3.0
+ clinica_toolbar_item_get_type at Base 0.3.0
+ clinica_toolbar_item_new at Base 0.3.0
+ clinica_toolbar_item_set_active at Base 0.3.0
+ clinica_toolbar_new at Base 0.3.0
+ clinica_ui_manager_construct at Base 0.3.0
+ clinica_ui_manager_get_type at Base 0.3.0
+ clinica_ui_manager_new at Base 0.3.0
+ clinica_user_interface_activatable_activate at Base 0.3.0
+ clinica_user_interface_activatable_deactivate at Base 0.3.0
+ clinica_user_interface_activatable_get_resource_manager at Base 0.3.0
+ clinica_user_interface_activatable_get_type at Base 0.3.0
+ clinica_user_interface_activatable_get_user_interface at Base 0.3.0
+ clinica_user_interface_activatable_set_resource_manager at Base 0.3.0
+ clinica_user_interface_activatable_set_user_interface at Base 0.3.0
+ clinica_user_interface_activatable_update_state at Base 0.3.0
+ clinica_user_interface_add_page at Base 0.3.0
+ clinica_user_interface_close_visit_window at Base 0.3.0
+ clinica_user_interface_construct at Base 0.3.0
+ clinica_user_interface_error_callback at Base 0.3.0
+ clinica_user_interface_get_started at Base 0.3.0
+ clinica_user_interface_get_type at Base 0.3.0
+ clinica_user_interface_get_ui_manager at Base 0.3.0
+ clinica_user_interface_load_action_entries at Base 0.3.0
+ clinica_user_interface_load_page at Base 0.3.0
+ clinica_user_interface_load_pages at Base 0.3.0
+ clinica_user_interface_load_pages_finish at Base 0.3.0
+ clinica_user_interface_load_plugins at Base 0.3.0
+ clinica_user_interface_load_plugins_finish at Base 0.3.0
+ clinica_user_interface_new at Base 0.3.0
+ clinica_user_interface_register_page at Base 0.3.0
+ clinica_user_interface_set_page at Base 0.3.0
+ clinica_user_interface_setup_extension_set at Base 0.3.0
+ clinica_user_interface_show_calendar_window at Base 0.3.0
+ clinica_user_interface_show_doctor_list_page at Base 0.3.0
+ clinica_user_interface_show_main_window at Base 0.3.0
+ clinica_user_interface_show_medicines_search_page at Base 0.3.0
+ clinica_user_interface_show_patient_list_page at Base 0.3.0
+ clinica_user_interface_show_start_page at Base 0.3.0
+ clinica_user_interface_show_visit_window at Base 0.3.0
+ clinica_user_interface_start at Base 0.3.0
+ clinica_user_interface_unregister_page at Base 0.3.0
+ clinica_utils_capitalize at Base 0.3.0
+ clinica_utils_check_date at Base 0.3.0
+ clinica_utils_pixbuf_from_svg_resource at Base 0.3.0
+ clinica_utils_set_alert_state at Base 0.3.0
+ clinica_utils_set_widget_size at Base 0.3.0
+ clinica_utils_show_error_message at Base 0.3.0
+ clinica_value_get_file_object at Base 0.3.0
+ clinica_value_get_local_medicine_iter at Base 0.3.0
+ clinica_value_set_file_object at Base 0.3.0
+ clinica_value_set_local_medicine_iter at Base 0.3.0
+ clinica_value_take_file_object at Base 0.3.0
+ clinica_value_take_local_medicine_iter at Base 0.3.0
+ clinica_visit_actions_construct at Base 0.3.0
+ clinica_visit_actions_get_type at Base 0.3.0
+ clinica_visit_actions_new at Base 0.3.0
+ clinica_visit_actions_set_active_tab at Base 0.3.0
+ clinica_visit_browser_construct at Base 0.3.0
+ clinica_visit_browser_delete_focused_visit at Base 0.3.0
+ clinica_visit_browser_focus_new_page at Base 0.3.0
+ clinica_visit_browser_get_type at Base 0.3.0
+ clinica_visit_browser_new at Base 0.3.0
+ clinica_visit_browser_print_focused_visit at Base 0.3.0
+ clinica_visit_browser_save_focused_visit at Base 0.3.0
+ clinica_visit_browser_save_focused_visit_as_pdf at Base 0.3.0
+ clinica_visit_construct at Base 0.3.0
+ clinica_visit_construct_from_json at Base 0.3.0
+ clinica_visit_detail_construct at Base 0.3.0
+ clinica_visit_detail_get_type at Base 0.3.0
+ clinica_visit_detail_new at Base 0.3.0
+ clinica_visit_file_manager_construct at Base 0.3.0
+ clinica_visit_file_manager_get_type at Base 0.3.0
+ clinica_visit_file_manager_new at Base 0.3.0
+ clinica_visit_file_manager_on_attach_button_clicked at Base 0.3.0
+ clinica_visit_file_manager_reload_file_list at Base 0.3.0
+ clinica_visit_file_manager_update_visit at Base 0.3.0
+ clinica_visit_get_anamnesis at Base 0.3.0
+ clinica_visit_get_date at Base 0.3.0
+ clinica_visit_get_diagnosis at Base 0.3.0
+ clinica_visit_get_histopathology at Base 0.3.0
+ clinica_visit_get_id at Base 0.3.0
+ clinica_visit_get_laboratory_exam at Base 0.3.0
+ clinica_visit_get_patient at Base 0.3.0
+ clinica_visit_get_physical_examination at Base 0.3.0
+ clinica_visit_get_subsequent_checks at Base 0.3.0
+ clinica_visit_get_systemic_therapy at Base 0.3.0
+ clinica_visit_get_topical_therapy at Base 0.3.0
+ clinica_visit_get_type at Base 0.3.0
+ clinica_visit_iterator_get at Base 0.3.0
+ clinica_visit_iterator_get_type at Base 0.3.0
+ clinica_visit_iterator_iterator at Base 0.3.0
+ clinica_visit_iterator_next at Base 0.3.0
+ clinica_visit_list_store_construct at Base 0.3.0
+ clinica_visit_list_store_get_type at Base 0.3.0
+ clinica_visit_list_store_iter_to_visit at Base 0.3.0
+ clinica_visit_list_store_load_data at Base 0.3.0
+ clinica_visit_list_store_new at Base 0.3.0
+ clinica_visit_list_store_visit_to_iter at Base 0.3.0
+ clinica_visit_new at Base 0.3.0
+ clinica_visit_new_from_json at Base 0.3.0
+ clinica_visit_page_close at Base 0.3.0
+ clinica_visit_page_construct at Base 0.3.0
+ clinica_visit_page_get_type at Base 0.3.0
+ clinica_visit_page_new at Base 0.3.0
+ clinica_visit_page_select_visit at Base 0.3.0
+ clinica_visit_printer_construct at Base 0.3.0
+ clinica_visit_printer_get_field_empty_font at Base 0.3.0
+ clinica_visit_printer_get_font_description at Base 0.3.0
+ clinica_visit_printer_get_handle_pagination at Base 0.3.0
+ clinica_visit_printer_get_height at Base 0.3.0
+ clinica_visit_printer_get_margin at Base 0.3.0
+ clinica_visit_printer_get_type at Base 0.3.0
+ clinica_visit_printer_get_width at Base 0.3.0
+ clinica_visit_printer_new at Base 0.3.0
+ clinica_visit_printer_print_report at Base 0.3.0
+ clinica_visit_printer_print_report_to_pdf at Base 0.3.0
+ clinica_visit_printer_set_field_empty_font at Base 0.3.0
+ clinica_visit_printer_set_font_description at Base 0.3.0
+ clinica_visit_printer_set_handle_pagination at Base 0.3.0
+ clinica_visit_printer_set_height at Base 0.3.0
+ clinica_visit_printer_set_margin at Base 0.3.0
+ clinica_visit_printer_set_width at Base 0.3.0
+ clinica_visit_scheduler_dialog_construct at Base 0.3.0
+ clinica_visit_scheduler_dialog_get_type at Base 0.3.0
+ clinica_visit_scheduler_dialog_new at Base 0.3.0
+ clinica_visit_scheduler_dialog_response_get_type at Base 0.3.0
+ clinica_visit_scheduler_dialog_run at Base 0.3.0
+ clinica_visit_scheduler_dialog_select_date at Base 0.3.0
+ clinica_visit_set_anamnesis at Base 0.3.0
+ clinica_visit_set_date at Base 0.3.0
+ clinica_visit_set_diagnosis at Base 0.3.0
+ clinica_visit_set_histopathology at Base 0.3.0
+ clinica_visit_set_id at Base 0.3.0
+ clinica_visit_set_laboratory_exam at Base 0.3.0
+ clinica_visit_set_patient at Base 0.3.0
+ clinica_visit_set_physical_examination at Base 0.3.0
+ clinica_visit_set_subsequent_checks at Base 0.3.0
+ clinica_visit_set_systemic_therapy at Base 0.3.0
+ clinica_visit_set_topical_therapy at Base 0.3.0
+ clinica_visit_tab_construct at Base 0.3.0
+ clinica_visit_tab_construct_with_patient at Base 0.3.0
+ clinica_visit_tab_delete_visit at Base 0.3.0
+ clinica_visit_tab_fill_data at Base 0.3.0
+ clinica_visit_tab_get_type at Base 0.3.0
+ clinica_visit_tab_get_visit_id at Base 0.3.0
+ clinica_visit_tab_grab_focus at Base 0.3.0
+ clinica_visit_tab_new at Base 0.3.0
+ clinica_visit_tab_new_with_patient at Base 0.3.0
+ clinica_visit_tab_save_visit at Base 0.3.0
+ clinica_visit_tab_text_multi_line_construct at Base 0.3.0
+ clinica_visit_tab_text_multi_line_get_content at Base 0.3.0
+ clinica_visit_tab_text_multi_line_get_type at Base 0.3.0
+ clinica_visit_tab_text_multi_line_grab_focus at Base 0.3.0
+ clinica_visit_tab_text_multi_line_new at Base 0.3.0
+ clinica_visit_tab_text_multi_line_on_view_focus_in_event at Base 0.3.0
+ clinica_visit_tab_text_multi_line_on_view_focus_out_event at Base 0.3.0
+ clinica_visit_tab_text_multi_line_set_content at Base 0.3.0
+ clinica_visit_to_json at Base 0.3.0
+ clinica_visit_toolbar_construct at Base 0.3.0
+ clinica_visit_toolbar_get_type at Base 0.3.0
+ clinica_visit_toolbar_new at Base 0.3.0
+ clinica_wait_dialog_construct at Base 0.3.0
+ clinica_wait_dialog_get_type at Base 0.3.0
+ clinica_wait_dialog_new at Base 0.3.0
+ clinica_wait_dialog_set_message at Base 0.3.0
+ clinica_wait_dialog_set_progress at Base 0.3.0
diff --git a/debian/rules b/debian/rules
index 9403e03..5762ae4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,23 +2,11 @@
 # -*- makefile -*-
 # debian/rules for clinica
 
-%:
-	dh $@
+# Hardening support
+VALAFLAGS:=$(foreach w,$(CPPFLAGS) $(CFLAGS) $(LDFLAGS),-X $(w))
 
-clean:
+%:
 	dh $@
-	./waf --nocache distclean
-	rm -f gschemas.compiled
-	if test -d "waflib"; then find waflib -name "*.pyc" -delete; fi
-
-override_dh_auto_configure:
-	./waf --nocache configure --prefix=/usr
-
-override_dh_auto_build:
-	./waf --nocache build
-
-override_dh_auto_install:
-	./waf --nocache install --destdir=debian/tmp
 
 override_dh_installchangelogs:
 	dh_installchangelogs Changelog
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
new file mode 100644
index 0000000..9ff94dc
--- /dev/null
+++ b/doc/CMakeLists.txt
@@ -0,0 +1,2 @@
+install (FILES clinica.1 
+	DESTINATION share/man/man1)
diff --git a/libclinica/AboutDialog.vala b/libclinica/AboutDialog.vala
index 3fd4084..4b1a091 100644
--- a/libclinica/AboutDialog.vala
+++ b/libclinica/AboutDialog.vala
@@ -28,16 +28,17 @@ namespace Clinica {
                                    "Leonardo Robol <robol at poisson.phc.unipi.it>",
                                    "Maxwell Barvian (for the calendar taken from Maya)" };
             string [] artists = { "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>", 
-                                   "Francesco Del Prato <delprato at poisson.phc.unipi.it>" };
+                                  "Francesco Del Prato <delprato at poisson.phc.unipi.it>" };
             /* Get the logo */
-            var logo = new Image.from_file (resources.get_image_file("logo.svg"));
+            var logo = new Image.from_pixbuf (Utils.pixbuf_from_svg_resource (
+                Config.RESOURCE_BASE + "ui/icons/logo.svg", 128, 128));
             
             /* Init the Dialog with the data */
             GLib.Object (
                 program_name: "Clinica",
                 version: Config.VERSION,
                 logo: logo.pixbuf,
-		comments: _("Medical records manager"),
+                comments: _("Medical records manager"),
                 website: "http://poisson.phc.unipi.it/clinica/",
                 title: _("About Clinica"),
                 artists: artists,	
@@ -53,13 +54,16 @@ namespace Clinica {
                 
                 /* Start of LAUNCHPAD contributions. Each one is indented
                  * of two spaces */
-                _("\nLaunchpad contributions: \n") +
-                "  zeugma https://launchpad.net/~sunder67\n" +
-                "  Enrico \"eNry\" Carafa https://launchpad.net/~mr.tennents\n" +
-                "  Guybrush88 https://launchpad.net/~guybrush\n" +
-                "  Beto1917 https://launchpad.net/~beto-mst\n" + 
-                "  Sonia Alenda https://launchpad.net/~soniaalenda\n" +
-                "  Мирослав Николић https://launchpad.net/~lipek\n"
+                "zeugma https://launchpad.net/~sunder67\n" +
+                "Enrico \"eNry\" Carafa https://launchpad.net/~mr.tennents\n" +
+                "Guybrush88 https://launchpad.net/~guybrush\n" +
+                "Beto1917 https://launchpad.net/~beto-mst\n" + 
+                "Sonia Alenda https://launchpad.net/~soniaalenda\n" +
+                "Мирослав Николић https://launchpad.net/~lipek\n" + 
+                "Carlos C Soto https://launchpad.net/~csoto/\n" + 
+                "Fitoschido https://launchpad.net/~fitoschido\n" + 
+                "Jonay https://launchpad.net/~jonay-santana\n" +
+                "Marco https://launchpad.net/~marcodefreitas\n"
             );
             
             set_modal (true);
diff --git a/libclinica/Application.vala b/libclinica/Application.vala
new file mode 100644
index 0000000..e547fb4
--- /dev/null
+++ b/libclinica/Application.vala
@@ -0,0 +1,236 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+ 
+ namespace Clinica {
+ 
+    /**
+     * @brief The class of the clinica application running on the
+     * system.
+     */
+    public class Application : Gtk.Application {
+    
+        internal ResourceManager resource_manager;
+        
+        internal UserInterface user_interface;
+        
+        internal Service service;
+
+        internal DBusConnection connection = null;
+
+        public static string [] args;
+
+        public static bool daemon_mode;
+        public static bool version;
+        private static string program_name;
+        private static bool logging_enabled;
+        private static bool new_patient;
+        private static bool open_calendar;
+
+        public static const OptionEntry [] option_entries = {
+            { "version", 'v', 0, OptionArg.NONE, ref version, "Print version and exit", null },
+            { "daemon", 'd', 0, OptionArg.NONE, ref daemon_mode, "Run clinica in daemon mode", null },
+            { "debug", 'l', 0, OptionArg.NONE, ref logging_enabled, "Enable debugging", null },
+            { "new-patient", 'n', 0, OptionArg.NONE, ref new_patient, "Create a new patient", null },
+            { "calendar", 'c', 0, OptionArg.NONE, ref open_calendar, "Open the calendar window", null },
+            { null }
+        };
+        
+        public Application (string [] args) {
+            GLib.Object (application_id: "org.phcteam.clinica", 
+                         flags: ApplicationFlags.HANDLES_COMMAND_LINE);
+            
+            /* Connect the activate signal to the startup function */
+            this.activate.connect (do_activate);
+            this.command_line.connect (on_command_line);
+        }
+        
+        private void new_window () {
+            /* Start interface and connect error signal */
+            user_interface = new UserInterface (resource_manager);
+            
+            /* Actually start the application */
+            user_interface.start ();
+            
+            /* Add the Window to the ones managed by this application */
+            add_window (user_interface.window);
+        }
+        
+        private void on_bus_activation (DBusConnection conn) {
+            connection = conn;
+            try {
+                conn.register_object (Config.RESOURCE_BASE + "data", 
+                                       service);              
+            } catch (IOError err) {
+                debug ("Error while registering /org/phcteam/clinica/data");
+            }
+        }
+                
+        private int on_command_line (ApplicationCommandLine command_line) {
+            debug ("Parsing command line arguments");
+            
+            /* Set defaults */
+            daemon_mode = false;
+            version = false;
+        
+			/* Get an unowned pointer to the command line arguments to make
+			 * OptionContext happy */
+		    string [] args = command_line.get_arguments ();
+			unowned string [] args_ptr = args;
+			
+			program_name = args[0];
+            
+            /* Parse options */
+            try {
+                OptionContext opt_context = new OptionContext ("- medical records manager");
+                opt_context.set_help_enabled (true);
+                opt_context.add_main_entries (option_entries, "clinica");
+				opt_context.parse (ref args_ptr); 
+            } catch (OptionError e) {
+                command_line.printerr (_("Option parsing failed: %s\n").printf (e.message));
+            }
+            
+            // If clinica is launched with a --debug switch than enable the debugging
+            // handler. 
+            if (logging_enabled) {
+                Log.set_default_handler ((domains, level, message) => {
+                    string color_format;
+                    string level_name;                    
+                    level_name = level.to_string ();
+                    if (level_name == null) {
+                        print ("%s\n", message);
+                        return;
+                     }
+                     if ("G_LOG_LEVEL_" in level_name)
+                        level_name = level_name.replace ("G_LOG_LEVEL_", "");
+                    switch (level) {
+                        case LogLevelFlags.LEVEL_INFO:
+                            color_format = "34";
+                            break;
+                        case LogLevelFlags.LEVEL_DEBUG:
+                            color_format = "32";
+                            break;
+                        case LogLevelFlags.LEVEL_WARNING:
+                            color_format = "33";
+                            break;
+                        default:
+                            color_format = "31";
+                            break;
+                    }
+                    print ("[\033[%s;1m%s\033[0m] %s\n", color_format, level_name, message);
+                });
+            }
+            
+            if (version) {
+                command_line.print(_("Clinica %s\n").printf (Config.PACKAGE_VERSION));
+				return 0;
+            }
+            
+			/* If we got there we need to activate Clinica */
+			activate ();
+			return 0;
+        }
+        
+        internal void start_dbus () {
+            if (service != null)
+                return;
+                
+            debug ("Activating ClinicaService on DBus");
+            resource_manager.application.hold ();
+            service = new Service (resource_manager);
+            /* Launch the DBus service used by clinica */
+            Bus.own_name (BusType.SESSION, "org.phcteam.clinica", 
+                BusNameOwnerFlags.NONE, 
+                on_bus_activation, () => {},
+                () => debug ("Could not acquire bus"));
+        }
+        
+        internal void show_visits (Patient p) {
+            if (user_interface == null) {
+                new_window ();
+                user_interface.start ();
+            }
+            
+            user_interface.show_visit_window (p);
+        }
+        
+        internal void show_user_interface () {
+            if (user_interface != null) {
+                user_interface.show_main_window ();
+                user_interface.window.present ();
+                return;
+            }
+            else
+                new_window ();
+                
+            user_interface.show_main_window ();
+        }
+        
+        public void do_activate () {
+            bool cold_start = false;
+            if (resource_manager == null) {
+                cold_start = true;
+                
+                /* Init resource manager and connect error function
+                 * to a message display for the user */
+                resource_manager = new ResourceManager (this, program_name, Utils.show_error_message);
+                
+                /* Init gettext translation system */
+                Intl.textdomain("clinica");
+                
+                /* Check where are the translations. At the moment being we are sure that Italian
+                 * translations are present, so check for them in the /usr/share/locale/ directory.
+                 * If they are not present there, type with /usr/local, and if not present there, 
+                 * try with autodetection. */
+                if (FileUtils.test("/usr/share/locale/it/LC_MESSAGES/clinica.mo", FileTest.IS_REGULAR))
+	                Intl.bindtextdomain("clinica", "/usr/share/locale");
+	            else if (FileUtils.test("/usr/local/share/locale/it/LC_MESSAGES/clinica.mo", FileTest.IS_REGULAR))
+	            	Intl.bindtextdomain("clinica", "/usr/local/share/locale");
+	            else
+	            	Intl.bindtextdomain("clinica", null);
+
+              debug ("Starting the DBus Clinica Service");
+	          start_dbus ();
+            }
+            
+            /* If daemon mode is not enable show the main user interface */
+            if (!daemon_mode) {
+                debug ("Showing Clinica user interface");
+                show_user_interface ();
+            }
+            else {
+                resource_manager.persistency_required = true;
+            }
+            
+            /* If the user asks for the calendar window open it */
+            if (open_calendar) {
+                debug ("Opening calendar window");
+                user_interface.show_calendar_window ();
+                open_calendar = false;
+            }
+
+            /* If the user asked for a new Patient display the dialog to create one */
+            if (new_patient) {
+                var patient_editor = new PatientEditor (resource_manager);
+                patient_editor.run ();
+                patient_editor.destroy ();
+                new_patient = false;
+            }
+        }
+    }
+ }
diff --git a/libclinica/AuthDomain.vala b/libclinica/AuthDomain.vala
new file mode 100644
index 0000000..adc1a23
--- /dev/null
+++ b/libclinica/AuthDomain.vala
@@ -0,0 +1,49 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+ 
+using Soup;
+
+namespace Clinica {
+
+    public class AuthDomain : AuthDomainBasic {
+    
+        private ResourceManager resource_manager { get; private set; }
+    
+        public AuthDomain (ResourceManager resources) {
+            Object (realm: "Clinica RPC");
+            resource_manager = resources;
+            
+            // We need to authenticate the RPC part of the server, 
+            // while the rest should be publicy available. 
+            add_path ("/rpc");
+            
+            // Set the authentication method
+            set ("auth_callback", perform_authentication);
+        }
+        
+        public bool perform_authentication (Soup.Message msg, string username, string password) {
+            return (
+                username == resource_manager.settings.get_string ("data-server-username") &&
+                Checksum.compute_for_string (ChecksumType.SHA1, password) == 
+                    resource_manager.settings.get_string ("data-server-password"));
+        }
+    
+    }
+
+}
diff --git a/libclinica/AuthenticationDialog.vala b/libclinica/AuthenticationDialog.vala
new file mode 100644
index 0000000..5a66152
--- /dev/null
+++ b/libclinica/AuthenticationDialog.vala
@@ -0,0 +1,55 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+ 
+using Gtk;
+ 
+namespace Clinica {
+
+    public class AuthenticationDialog : Dialog {
+    
+        private ResourceManager resource_manager;
+        
+        private Builder builder;
+    
+        public AuthenticationDialog (ResourceManager resources) {
+            resource_manager = resources;
+            
+            add_buttons (Stock.CANCEL, ResponseType.CANCEL,
+                         Stock.OK, ResponseType.OK);
+            set_default_response (Gtk.ResponseType.OK);
+                         
+            builder = new Builder.with_filename (resource_manager, "authentication_dialog.glade");
+            builder.load_into_dialog (this);
+            
+            set_title (_("Authentication required"));
+        }
+        
+        public string get_username () {
+            var username_entry = builder.get_object ("username_entry") as Entry;
+            return username_entry.get_text ();
+        }
+        
+        public string get_password () {
+            var password_entry = builder.get_object ("password_entry") as Entry;
+            return password_entry.get_text ();
+        }
+    
+    }
+
+}
diff --git a/libclinica/BackupEngine.vala b/libclinica/BackupEngine.vala
new file mode 100644
index 0000000..00aa7bd
--- /dev/null
+++ b/libclinica/BackupEngine.vala
@@ -0,0 +1,392 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+ 
+using Jansson;
+ 
+namespace Clinica {
+
+    public class BackupEngine : Object {
+    
+        private ResourceManager resource_manager;
+        
+        private WaitDialog wait_dialog;
+    
+        public BackupEngine (ResourceManager resources) {
+            resource_manager = resources;
+        }
+        
+        /**
+         * @brief Backup the data contained in the given DataProvider
+         * to the file specified in destination. 
+         */
+        public void backup (DataProvider provider, string destination) {
+        
+            var file_store = provider.get_file_store ();
+            if (file_store != null) {
+                // That means that we have to backup the files, too.        
+                DirUtils.create (Path.build_filename (destination, "file_store"), -1);
+
+                foreach (var visit in provider.visits ()) {
+                    GLib.List<FileObject> visit_files = file_store.get_files (visit.id);
+                    if (visit_files.length () > 0) {
+                        string base_dir = Path.build_filename (destination, "file_store",
+                            visit.id.to_string ());
+                        DirUtils.create (base_dir, -1);
+                        foreach (var file in visit_files) {
+                            File source_file = file.get_file ();
+                            try {
+                                source_file.copy (
+                                    File.new_for_path (Path.build_filename (base_dir, file.get_file_name ())),
+                                    FileCopyFlags.NONE);
+                            } catch (GLib.Error e) {
+                                warning ("Error while copying %s", Path.build_filename (base_dir, file.get_file_name ()));
+                            }
+                        }
+                    }
+                }
+            }
+
+            var root = Json.object ();
+            
+            // Store the date of the Json backup. 
+            root.object_set ("date", 
+                Json.string (SqliteDataProvider.datetime_to_string (new DateTime.now_utc ())));
+            
+            // Create a Json Array containing all the doctors
+            var doctors = Json.array ();
+            foreach (var doc in provider.doctors ()) {
+                doctors.array_append (doc.to_json ());
+            }
+            root.object_set ("doctors", doctors);
+            
+            // Create a Json array containing all the patients
+            var patients = Json.array ();
+            foreach (var patient in provider.patients ()) {
+                patients.array_append (patient.to_json ());
+            }
+            root.object_set ("patients", patients);
+            
+            // Create a Json array containing all the visits
+            var visits = Json.array ();
+            foreach (var visit in provider.visits ()) {
+                visits.array_append (visit.to_json ());
+            }
+            root.object_set ("visits", visits);
+            
+            // Create a Json array containing all the visits
+            var events = Json.array ();
+            foreach (var event in provider.events ()) {
+                events.array_append (event.to_json ());
+            }
+            root.object_set ("events", events);
+            
+            // Finally dump the resulting file to destination
+            root.dump_file (Path.build_filename (destination, "backup.json"));
+            
+            // Backup medicines.db, if present
+            string medicines_path = Path.build_filename (resource_manager.get_data_path (), 
+                "medicines.db");
+            File medicines_db = File.new_for_path (medicines_path);
+            if (medicines_db.query_exists ()) {
+                debug ("Copying the database of local medicines");
+                try {
+                    medicines_db.copy (File.new_for_path (Path.build_filename (destination, 
+                        "medicines.db")), FileCopyFlags.NONE);
+                } catch (GLib.Error e) {
+                    warning ("Error while copying the medicines.db file");
+                }
+            }
+        }
+        
+        /**
+         * @brief Import the data from an older backup. 
+         * @param filename The filename of the backup that shall be imported. 
+         */
+        public async void import (string directory) {
+            if (directory == null) {
+                var dialog = new Gtk.MessageDialog (resource_manager.user_interface.window, 
+                    Gtk.DialogFlags.MODAL, 
+                    Gtk.MessageType.ERROR,
+                    Gtk.ButtonsType.OK,
+                    "%s", _("Please select a valid backup file"));
+                dialog.run ();
+                dialog.destroy ();
+                return;
+            }
+            
+            string details = "Details of the operation:\n\n";
+            
+            var filename = Path.build_filename (directory, "backup.json");
+        
+            debug ("Importing the data contained in %s", filename);
+		        
+            wait_dialog = new WaitDialog (resource_manager, _("Importing data"));
+	        wait_dialog.set_message (_("Please wait while Clinica imports the data..."));
+	        wait_dialog.show_all ();
+	   
+	        wait_dialog.set_message (_("Importing the JSON data.."));
+            
+            // Grab the provider from the resource_manager
+            var provider = resource_manager.data_provider;
+            
+            Jansson.Error error;
+            var data = Json.load_file (filename, 0, out error);            
+            if (data == null || !data.is_object ()) {
+                warning (_("Error while parsing the backup JSON data"));
+                
+                var dialog = new Gtk.MessageDialog (resource_manager.user_interface.window, 
+                    Gtk.DialogFlags.MODAL, 
+                    Gtk.MessageType.ERROR,
+                    Gtk.ButtonsType.OK,
+                    "%s", _("An error occurred while parsing the JSON file"));
+                dialog.run ();
+                dialog.destroy ();
+                wait_dialog.destroy ();
+                return;
+            }
+            
+            // Load the data from the JSON input
+            Json doctors = data.object_get ("doctors");
+            Json patients = data.object_get ("patients");
+            Json visits = data.object_get ("visits");
+            Json events = data.object_get ("events");
+            
+            int64 total_steps = doctors.array_size () + patients.array_size () + 
+                visits.array_size () + events.array_size ();
+                
+            int64 steps_done = 0;
+            
+            // Dome some basic checks about data consistency before dropping
+            // all the entries in the database. 
+            if (!doctors.is_array () || !patients.is_array () || 
+                !visits.is_array () || !events.is_array ()) {
+                warning (_("The doctors, patients, visits and events field in the JSON backup should be arrays, aborting."));
+                var dialog = new Gtk.MessageDialog (resource_manager.user_interface.window, 
+                    Gtk.DialogFlags.MODAL, 
+                    Gtk.MessageType.ERROR,
+                    Gtk.ButtonsType.OK,
+                    "%s", _("An error occurred while parsing the JSON file"));
+                dialog.run ();
+                dialog.destroy ();
+                wait_dialog.destroy ();
+                return;
+            }
+
+            var doctor_id_mapping = new HashTable<int64?, int64?> 
+                (GLib.int64_hash, GLib.int64_equal);
+            var patient_id_mapping = new HashTable<int64?, int64?>
+                (GLib.int64_hash, GLib.int64_equal); 
+            var visit_id_mapping = new HashTable<int64?, int64?>
+                (GLib.int64_hash, GLib.int64_equal);
+            var event_id_mapping = new HashTable<int64?, int64?>
+                (GLib.int64_hash, GLib.int64_equal);
+            
+            // Clear the database and put the data back in it
+            // in such a way that won't break relationships. 
+            wait_dialog.set_message (_("Clearing the old data in the database..."));
+            clear_data();
+            
+            int i = 0;
+            wait_dialog.set_message (_("Loading doctors..."));
+            for (i = 0; i < doctors.array_size (); i++) {
+                var doctor = new Doctor.from_json (doctors.array_get (i));
+                int64 previous_id = doctor.id;
+                doctor.id = 0;
+                doctor_id_mapping[previous_id] = provider.save_doctor (doctor);
+                wait_dialog.set_progress ((1.0 * steps_done++) / total_steps);
+            }
+            
+            details += _("- %d doctors have been imported\n").printf (doctors.array_size ());
+            
+            wait_dialog.set_message (_("Loading patients..."));
+            for (i = 0; i < patients.array_size (); i++) {
+                var patient_json = patients.array_get (i);
+                var patient = new Patient.from_json (patient_json);
+                int64 previous_id = patient.id;
+                patient.id = 0;
+                int64 doctor_id = patient_json.object_get ("doctor").integer_value ();
+                if (doctor_id != 0)
+                    patient.doctor = provider.get_doctor (doctor_id_mapping[doctor_id]);
+                patient_id_mapping[previous_id] = provider.save_patient (patient);
+                wait_dialog.set_progress ((1.0 * steps_done++) / total_steps);
+            }
+            
+            details += _("- %d patients have been imported\n").printf (patients.array_size ());
+            
+            wait_dialog.set_message (_("Loading visits..."));
+            for (i = 0; i < visits.array_size (); i++) {
+                var visit_json = visits.array_get (i);
+                var visit = new Visit.from_json (visit_json);
+                int64 previous_id = visit.id;
+                visit.id = 0;
+                int64 patient_id = visit_json.object_get ("patient").integer_value ();
+                if (patient_id != 0)
+                    visit.patient = provider.get_patient (patient_id_mapping[patient_id]);
+                visit_id_mapping[previous_id] = provider.save_visit (visit);
+                wait_dialog.set_progress ((1.0 * steps_done++) / total_steps);
+            }
+            
+            details += _("- %d visits have been imported\n").printf (visits.array_size ());
+            
+            wait_dialog.set_message (_("Loading events..."));
+            for (i = 0; i < events.array_size (); i++) {
+                var event_json = events.array_get (i);
+                var event = new Event.from_json (event_json);
+                int64 previous_id = event.id;
+                event.id = 0;
+                int64 visit_id = event_json.object_get ("visit").integer_value ();
+                int64 patient_id = event_json.object_get ("patient").integer_value ();
+                if (visit_id != 0)
+                    event.visit = provider.get_visit (visit_id_mapping[visit_id]);
+                if (patient_id != 0)
+                    event.patient = provider.get_patient(patient_id_mapping[patient_id]);
+                event_id_mapping[previous_id] = provider.save_event (event);
+                wait_dialog.set_progress ((1.0 * steps_done++) / total_steps);
+            }
+            
+            details += _("- %d events have been imported\n").printf (events.array_size ());
+            
+            // Now import the data in the filestore, if present
+            var store_path = Path.build_filename (directory, "file_store");
+            int counter = 0;
+            if (FileUtils.test (store_path, FileTest.EXISTS | FileTest.IS_DIR)) {
+                debug ("Import the file store");
+                var store = resource_manager.data_provider.get_file_store ();
+                if (store == null) {
+                    details += _("- A FileStore was found but is not available in the current provider\n");
+                }
+                else {
+                    try {
+                        var store_dir = Dir.open (store_path);
+                        string visit_dir;
+                        while ((visit_dir = store_dir.read_name ()) != null) {
+                            int64 visit_id = int64.parse (visit_dir);
+                            int64 real_id = visit_id_mapping[visit_id];
+                            
+                            try {
+                                var v_dir = Dir.open (Path.build_filename (store_path, visit_dir));
+                                string v_filename;
+                                while ((v_filename = v_dir.read_name ()) != null) {
+                                    store.store_file (real_id, Path.build_filename (store_path, visit_dir, v_filename));
+                                    counter++;
+                                }
+                            } catch (GLib.Error e) {
+                                warning ("Error while opening %s", Path.build_filename (store_path, visit_dir));
+                            }
+                        }
+                    } catch (GLib.Error e) {
+                        warning ("Error while opening %s", store_path);
+                    }
+                    
+                    details += _("- %d files have been imported\n").printf (counter);
+                }
+            }
+            else {
+                details += _("- No FileStore was found in the backup\n");
+            }
+            
+            // Try to import the Medicines database, if found
+            var medicines_db_path = Path.build_filename (directory, "medicines.db");
+            var medicines_db = File.new_for_path (medicines_db_path);
+            if (medicines_db.query_exists ()) {
+                try {
+                    var destination = File.new_for_path (Path.build_filename (
+                        resource_manager.get_data_path (), "medicines.db"));
+                    if (destination.query_exists ()) {
+                        destination.delete ();
+                    }
+                    medicines_db.copy (destination, FileCopyFlags.NONE);
+                    
+                    resource_manager.unregister_medicine_search_engine (resource_manager.local_medicines_search_engine);
+                    resource_manager.local_medicines_search_engine = new LocalMedicinesDatabase (resource_manager);
+                    resource_manager.register_medicine_search_engine (resource_manager.local_medicines_search_engine);
+                    
+                } catch (GLib.Error e) {
+                    warning ("Error copying the medicines database: %s", e.message);
+                    details += _("- Error while copying the medicines database\n");
+                }
+            }            
+            
+            debug ("Importing finished successfully");
+            
+            wait_dialog.destroy ();
+            
+            var dialog = new Gtk.MessageDialog (resource_manager.user_interface.window, Gtk.DialogFlags.DESTROY_WITH_PARENT,
+                Gtk.MessageType.INFO,
+                Gtk.ButtonsType.OK,
+                "%s", _("The import of the data has been completed successfully"));
+            dialog.set_title ("Import finished");
+            dialog.format_secondary_text (details);
+            dialog.run ();
+            dialog.destroy ();
+        }
+        
+        /**
+         * @brief Destroy all the data in the current data provider. This is needed
+         * before inflating the data from the backup into the database, so conflicts
+         * won't be possible. 
+         *
+         * A more advanced merge strategy could be added in the future. 
+         */
+        private void clear_data () {
+            debug ("Clearing all the data in the DataProvider");
+            DataProvider provider = resource_manager.data_provider;
+               
+            // Remove data in the FileStore, if present
+            var store = provider.get_file_store ();
+            if (store != null) {
+                foreach (var visit in provider.visits ()) {
+                    foreach (var file in store.get_files (visit.id)) {
+                        store.remove_file (visit.id, file.get_file_name ());
+                    }
+                }
+            }
+            
+            // Remove Events
+            List<Event> events = new List<Event> ();
+            foreach (var event in provider.events ())
+                events.append (event);
+            foreach (var event in events)
+                provider.remove_event (event);
+                
+            // Remove Visits
+            List<Visit> visits = new List<Visit> ();
+            foreach (var visit in provider.visits ())
+                visits.append (visit);
+            foreach (var visit in visits)
+                provider.remove_visit (visit);
+                
+            // Remove Patients
+            List<Patient> patients = new List<Patient> ();
+            foreach (var patient in provider.patients ())
+                patients.append (patient);
+            foreach (var patient in patients)
+                provider.remove_patient (patient);
+                
+            // Remove Doctors
+            List<Doctor> doctors = new List<Doctor> ();
+            foreach (var doctor in provider.doctors ())
+                doctors.append (doctor);
+            foreach (var doctor in doctors)
+                provider.remove_doctor (doctor);
+        }
+    
+    }
+
+}
diff --git a/libclinica/PatientDetail.vala b/libclinica/Buildable.vala
similarity index 71%
copy from libclinica/PatientDetail.vala
copy to libclinica/Buildable.vala
index 3139b0f..9363f65 100644
--- a/libclinica/PatientDetail.vala
+++ b/libclinica/Buildable.vala
@@ -15,24 +15,18 @@
  *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
  *
  *   Authors: Leonardo Robol <leo at robol.it>
- *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
  */
-
-using Gtk;
-
+ 
 namespace Clinica {
 
-	public class PatientDetail : VBox {
-	
-		private Patient patient;
-	
-		public PatientDetail(Patient p) {
-			/* Initial setup */
-			GLib.Object(homogeneous: false);
-			patient = p;
-			
-			pack_start (new Label("boh"));
-		}
-	}
+    public interface Buildable : GLib.Object {
+    
+        /**
+         * @brief Functon that must setup the internal data of the
+         * widget attaching to Clinica resources where appropriate.
+         */
+        public abstract void setup (ResourceManager resource_manager);
+    
+    }
 
 }
diff --git a/libclinica/Builder.vala b/libclinica/Builder.vala
new file mode 100644
index 0000000..0224075
--- /dev/null
+++ b/libclinica/Builder.vala
@@ -0,0 +1,74 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+ 
+ using Gtk;
+ 
+ namespace Clinica {
+ 
+    /**
+     * @brief Clinica version of the GtkBuilder that handles all sort 
+     * of setup needed by Clinica* objects.
+     */
+    public class Builder : Gtk.Builder {
+    
+        private ResourceManager resource_manager;
+        
+        public signal void error (string message);
+        
+        public Builder (ResourceManager resources) {
+            resource_manager = resources;
+            error.connect ((t,l) => resource_manager.error_callback (t,l));
+        }
+        
+        public Builder.with_filename (ResourceManager resources, string filename) {
+            this (resources);
+            
+            try {
+                add_from_resource (filename);
+            } catch (GLib.Error e) {
+                error (_("Failed to load UI file: %s. Please check your installation.\n%s").printf (filename, e.message));
+            }
+        }
+        
+        public new void add_from_resource (string filename) throws GLib.Error {
+            base.add_from_resource (Config.RESOURCE_BASE + "ui/" + filename);
+            
+            /* Sort of a brute heuristic, but I think it works */
+            foreach (Object obj in get_objects ()) {
+                Type type = obj.get_type ();
+                if ("Clinica" in type.name ()) {
+                    debug ("Calling setup on %s".printf (type.name ()));
+                    (obj as Clinica.Buildable).setup (resource_manager);
+                }
+            }
+        }
+        
+        public void load_into_window (Window window) {
+            window.add (get_object ("content_area") as Widget);
+        }
+        
+        /**
+         * @brief Load the Widget named content_area into the given Dialog.
+         */
+        public void load_into_dialog (Dialog dialog) {
+            (dialog.get_content_area ()).add (get_object ("content_area") as Widget);
+        }
+    }
+ 
+ }
diff --git a/libclinica/CMakeLists.txt b/libclinica/CMakeLists.txt
new file mode 100644
index 0000000..9c3f997
--- /dev/null
+++ b/libclinica/CMakeLists.txt
@@ -0,0 +1,169 @@
+set(LIBCLINICA_SRC
+    AboutDialog.vala
+    Application.vala
+    AuthDomain.vala
+    AuthenticationDialog.vala
+    BackupEngine.vala
+    Buildable.vala
+    Builder.vala
+    CalendarEventList.vala
+    CalendarHeader.vala
+    CalendarToolbar.vala
+    Calendar.vala
+    CalendarView.vala
+    CalendarWindow.vala
+    CoreActivatable.vala
+    DataProvider.vala
+    DataServer.vala
+    DateHandler.vala
+    DateSwitcher.vala
+    DateTimePicker.vala
+    Day.vala
+    DoctorContextMenu.vala
+    DoctorEditor.vala
+    DoctorFilteredStore.vala
+    DoctorListPage.vala
+    DoctorListStore.vala
+    DoctorListView.vala
+    Doctor.vala
+    EmptyVisitIterator.vala
+    EventDetail.vala
+    EventEditor.vala
+    EventIterator.vala
+    EventListStore.vala
+    Event.vala
+    FileDetail.vala
+    FileObject.vala
+    FileStore.vala
+    FindEntry.vala
+    ImportDialog.vala
+    LocalFileStore.vala
+    LocalMedicinesDatabase.vala
+    MedicineBrowserDialog.vala
+    MedicineDetailDialog.vala
+    MedicineEditor.vala
+    MedicineSearchEngine.vala
+    MedicineSearchPage.vala
+    MedicineTreeView.vala
+    Medicine.vala
+    NetworkedDataProvider.vala
+    Page.vala
+    PatientContextMenu.vala
+    PatientDetail.vala
+    PatientEditorActivatable.vala
+    PatientEditor.vala
+    PatientEntry.vala
+    PatientFilteredStore.vala
+    PatientListPage.vala
+    PatientListStore.vala
+    PatientListView.vala
+    Patient.vala
+    ResourceManager.vala
+    Service.vala
+    SettingsManager.vala
+    Settings.vala
+    Sidebar.vala
+    SidebarCalendarEntry.vala
+    SidebarEntry.vala
+    SidebarPageEntry.vala
+    SqliteDataProvider.vala
+    SqliteDoctorIterator.vala
+    SqlitePatientIterator.vala
+    SqliteVisitIterator.vala
+    StartPage.vala
+    Toolbar.vala
+    ToolbarItem.vala
+    UIManager.vala
+    UserInterfaceActivatable.vala
+    UserInterface.vala
+    Utils.vala
+    VisitActions.vala
+    VisitBrowser.vala
+    VisitDetail.vala
+    VisitFileManager.vala
+    VisitListStore.vala
+    VisitPage.vala
+    VisitPrinter.vala
+    VisitSchedulerDialog.vala
+    VisitTab.vala
+    VisitToolbar.vala
+    Visit.vala
+    WaitDialog.vala
+)
+
+IF (NOT DISABLE_PLUGINS)
+  set (LIBCLINICA_PLUGINS_SRC
+      PluginEngine.vala
+      PluginManager.vala
+  )
+
+  set (LIBCLINICA_PLUGINS_SRC_C
+      CoreActivatableExtensionSet.c
+      PatientEditorExtensionSet.c
+      UserInterfaceExtensionSet.c
+  )
+ENDIF (NOT DISABLE_PLUGINS)
+
+set(LIBCLINICA_PACKAGES
+	${CLINICA_USED_PACKAGES}
+)
+
+# Libclinica building steps
+set (CFLAGS
+	${DEPS_CFLAGS}
+	${DEPS_CFLAGS_OTHER}
+)
+
+vala_precompile (LIBCLINICA_C libclinica-vala
+	${LIBCLINICA_SRC}
+        ${LIBCLINICA_PLUGINS_SRC}
+PACKAGES
+	${LIBCLINICA_PACKAGES}
+GENERATE_VAPI
+	clinica
+GENERATE_HEADER
+    clinica
+OPTIONS
+	${CLINICA_VALAFLAGS}
+	--thread
+	--gir=Clinica-0.3.gir
+	--library=Clinica-0.3
+)
+
+add_custom_command (
+	OUTPUT Resources.c
+	COMMAND ${GLIB_COMPILE_RESOURCES} --generate --target Resources.c ${CMAKE_SOURCE_DIR}/data/clinica.gresource.xml --sourcedir ${CMAKE_SOURCE_DIR}/data/resources
+)
+
+add_definitions (${CLINICA_USED_CFLAGS})
+add_library(clinica SHARED ${LIBCLINICA_C} ${LIBCLINICA_PLUGINS_SRC_C} Resources.c)
+set_target_properties (clinica
+	PROPERTIES
+	VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}"
+	SOVERSION "${MAJOR_VERSION}"
+)
+target_link_libraries(clinica ${CLINICA_USED_LIBRARIES})
+
+add_custom_command (
+	OUTPUT Clinica-0.3.typelib
+	COMMAND ${G_IR_COMPILER} --shared-library libclinica.so --output Clinica-0.3.typelib Clinica-0.3.gir
+	DEPENDS clinica
+)
+add_custom_target (clinica-gir ALL DEPENDS Clinica-0.3.typelib)
+
+install (FILES ${CMAKE_BINARY_DIR}/libclinica/Clinica-0.3.gir
+	DESTINATION share/gir-1.0
+)
+
+install (FILES ${CMAKE_BINARY_DIR}/libclinica/Clinica-0.3.typelib
+	DESTINATION lib/girepository-1.0
+)
+
+install (TARGETS clinica
+	LIBRARY DESTINATION lib
+	RUNTIME DESTINATION bin
+	ARCHIVE DESTINATION lib)
+
+install (FILES ${CMAKE_BINARY_DIR}/libclinica/clinica.h
+	DESTINATION include
+)
diff --git a/libclinica/Calendar.vala b/libclinica/Calendar.vala
index f719abe..c50bb48 100644
--- a/libclinica/Calendar.vala
+++ b/libclinica/Calendar.vala
@@ -21,7 +21,7 @@
 
 namespace Clinica {
 
-	public class Calendar : Gtk.Table {
+	public class Calendar : Gtk.Grid {
 	
 		public DateHandler handler { get; private set; }
 		private CalendarView calendar_view;
@@ -43,11 +43,11 @@ namespace Clinica {
 			handler = new DateHandler ();
 		
 			/* Gtk.Table properties */
-			n_rows = 6;
-			n_columns = 7;
+			int n_rows = 6;
+			int n_columns = 7;
 			column_spacing = 0;
 			row_spacing = 0;
-			homogeneous = true;
+			row_homogeneous = column_homogeneous = true;
 			
 			// Initialize days
 			days = new Day[n_rows * n_columns];
@@ -55,9 +55,8 @@ namespace Clinica {
 				for (int col = 0; col < n_columns; col++) {
 					var day = new Day (calendar_view);
 					days[row * n_columns + col] = day;
-					attach_defaults (day, col, col + 1, row, row + 1);
+					attach (day, col, row, 1, 1);
 				}
-			update_month ();
 			
 			/* Signals and handlers */
 			handler.changed.connect (update_month);
@@ -85,10 +84,12 @@ namespace Clinica {
 				return false;
 			});
 			
-			resource_manager.event_list_store.event_added.connect (on_event_added);
-			resource_manager.event_list_store.event_removed.connect (on_event_removed);
-			resource_manager.visit_list_store.visit_added.connect (on_visit_added);
-			resource_manager.visit_list_store.visit_removed.connect (on_visit_removed);
+			resource_manager.data_provider.event_added.connect (on_event_added);
+			resource_manager.data_provider.event_changed.connect (on_event_changed);
+			resource_manager.data_provider.event_removed.connect (on_event_removed);
+			resource_manager.data_provider.visit_added.connect (on_visit_added);
+			resource_manager.data_provider.visit_changed.connect (on_visit_changed);
+			resource_manager.data_provider.visit_removed.connect (on_visit_removed);
 			realize.connect (() => set_date (today));
 		}
 		
@@ -104,40 +105,25 @@ namespace Clinica {
 		}
 		
 		internal void update_month () {
-			var today = new DateTime.now_local ();
+		
 			int month = handler.current_month;
 			int year = handler.current_year;
 			
-			var date = new DateTime.local (year, month, 1, 0, 0, 0).add_days (-days_to_prepend);
-			
 			foreach (var day in days) {
-				/* Fill events of the day */
+				/* Clear events of the day */
 			    day.reset_events ();
-			    foreach (var visit in Visit.for_day (resource_manager, date, false)) {
-			        /* Display visits in the day */
-			        day.add_visit (visit);
-			    }
-			    foreach (var event in Event.for_day (resource_manager, date, false)) {
-			        day.add_event (event);
-			    }
-			
-				if (date.get_day_of_year () == today.get_day_of_year () && date.get_year () == today.get_year ()) {
-					day.name = "today";
-					day.can_focus = true;
-					day.sensitive = true;
-				} else if (date.get_month () != month) {
-					day.name = null;
-					day.can_focus = false;
-					day.sensitive = false;
-				} else {
-					day.name = null;
-					day.can_focus = true;
-					day.sensitive = true;
-				}
-				
-				day.date = date;
-				date = date.add_days (1);
 			}
+			
+      		var date = new DateTime.local (year, month, 1, 0, 0, 0).add_days (-days_to_prepend);
+			
+    	    foreach (var visit in resource_manager.data_provider.visits (null, date, date.add_days (42))) {
+			        /* Display visits in the day */
+			        days[visit.date.difference (date) / 86400000000].add_visit (visit);
+		    }
+       	    foreach (var event in resource_manager.data_provider.events (date, date.add_days (42))) {
+			        /* Display visits in the day */
+			        days[event.date.difference (date) / 86400000000].add_event (event);
+		    }
 		}
 		
 		private int date_to_index (int day_of_month) {
@@ -158,15 +144,23 @@ namespace Clinica {
 		 * It should find the day of the event, if present in the view, and 
 		 * insert the events in it.
 		 */
-		private void on_event_added (int event_id) {
+		private void on_event_added (int64 event_id) {
+		    update_month ();
+		}
+		
+		private void on_event_changed (int64 event_id) {
+		    update_month ();
+		}
+		
+		private void on_visit_added (int64 visit_id) {
 		    update_month ();
 		}
 		
-		private void on_visit_added (int visit_id) {
+		private void on_visit_removed (int64 visit_id) {
 		    update_month ();
 		}
 		
-		private void on_visit_removed (int visit_id) {
+		private void on_visit_changed (int64 visit_id) {
 		    update_month ();
 		}
 		
@@ -176,7 +170,7 @@ namespace Clinica {
 		 * It should find the day that contained the event and remove it from the
 		 * view. 
 		 */
-		private void on_event_removed (int event_id) {
+		private void on_event_removed (int64 event_id) {
 		    update_month ();
 		}
 		
diff --git a/libclinica/CalendarEventList.vala b/libclinica/CalendarEventList.vala
index 681e997..30c10c9 100644
--- a/libclinica/CalendarEventList.vala
+++ b/libclinica/CalendarEventList.vala
@@ -42,13 +42,15 @@
             /* Set the day to today */
             set_day (new DateTime.now_local());
             
-            set_size_request (250, -1);
+            set_size_request (280, -1);
             
             /* Connect event added and or removed with the reload of the day */
-            resource_manager.event_list_store.event_added.connect ((event) => set_day (this.day));
-            resource_manager.event_list_store.event_removed.connect ((event) => set_day (this.day));
-            resource_manager.visit_list_store.visit_added.connect ((visit) => set_day (this.day));
-            resource_manager.visit_list_store.visit_removed.connect ((visit) => set_day (this.day));
+            resource_manager.data_provider.event_added.connect ((event) => set_day (this.day));
+            resource_manager.data_provider.event_changed.connect ((event) => set_day (this.day));
+            resource_manager.data_provider.event_removed.connect ((event) => set_day (this.day));
+            resource_manager.data_provider.visit_added.connect ((visit) => set_day (this.day));
+            resource_manager.data_provider.visit_changed.connect ((visit) => set_day (this.day));
+            resource_manager.data_provider.visit_removed.connect ((visit) => set_day (this.day));
         }
         
         public void set_day (DateTime date) {
@@ -56,7 +58,8 @@
             day = date;
         
             /* Create the VBox that will hold the data */
-            var box = new VBox (false, resource_manager.PADDING);
+            var box = new Box (Gtk.Orientation.VERTICAL,
+                               resource_manager.PADDING);
             
             /* Place the title in there */
             string title = "<small>%s</small>".printf (Utils.capitalize (day.format("%A, %d %B %Y")));
@@ -75,7 +78,7 @@
             
             /* Show all the events of the day */
             bool no_events = true;
-            foreach (Event event in Event.for_day (resource_manager, date)) {
+            foreach (Event event in resource_manager.data_provider.events (date, date.add_days (1))) {
                 no_events = false;
                 var event_box = new EventDetail (resource_manager, event);
                 box.pack_start (event_box, false, true);
@@ -92,7 +95,15 @@
                 box.pack_start (no_event_label, false, true);
             }
             
-            string visit_title = "<big><b>" + _("Visits performed") + "</b></big>";
+            /* Select the visit title in a different mode if we are in the future or in the past. */
+            string visit_title;
+            DateTime today = new DateTime.now_local ();
+            
+            if (day.compare (today) <= 0)
+                visit_title = "<big><b>" + _("Visits performed") + "</b></big>";
+            else
+                visit_title = "<big><b>" + _("Visits scheduled") + "</b></big>";
+                
             var visit_title_label = new Label ("");
             visit_title_label.set_markup (visit_title);
             visit_title_label.set_margin_top (15);
@@ -101,7 +112,7 @@
             
             /* And now the visits of the day */
             bool no_visits = true;
-            foreach (Visit visit in Visit.for_day (resource_manager, date)) {
+            foreach (Visit visit in resource_manager.data_provider.visits (null, date, date.add_days(1))) {
                 no_visits = false;
                 var visit_detail = new VisitDetail (resource_manager, visit);
                 box.pack_start (visit_detail, false, true);
diff --git a/libclinica/CalendarHeader.vala b/libclinica/CalendarHeader.vala
index 19c6b68..f5e045d 100644
--- a/libclinica/CalendarHeader.vala
+++ b/libclinica/CalendarHeader.vala
@@ -26,38 +26,35 @@ namespace Clinica {
 
 	public class CalendarHeader : Gtk.EventBox {
 	
-		private Table table;
+		private Grid table;
 		private Label[] labels;
 		private CalendarView calendar_view;
 	
 		public CalendarHeader (CalendarView view) {
 		    this.calendar_view = view;
 			
-			table = new Table (1, 7, true);
+			table = new Grid ();
+			table.row_homogeneous = table.column_homogeneous = true;
 		
 			// EventBox properties
 			set_visible_window (true); // needed for style
 			get_style_context ().add_provider (calendar_view.style_context, 600);
 			get_style_context ().add_class ("header");
 			
-			labels = new Label[table.n_columns];
-			for (int c = 0; c < table.n_columns; c++) {
+			labels = new Label[7];
+			for (int c = 0; c < 7; c++) {
 				labels[c] = new Label ("");
 				labels[c].draw.connect (on_draw);
-				table.attach_defaults (labels[c], c, c + 1, 0, 1);
+				table.attach (labels[c], c, 0, 1, 1);
 			}
 			update_columns ();
 			
 			add (table);
-			
-			// Signals and handlers
-			// window.prefs.changed["week-starts-on"].connect (update_columns);
 		}
 		
 		private void update_columns () {
 			
 			var date = new DateTime.now_local ();
-			// date = date.add_days (window.prefs.week_starts_on + 1 - date.get_day_of_week ());
 			date = date.add_days (1 - date.get_day_of_week ());
 			foreach (var label in labels) {
 				label.label = date.format ("%A");
diff --git a/libclinica/CalendarToolbar.vala b/libclinica/CalendarToolbar.vala
index 82aa7e3..c59a495 100644
--- a/libclinica/CalendarToolbar.vala
+++ b/libclinica/CalendarToolbar.vala
@@ -94,8 +94,7 @@ namespace Clinica {
             
             event_editor.set_transient_for (resource_manager.user_interface.calendar_window);
             if (event_editor.run () == EventEditor.Response.SAVE) {
-                event_editor.selected_event.save ();
-                resource_manager.event_list_store.add_event (event_editor.selected_event);
+                resource_manager.data_provider.save_event (event_editor.selected_event);
             }
             event_editor.destroy ();
         }
diff --git a/libclinica/CalendarView.vala b/libclinica/CalendarView.vala
index c5e2a23..0481ef2 100644
--- a/libclinica/CalendarView.vala
+++ b/libclinica/CalendarView.vala
@@ -67,7 +67,7 @@ namespace Clinica {
 		public Calendar calendar { get; private set; }
 		public CssProvider style_context { get; private set; }
 		public CalendarToolbar toolbar   { get; set; }
-		internal ResourceManager resource_manager { get; private set; }
+		internal ResourceManager resource_manager { get; set; }
 		
 		/**
 		 * @brief The date selected in the calendar, or null.
@@ -75,10 +75,16 @@ namespace Clinica {
 		internal DateTime? selected_date = null;
 	
 		public CalendarView (ResourceManager resources, CalendarToolbar toolbar) {
-		    GLib.Object (spacing: 0, homogeneous: false);
-		    resource_manager = resources;
-		    this.toolbar = toolbar;
+		    Object (spacing: 0, homogeneous: false, resource_manager: resources,
+		            toolbar: toolbar);
+		            
+   		    create_interface ();
+		}
 		    
+		/**
+		 * @brief Create the various pieces of the interface-
+		 */
+		private void create_interface () {
 		    /* Create CssProvider */
 			style_context = new CssProvider ();
 			try {
@@ -95,14 +101,19 @@ namespace Clinica {
 			pack_end (calendar, true, true, 0);
 			
 			/* Connect some callbacks */
-			calendar.handler.changed.connect (update_month);
-			toolbar.month_switcher.left_clicked.connect (() => calendar.handler.add_month_offset (-1));
-            toolbar.month_switcher.right_clicked.connect (() => calendar.handler.add_month_offset (1));
-            toolbar.year_switcher.left_clicked.connect (() => calendar.handler.add_year_offset (-1));
-            toolbar.year_switcher.right_clicked.connect (() => calendar.handler.add_year_offset (1));
+			if (calendar != null)
+    			calendar.handler.changed.connect (update_month);
+    			
+    	    if (toolbar != null) {
+			    toolbar.month_switcher.left_clicked.connect (() => calendar.handler.add_month_offset (-1));
+                toolbar.month_switcher.right_clicked.connect (() => calendar.handler.add_month_offset (1));
+                toolbar.year_switcher.left_clicked.connect (() => calendar.handler.add_year_offset (-1));
+                toolbar.year_switcher.right_clicked.connect (() => calendar.handler.add_year_offset (1));
+            }
             
             /* Trigger an update, otherwise the label will be void */
-            update_month ();
+            if (resource_manager != null)
+                update_month ();
 		}
 		
 		private void on_day_selected (DateTime date) {
@@ -114,7 +125,6 @@ namespace Clinica {
 		
 		
 		private void update_month () {
-		
 		    /* Deselect the date, since we are changing month */
 		    selected_date = null;
 		
diff --git a/libclinica/CalendarWindow.vala b/libclinica/CalendarWindow.vala
index 67f2160..9d40acd 100644
--- a/libclinica/CalendarWindow.vala
+++ b/libclinica/CalendarWindow.vala
@@ -27,7 +27,7 @@
         internal ResourceManager resource_manager { get; set; }
         internal CalendarView    calendar_view    { get; set; }
         internal CalendarEventList event_widget     { get; set; }
-	internal  CalendarToolbar toolbar { get; private set; }
+        internal  CalendarToolbar toolbar { get; private set; }
     
         public CalendarWindow (ResourceManager resources) {
             GLib.Object (type: WindowType.TOPLEVEL);
@@ -49,13 +49,15 @@
             event_viewport.add_with_viewport (event_widget);
             
             /* Pack widgets in the box */
-            var main_table = new Table (2, 2, false);
-            main_table.attach (toolbar, 0, 2, 0, 1, AttachOptions.FILL | AttachOptions.EXPAND, 
-                AttachOptions.FILL, 0, 0);
-            main_table.attach (calendar_view, 0, 1, 1, 2, AttachOptions.FILL | AttachOptions.EXPAND, 
-                AttachOptions.EXPAND | AttachOptions.FILL, 0, 0);
-            main_table.attach (event_viewport, 1, 2, 1, 2, AttachOptions.FILL,
-                AttachOptions.EXPAND | AttachOptions.FILL, 0, 0);
+            var main_table = new Grid ();
+            main_table.attach (toolbar, 0, 0, 2, 1);
+            toolbar.hexpand = true;
+            toolbar.vexpand = false;
+            main_table.attach (calendar_view, 0, 1, 1, 1);
+            calendar_view.expand = true;
+            main_table.attach (event_viewport, 1, 1, 1, 1);
+            event_viewport.vexpand = true;
+            event_viewport.hexpand = false;
             
             /* Create an alignment to set the right padding of the window */
             var alignment = new Alignment (0.5F, 0.5F, 1.0F, 1.0F);
diff --git a/libclinica/CoreActivatable.vala b/libclinica/CoreActivatable.vala
new file mode 100644
index 0000000..a8bfe1f
--- /dev/null
+++ b/libclinica/CoreActivatable.vala
@@ -0,0 +1,46 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+ 
+ namespace Clinica {
+ 
+     public interface CoreActivatable : Object {
+        
+        /** 
+         * @brief The ResourceManager used to interact with clinica.
+         */
+        public abstract ResourceManager resource_manager { get; set; }
+
+        /**
+         * @brief Activate method that will be called when the extension
+         * is loaded. Special hooking up to callbacks and similar can be
+         * done here (registering as data_provider, for example).
+         */        
+        public abstract void activate ();
+        
+        /**
+         * @brief Deactivation method. Here the extension should unplug itself
+         * from the Clinica application.
+         */
+        public abstract void deactivate ();
+        
+        public abstract void update_state ();
+        
+     }
+     
+}
diff --git a/libclinica/PatientEditorExtensionSet.c b/libclinica/CoreActivatableExtensionSet.c
similarity index 58%
copy from libclinica/PatientEditorExtensionSet.c
copy to libclinica/CoreActivatableExtensionSet.c
index a0910ae..41ecf97 100644
--- a/libclinica/PatientEditorExtensionSet.c
+++ b/libclinica/CoreActivatableExtensionSet.c
@@ -5,27 +5,32 @@
 static void
 on_extension_added (PeasExtensionSet *set,
 		    PeasPluginInfo *info,
-		    ClinicaPatientEditorActivatable *activatable)
+		    ClinicaCoreActivatable *activatable)
 {
-    clinica_patient_editor_activatable_activate (activatable);
+    clinica_core_activatable_activate (activatable);
 }
 
 static void
 on_extension_removed (PeasExtensionSet *set,
 		      PeasPluginInfo *info,
-		      ClinicaPatientEditorActivatable *activatable)
+		      ClinicaCoreActivatable *activatable)
 {
-    clinica_patient_editor_activatable_deactivate (activatable);
+    clinica_core_activatable_deactivate (activatable);
 }
 
 PeasExtensionSet*
-clinica_patient_editor_setup_extension_set (ClinicaPatientEditor *editor,
-                                            PeasEngine *engine)
+clinica_resource_manager_setup_extension_set (ClinicaResourceManager *rm,
+                                              PeasEngine *engine)
 {
     PeasExtensionSet *set;
+    
+    set = peas_extension_set_new (engine, CLINICA_TYPE_CORE_ACTIVATABLE,
+				  "resource_manager", rm, NULL);
 
-    set = peas_extension_set_new (engine, CLINICA_TYPE_PATIENT_EDITOR_ACTIVATABLE,
-				  "patient_editor", editor, NULL);
+    g_signal_connect (set, "extension-added",
+		      G_CALLBACK (on_extension_added), NULL);
+    g_signal_connect (set, "extension-removed",
+		      G_CALLBACK (on_extension_removed), NULL);
 #ifdef HAVE_PEAS_EXTENSION_SET_FOREACH
      peas_extension_set_foreach (set,
 				(PeasExtensionSetForeachFunc) on_extension_added,
@@ -34,10 +39,5 @@ clinica_patient_editor_setup_extension_set (ClinicaPatientEditor *editor,
      peas_extension_set_call (set, "activate");
 #endif
 
-    g_signal_connect (set, "extension-added",
-		      G_CALLBACK (on_extension_added), NULL);
-    g_signal_connect (set, "extension-removed",
-		      G_CALLBACK (on_extension_removed), NULL);
-
     return set;
 }
diff --git a/libclinica/DataProvider.vala b/libclinica/DataProvider.vala
new file mode 100644
index 0000000..2078a43
--- /dev/null
+++ b/libclinica/DataProvider.vala
@@ -0,0 +1,265 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+
+namespace Clinica {
+
+    public interface VisitIterator : Object {
+        public abstract Visit get ();
+        public abstract bool next ();
+        public VisitIterator iterator () {
+            return this;
+        }
+    }
+
+    public interface PatientIterator : Object {
+        public abstract Patient get ();
+        public abstract bool next ();
+        public PatientIterator iterator () {
+            return this;
+        }
+    }
+
+    public interface DoctorIterator : Object {
+        public abstract Doctor get ();
+        public abstract bool next ();
+        public DoctorIterator iterator () {
+            return this;
+        }
+    }
+
+    public interface EventIterator : Object {
+        public abstract Event get ();
+        public abstract bool next ();
+        public EventIterator iterator () {
+            return this;
+        }
+    }
+
+    public interface DataProvider : Object {
+
+        public enum SortOrder {
+            ASCENDING,
+            DESCENDING,
+        }
+
+        /**
+         * @brief Get the name of the DataProvider object. This must be a unique
+         * name since it will be used to identify it and to select the right
+         * DataProvider on startup.
+         */
+        public abstract string get_name ();
+        
+        /**
+         * @brief Return the FileStore associated to this DataProvider. 
+         * The default implementation returns null, meaning that no file
+         * storage system is available. Override this in a custom implementation
+         * to change the behaviour. 
+         */
+        public virtual FileStore? get_file_store () { return null; }
+
+        /**
+         * @brief Get the visit with the given id.
+         */
+        public abstract Visit? get_visit (int64 id);
+
+        /**
+         * @brief Save a Visit. If the ID associated is 0
+         * than a new ID will be created and will be returned.
+         */
+        public abstract int64 save_visit (Visit visit);
+
+        /**
+         * @brief Remove a Visit from the database. This routine
+         * will return 0 on success.
+         */
+        public abstract int64 remove_visit (Visit visit);
+
+        /**
+         * @brief Emitted when a visit changes in the Database; this means
+         * that all Visit object with this ID around must be invalidated and
+         * reloaded.
+         */
+        public signal void visit_changed (int64 id);
+
+        /**
+         * @brief Emitted when a visit is removed from the database. This means
+         * that all the Visit with this id must be removed. Please note that you
+         * can't call get_visit () with this ID since the visit has already been
+         * removed.
+         */
+        public signal void visit_removed (int64 id);
+
+        /**
+         * @brief Emitted when a new visit is added to the database.
+         */
+        public signal void visit_added (int64 id);
+
+        /**
+         * @brief Iterate on all the visits
+         *
+         * @param patient If not null then pick up only the visits of the given patient.
+         * @param start If not null pick up only visits from this starting date.
+         * @param end If not null stop iterating on visits when this date is reached.
+         */
+        public abstract VisitIterator visits (Patient? patient =
+                null, DateTime? start = null, DateTime? end =
+                null, SortOrder order = SortOrder.DESCENDING);
+
+        /**
+         * @brief Get the Patient with the given id.
+         */
+        public abstract Patient? get_patient (int64 id);
+
+        /**
+         * @brief Save a Patient. If the ID associated is 0
+         * than a new ID will be created and will be returned.
+         */
+        public abstract int64 save_patient (Patient patient);
+
+        /**
+         * @brief Remove a Patient from the database. This routine
+         * will return 0 on success.
+         *
+         * This routine must take care of removing all the patients
+         * visits and deassociate all the events from this patient.
+         */
+        public abstract int64 remove_patient (Patient patient);
+
+        /**
+         * @brief Emitted when a patient changes in the database; this means
+         * that all Patient objects with this ID around must be invalidated and
+         * reloaded.
+         */
+        public signal void patient_changed (int64 id);
+
+        /**
+         * @brief Emitted when a patient is removed from the database. This means
+         * that all the Patients with this id must be removed. Please note that you
+         * can't call get_patient () with this ID since the patient has already been
+         * removed.
+         */
+        public signal void patient_removed (int64 id);
+
+        /**
+         * @brief Emitted when a new patient is added to the database.
+         */
+        public signal void patient_added (int64 id);
+
+        /**
+         * @brief Iterate over all the patients in the database.
+         *
+         * @param doctor If doctor is not null iterate only on patients associated
+         * on this doctor.
+         */
+        public abstract PatientIterator patients (Doctor? doctor = null);
+
+        /**
+         * @brief Get the doctor associatied with the given id.
+         */
+        public abstract Doctor? get_doctor (int64 id);
+
+        /**
+         * @brief Save a Doctor. If the ID associated is 0
+         * than a new ID will be created and will be returned.
+         */
+        public abstract int64 save_doctor (Doctor doctor);
+
+        /**
+         * @brief Remove a Doctor from the database. This routine
+         * will return 0 on success.
+         *
+         * This routine must take care of deassociating of the
+         * patients of this doctor from him/her.
+         */
+        public abstract int64 remove_doctor (Doctor doctor);
+
+        /**
+         * @brief Emitted when a doctor changes in the database; this means
+         * that all Doctor objects with this ID around must be invalidated and
+         * reloaded.
+         */
+        public signal void doctor_changed (int64 id);
+
+        /**
+         * @brief Emitted when a doctor is removed from the database. This means
+         * that all the Doctor with this id must be removed. Please note that you
+         * can't call get_doctor () with this ID since the doctor has already been
+         * removed.
+         */
+        public signal void doctor_removed (int64 id);
+
+        /**
+         * @brief Emitted when a new doctor is added to the database.
+         */
+        public signal void doctor_added (int64 id);
+
+        /**
+         * @brief Iteratate over all the doctors in the database.
+         */
+        public abstract DoctorIterator doctors ();
+
+        /**
+         * @brief Get the event associated to the given ID.
+         */
+        public abstract Event? get_event (int64 id);
+
+        /**
+         * @brief Save an Event. If the ID associated is 0
+         * than a new ID will be created and will be returned.
+         */
+        public abstract int64 save_event (Event event);
+
+        /**
+         * @brief Remove the event from the database.
+         */
+        public abstract int64 remove_event (Event event);
+
+        /**
+         * @brief Emitted when an event changes in the database; this means
+         * that all Event objects with this ID around must be invalidated and
+         * reloaded.
+         */
+        public signal void event_changed (int64 id);
+
+        /**
+         * @brief Emitted when an event is removed from the database. This means
+         * that all the Event with this id must be removed. Please note that you
+         * can't call get_event () with this ID since the event has already been
+         * removed.
+         */
+        public signal void event_removed (int64 id);
+
+        /**
+         * @brief Emitted when a new event is added to the database.
+         */
+        public signal void event_added (int64 id);
+
+        /**
+         * @brief Iterate over all the events in the database.
+         *
+         * @param from If from is not null then iterate only from events starting after
+         * from.
+         * @param to If to is not null then iterate only until events before to.
+         */
+        public abstract EventIterator events (DateTime? from =
+                null, DateTime? to = null);
+
+    }
+
+}
diff --git a/libclinica/DataServer.vala b/libclinica/DataServer.vala
new file mode 100644
index 0000000..0dee8b6
--- /dev/null
+++ b/libclinica/DataServer.vala
@@ -0,0 +1,561 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ *            Tommaso Bianucci <churli at gmail.com>
+ */
+ 
+using Jansson;
+ 
+ namespace Clinica {
+ 
+    /**
+     * @brief An instance of this class provides a service on the local
+     * network that allow other instances of Clinica to attach to the
+     * given DataProvider. 
+     */
+    public class DataServer : GLib.Object {
+    
+        /**
+         * @brief The ResouceManager of this Clinica instance.
+         */
+        private ResourceManager resource_manager;
+        
+        /**
+         * @brief The DataProvider from which the data will
+         * be taken. 
+         */
+        protected DataProvider provider;
+        
+        /**
+         * @brief Authentication domain used to authenticate the clients
+         * that make RPC requests. 
+         */
+        internal AuthDomain auth_domain;
+        
+        /**
+         * @brief The port on which this server will be available.
+         */
+        protected int PORT;
+        
+        /**
+         * @brief The Soup.Server used to instantiate the service.
+         */
+        protected Soup.Server server;
+        
+        /**
+         * @brief The name of this instance of the DataServer that will be
+         * sent in the response to the default handler.
+         */
+        private string name = "Clinica DataServer";
+        
+        /**
+         * @brief The version of clinica that is running this DataServer.
+         */
+        private string version = Config.VERSION;
+        
+        /** 
+         * @brief The current processing id. 
+         */
+        private string processing_id = "null";
+    
+        public DataServer (ResourceManager resources, DataProvider provider, int PORT = 20843) {
+            this.resource_manager = resources;
+            this.provider = provider;
+            this.PORT = PORT;
+            
+            // Create the Soup.Server object and start the server
+            server = new Soup.Server (Soup.SERVER_PORT, PORT);
+            
+            // Create the AuthDomain for the RPC part. Support disabling authentication
+            // via the CLINICA_DISABLE_AUTHENTICATION environment variable.
+            var disable_authentication_env = Environment.get_variable ("CLINICA_DISABLE_AUTHENTICATION");
+            auth_domain = new AuthDomain (resource_manager);
+            if (disable_authentication_env == null || disable_authentication_env != "yes")
+                server.add_auth_domain (auth_domain);
+            
+            // Connect the handlers
+            server.add_handler ("/", default_handler);
+            server.add_handler ("/rpc", rpc_handler);
+        }
+        
+        /**
+         * @brief This handler is called when no other handlers match and will
+         * return an error for every request except "/", that will give
+         * some basic details on the Clinica server. 
+         */
+        protected void default_handler (Soup.Server server, Soup.Message msg, string path, 
+                                        HashTable? query, Soup.ClientContext client) {
+            if (path != "/") {
+                msg.set_status (500);
+                msg.set_response ("text/html", Soup.MemoryUse.COPY, 
+                    "Clinica network server cannot handle your request\n".data);
+            }
+            else {
+                msg.set_status (200);
+                msg.set_response ("text/html", Soup.MemoryUse.COPY, 
+                    """{ "name": %s, "version": %s }""".printf (name, version).data);
+                    
+            }
+        }
+        
+        /**
+         * @brief Handle an RPC request.
+         */
+        protected void rpc_handler (Soup.Server server, Soup.Message msg, string path,
+                                    HashTable? query, Soup.ClientContext client) {
+            
+            // Parsing using the Jansson library
+            Jansson.Error error;
+            Json root = Json.loads ((string) msg.request_body.data, 0, out error);
+            
+            if (root == null) {
+                warning ("The document passed is not a JSON document");
+                msg.set_status (500);
+                msg.set_response ("text/html", Soup.MemoryUse.COPY, 
+                    "Request failed, please pass a JSON document in the POST request".data);
+                    
+                // TODO: Add the reporting of the precise error that happened. 
+                    
+                return;
+            }
+            
+            /* Read the type of request that the client has made */
+            Json request_element = root.object_get ("method");
+            
+            /* Check that the given request is a string and is present */
+            if (request_element == null || !request_element.is_string ()) {
+                warning ("No method field in the JSON document, aborting");
+                msg.set_status (500);
+                msg.set_response ("text/html", Soup.MemoryUse.COPY, 
+                    "Request failed, please pass a JSON document containing the method field in the POST request".data);
+                return;
+            }
+            
+            Json? req_id_element = root.object_get ("id");
+            if (req_id_element == null) {
+                warning ("No id in the request, aborting");
+                msg.set_status (500);
+                msg.set_response ("text/html", Soup.MemoryUse.COPY, 
+                    "Request failed, please pass a JSON document containing the id field in the POST request".data);
+                return;
+            }
+            else {
+                if (req_id_element.is_integer ())
+                    processing_id = req_id_element.integer_value ().to_string ();
+                else if (req_id_element.is_string ())
+                    processing_id = """ "%s" """.printf (req_id_element.string_value ());
+                else if (req_id_element.is_null ())
+                    processing_id = "null";
+                else if (req_id_element.is_object ()) {
+                    processing_id = req_id_element.dumps ();
+                }
+            }
+            
+            string request = request_element.string_value ();
+            
+            // Get the ID now, if it exists
+            Json? params_element = root.object_get ("params");
+            Json? id_element = null;
+            if (params_element != null)
+                id_element = params_element.object_get ("id");
+            else
+                params_element = Json.object ();
+            
+            /* Many requests need an associated id, so get it now */
+            int64 id = 0;
+            if (id_element != null && id_element.is_integer ()) {
+                id = id_element.integer_value ();
+            }
+            
+            /* If we got till here than we have good change of giving a good 
+             * response to the client. */
+            msg.set_status (200);
+            
+            switch (request) {
+                case "get_patient":
+                    var patient = provider.get_patient (id);
+                    msg.set_response ("text/html", Soup.MemoryUse.COPY, handle_rpc_get_patient (patient).data);
+                    break;
+                case "patients":
+                    msg.set_response ("text/html", Soup.MemoryUse.COPY,
+                        handle_rpc_patients (params_element).data);
+                    break;
+                case "get_doctor":
+                    var doctor = provider.get_doctor (id);
+                    msg.set_response ("text/html", Soup.MemoryUse.COPY, 
+                        handle_rpc_get_doctor (doctor).data);
+                    break;
+                case "doctors":
+                    msg.set_response ("text/html", Soup.MemoryUse.COPY,
+                        handle_rpc_doctors (params_element).data);
+                    break;
+                case "get_visit":
+                    var visit = provider.get_visit (id);
+                    msg.set_response ("text/html", Soup.MemoryUse.COPY,
+                        handle_rpc_get_visit (visit).data);
+                    break;
+                case "visits":
+                    msg.set_response ("text/html", Soup.MemoryUse.COPY,
+                        handle_rpc_visits (params_element).data);
+                    break;
+                case "get_event":
+                    var event = provider.get_event (id);
+                    msg.set_response ("text/html", Soup.MemoryUse.COPY,
+                        handle_rpc_get_event (event).data);
+                    break;
+                case "events":
+                    msg.set_response ("text/html", Soup.MemoryUse.COPY,
+                        handle_rpc_events (params_element).data);
+                    break;
+                case "remove_doctor":
+                    msg.set_response ("text/html/", Soup.MemoryUse.COPY,
+                        handle_rpc_remove_doctor (params_element).data);
+                    break;
+                case "remove_patient":
+                    msg.set_response ("text/html", Soup.MemoryUse.COPY,
+                        handle_rpc_remove_patient (params_element).data);
+                    break;
+                case "remove_visit":
+                    msg.set_response ("text/html", Soup.MemoryUse.COPY,
+                        handle_rpc_remove_visit (params_element).data);
+                    break;
+                case "remove_event":
+                    msg.set_response ("text/html", Soup.MemoryUse.COPY,
+                        handle_rpc_remove_event (params_element).data);
+                    break;
+                case "save_doctor":
+                    msg.set_response ("text/html", Soup.MemoryUse.COPY,
+                        handle_rpc_save_doctor (params_element).data);
+                    break;
+                case "save_patient":
+                    msg.set_response ("text/html", Soup.MemoryUse.COPY,
+                        handle_rpc_save_patient (params_element).data);
+                    break;
+                case "save_visit":
+                    msg.set_response ("text/html", Soup.MemoryUse.COPY,
+                        handle_rpc_save_visit (params_element).data);
+                    break;
+                case "save_event":
+                    msg.set_response ("text/html", Soup.MemoryUse.COPY,
+                        handle_rpc_save_event (params_element).data);
+                    break;
+                default:
+                    msg.set_status (500);
+                    msg.set_response ("text/html", Soup.MemoryUse.COPY, 
+                        format_response (null).data);
+                    break;
+            }
+        }
+        
+        private string handle_rpc_get_patient (Patient? patient) {
+            if (patient != null) {
+                return format_response (patient.to_json ().dumps ());
+            }
+            else {
+                return format_response (null);
+            }
+        }
+        
+        private string handle_rpc_patients (Json root) {
+            Doctor? doctor = null;
+            Json? doctor_element = root.object_get ("doctor");
+            if (doctor_element != null && doctor_element.is_integer ()) {
+                doctor = provider.get_doctor (doctor_element.integer_value ());
+            }
+        
+            var builder = new StringBuilder ();
+            builder.append_unichar ('[');
+            foreach (var patient in provider.patients (doctor)) {
+                builder.append (patient.id.to_string ());
+                builder.append_unichar (',');
+            }
+            if (builder.len > 1)
+                builder.truncate (builder.len - 1);
+            builder.append_unichar (']');
+            
+            return format_response (builder.str);
+        }
+        
+        private string handle_rpc_get_doctor (Doctor? doctor) {
+            if (doctor != null) {
+                return format_response (doctor.to_json ().dumps ());
+            }
+            else {
+                return format_response (null);
+            }
+        }
+        
+        private string handle_rpc_doctors (Json root) {
+            var builder = new StringBuilder ();
+            
+            builder.append_unichar ('[');
+            foreach (var doctor in provider.doctors ()) {
+                builder.append (doctor.id.to_string ());
+                builder.append_unichar (',');
+            }
+            if (builder.len > 1)            
+                builder.truncate (builder.len - 1);
+            builder.append_unichar (']');
+            
+            return format_response (builder.str);
+        }
+        
+        private string handle_rpc_get_visit (Visit? visit) {
+            if (visit != null)
+                return format_response (visit.to_json ().dumps ());
+            else
+                return format_response ();
+        }
+        
+        private string handle_rpc_visits (Json root) {
+            var builder = new StringBuilder ();
+            
+            DateTime? start_date = null;
+            DateTime? end_date = null;
+            
+            Json? start_date_element = root.object_get ("start_date");
+            if (start_date_element != null && start_date_element.is_string ()) {
+                start_date = SqliteDataProvider.string_to_datetime (start_date_element.string_value ());
+            }
+            
+            Json? end_date_element = root.object_get ("end_date");
+            if (end_date_element != null && end_date_element.is_string ()) {
+                end_date = SqliteDataProvider.string_to_datetime (end_date_element.string_value ());
+            }
+            
+            Patient? patient = null;
+            Json? patient_element = root.object_get ("patient");
+            if (patient_element != null && patient_element.is_integer ()) {
+                patient = provider.get_patient (patient_element.integer_value ());
+                
+                if (patient == null) {
+                    return format_response ();
+                }
+            }
+            
+            builder.append_unichar ('[');
+            foreach (var visit in provider.visits (patient, start_date, end_date)) {
+                builder.append (visit.id.to_string ());
+                builder.append_unichar (',');
+            }
+            if (builder.len > 1)            
+                builder.truncate (builder.len - 1);
+            builder.append_unichar (']');
+            
+            return format_response (builder.str);
+        }
+        
+        private string handle_rpc_get_event (Event? event) {
+            if (event != null) {
+                return format_response (event.to_json ().dumps ());
+            }
+            else {
+                return format_response ();
+            }
+        }
+        
+        private string handle_rpc_events (Json root) {
+            // Get bounds
+            DateTime? start_date = null;
+            DateTime? end_date = null;
+            
+            Json? start_date_element = root.object_get ("start_date");
+            if (start_date_element != null && start_date_element.is_string ()) {
+                start_date = SqliteDataProvider.string_to_datetime (start_date_element.string_value ());
+            }
+            
+            Json? end_date_element = root.object_get ("end_date");
+            if (end_date_element != null && end_date_element.is_string ()) {
+                end_date = SqliteDataProvider.string_to_datetime (end_date_element.string_value ());
+            }      
+            
+            var builder = new StringBuilder ();
+            builder.append_unichar ('[');
+            foreach (var event in provider.events (start_date, end_date)) {
+                builder.append (event.id.to_string ());
+                builder.append_unichar (',');
+            }
+            if (builder.len > 1)
+                builder.truncate (builder.len - 1);
+            builder.append_unichar (']');
+            
+            return format_response (builder.str);
+        }
+        
+        private string handle_rpc_remove_doctor (Json root) {
+            // Get ID of the doctor that needs to be removed
+            int64 id = 0;
+            Json? id_element = root.object_get ("id");
+            if (id_element != null && id_element.is_integer ()) {
+                id = id_element.integer_value ();
+            }
+            else {
+                return format_response (null);
+            }
+            
+            var doc = provider.get_doctor (id);
+            if (doc != null) {            
+                provider.remove_doctor (doc);
+            }
+            else {
+                warning (_("Trying to removing doctor with ID = %ld failed"), id);
+                return format_response (null);
+            }
+            
+            return format_response ("{}");
+        }
+        
+        private string handle_rpc_remove_patient (Json root) {
+            // Get ID of the patient that needs to be removed
+            int64 id = 0;
+            Json? id_element = root.object_get ("id");
+            if (id_element != null && id_element.is_integer ()) {
+                id = id_element.integer_value ();
+            }
+            else {
+                return format_response (null);
+            }
+            
+            var patient = provider.get_patient (id);
+            if (patient != null) {            
+                provider.remove_patient (patient);
+            }
+            else {
+                warning (_("Trying to removing patient with ID = %ld failed"), id);
+                return format_response (null);
+            }
+            
+            return format_response ("{}");  
+        }
+        
+        private string handle_rpc_remove_visit (Json root) {
+            // Get ID of the visit that needs to be removed
+            int64 id = 0;
+            Json? id_element = root.object_get ("id");
+            if (id_element != null && id_element.is_integer ()) {
+                id = id_element.integer_value ();
+            }
+            else {
+                return format_response (null);
+            }
+            
+            var visit = provider.get_visit (id);
+            if (visit != null) {            
+                provider.remove_visit (visit);
+            }
+            else {
+                warning (_("Trying to removing visit with ID = %ld failed"), id);
+                return format_response (null);
+            }
+            
+            return format_response ("{}");  
+        }
+        
+        private string handle_rpc_remove_event (Json root) {
+            // Get ID of the event that needs to be removed
+            int64 id = 0;
+            Json? id_element = root.object_get ("id");
+            if (id_element != null && id_element.is_integer ()) {
+                id = id_element.integer_value ();
+            }
+            else {
+                return format_response (null);
+            }
+            
+            var event = provider.get_event (id);
+            if (event != null) {            
+                provider.remove_event (event);
+            }
+            else {
+                warning (_("Trying to removing event with ID = %ld failed"), id);
+                return format_response (null);
+            }
+            
+            return format_response ("{}");  
+        }
+        
+        private string handle_rpc_save_doctor (Json root) {
+            var doctor_node = root.object_get ("doctor");
+            if (doctor_node == null) {
+                return format_response (null);
+            }
+            else {
+                int64 new_id = provider.save_doctor (new Doctor.from_json (doctor_node, provider));
+                return format_response ("""{"id":%s}""".printf (new_id.to_string ()));
+            }
+        }
+        
+        private string handle_rpc_save_patient (Json root) {
+            var patient_node = root.object_get ("patient");
+            if (patient_node == null) {
+                return format_response (null);
+            }
+            else {
+                int64 new_id = provider.save_patient (new Patient.from_json (patient_node, provider));
+                return format_response ("""{"id":%s}""".printf (new_id.to_string ()));
+            }
+        }
+        
+        private string handle_rpc_save_visit (Json root) {
+            var visit_node = root.object_get ("visit");
+            if (visit_node == null) {
+                return format_response (null);
+            }
+            else {
+                int64 new_id = provider.save_visit (new Visit.from_json (visit_node, provider));
+                return format_response ("""{"id":%s}""".printf (new_id.to_string ()));
+            }
+        }
+        
+        private string handle_rpc_save_event (Json root) {
+            var event_node = root.object_get ("event");
+            if (event_node == null) {
+                return format_response (null);
+            }
+            else {
+                int64 new_id = provider.save_event (new Event.from_json (event_node));
+                return format_response ("""{"id":%s}""".printf (new_id.to_string ()));
+            }
+        }
+        
+                
+        
+        protected string format_response (string? result = null) {
+            bool successful = true;
+            if (result == null) {
+                successful = false;
+                result = "0";
+            }
+            
+            return """{"jsonrpc": "2.0", "id": %s, "result": %s, "error": %s}""".printf (
+                processing_id, 
+                result, (successful == true) ? "null" : """{ "message": "Internal server error", "code": -1 }""");
+        }
+                
+        public void start () {
+            debug ("Starting DataServer");
+            server.run_async ();
+        }
+        
+        public void stop () {
+            debug ("Stopping DataServer");
+            server.quit ();
+        }
+    
+    }
+ 
+ }
diff --git a/libclinica/DateSwitcher.vala b/libclinica/DateSwitcher.vala
index 5237865..c061baa 100644
--- a/libclinica/DateSwitcher.vala
+++ b/libclinica/DateSwitcher.vala
@@ -40,7 +40,7 @@ namespace Clinica {
 			set {
 				_is_pressed = value;
 				if (hovered == 0 || hovered == 2)
-					box.get_children ().nth_data (hovered).set_state (value ? StateType.SELECTED : StateType.NORMAL);
+					box.get_children ().nth_data (hovered).set_state_flags (value ? StateFlags.ACTIVE : StateFlags.NORMAL, true);
 				queue_draw ();
 			}
 		}
@@ -54,7 +54,7 @@ namespace Clinica {
 			}
 		}
 		
-		private HBox box;
+		private Box box;
 		
 		public Label label { get; protected set; }
 		public string text {
@@ -73,7 +73,7 @@ namespace Clinica {
 			set_visible_window (false);
 
 			// Initialize everything
-			box = new HBox (false, 1);
+			box = new Box (Orientation.HORIZONTAL, 1);
 			box.border_width = 0;
 			label = new Label ("");
 			label.set_size_request (label_width, -1);
@@ -159,6 +159,8 @@ namespace Clinica {
 				Allocation arrow_size;
 				box.get_children ().nth_data (hovered).get_allocation (out arrow_size);
 				
+				cr.save();
+
 				cr.rectangle (arrow_size.x - box_size.x, 0, arrow_size.width, arrow_size.height);
 				cr.clip ();
 				
@@ -166,8 +168,8 @@ namespace Clinica {
 					style.draw_box (cr, StateType.SELECTED, ShadowType.IN, this, "button", 0, 0, box_size.width, box_size.height);
 				else
 					style.draw_box (cr, StateType.PRELIGHT, ShadowType.ETCHED_OUT, this, "button", 0, 0, box_size.width, box_size.height);
-							
-				cr.restore ();
+					
+			    cr.restore();
 			}
 			
 			propagate_draw (box, cr);
diff --git a/libclinica/DateTimePicker.vala b/libclinica/DateTimePicker.vala
new file mode 100644
index 0000000..7aa1007
--- /dev/null
+++ b/libclinica/DateTimePicker.vala
@@ -0,0 +1,107 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
+ */
+ 
+ namespace Clinica {
+    
+    public class DateTimePicker : Gtk.EventBox, Buildable, Gtk.Buildable {
+    
+        private Gtk.Calendar calendar;
+        
+        private Gtk.SpinButton hour_spinbutton;
+        private Gtk.SpinButton minute_spinbutton;
+        
+        public void setup (ResourceManager resources) {
+        }
+    
+        public DateTimePicker () {
+        }
+        
+        construct {
+            var vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
+            
+            calendar = new Gtk.Calendar ();
+            vbox.pack_start (calendar, true, true);
+            
+            /* We need an additional box to pack the hour
+             * and minute spinbuttons together with their
+             * labels. */
+            var box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);
+            
+            hour_spinbutton = new Gtk.SpinButton.with_range (-1.0, 234.0, 1.0);
+            minute_spinbutton = new Gtk.SpinButton.with_range (-1.0, 60.0, 15.0);
+            
+            hour_spinbutton.set_value (new DateTime.now_local ().get_hour ());
+            minute_spinbutton.set_value (0.0);
+            
+            hour_spinbutton.changed.connect (on_hour_spinbutton_changed);
+            minute_spinbutton.changed.connect (on_minute_spinbutton_changed);
+            
+            box.pack_start (new Gtk.Label (_("Hour")), false, true);
+            box.pack_start (hour_spinbutton, true, true, 6);
+            box.pack_start (new Gtk.Label (_("Minute")), false, true, 6);
+            box.pack_start (minute_spinbutton, true, true);
+            
+            vbox.pack_start (box, true, true);
+            add (vbox);
+            
+            calendar.set_margin_bottom (6);
+            
+            show_all ();
+        }
+        
+        private void on_hour_spinbutton_changed (Gtk.Editable spin) {
+            if (hour_spinbutton.get_value () == 24.0)
+                hour_spinbutton.set_value (0.0);
+            if (hour_spinbutton.get_value () == -1.0)
+                hour_spinbutton.set_value (23.0);
+        }
+        
+        private void on_minute_spinbutton_changed (Gtk.Editable spin) {   
+            if (minute_spinbutton.get_value () == 60.0)
+                minute_spinbutton.set_value (0.0);
+            if (minute_spinbutton.get_value () == -1.0)
+                minute_spinbutton.set_value (59.0);
+        }
+        
+        public void set_date (DateTime date) {
+            calendar.select_month (date.get_month () - 1, date.get_year ());
+            calendar.select_day (date.get_day_of_month ());
+            
+            hour_spinbutton.set_value (date.get_hour ());
+            minute_spinbutton.set_value (date.get_minute ());
+        }
+        
+        public DateTime get_datetime() {
+                uint year, month, day;
+                calendar.get_date (out year, out month, out day);
+                
+                /* We need a plus one offset on months since are represented differently
+                 * in calendar and DateTime. */
+                var date = new DateTime.local ((int) year, (int) month + 1, (int) day, 0, 0, 0);
+                
+                date = date.add_hours (hour_spinbutton.get_value_as_int ());
+                date = date.add_minutes (minute_spinbutton.get_value_as_int ());
+                
+                return date;
+        }
+    
+    }
+    
+ }
diff --git a/libclinica/Day.vala b/libclinica/Day.vala
index 49c5248..4db691f 100644
--- a/libclinica/Day.vala
+++ b/libclinica/Day.vala
@@ -89,15 +89,13 @@ namespace Clinica {
 		    drag_finish (context, true, false, time);
 		    resource_manager.dragging_patient = null;
 		    
-		    var event_editor = new EventEditor.with_date (resource_manager, date);
-		    event_editor.select_patient (patient);
-		    event_editor.set_transient_for (resource_manager.user_interface.calendar_window);
-            if (event_editor.run () == EventEditor.Response.SAVE) {
-                /* Save the event in the editor */
-                event_editor.selected_event.save ();
-                resource_manager.event_list_store.add_event (event_editor.selected_event);
-            }
-		    event_editor.destroy ();
+		    // Create a VisitScheduler and schedule a new visit for the patient dropped here
+		    var visit_scheduler = new VisitSchedulerDialog (resource_manager, patient);
+		    visit_scheduler.set_transient_for (resource_manager.user_interface.calendar_window);
+		    visit_scheduler.select_date (new DateTime.local (date.get_year (), date.get_month (), date.get_day_of_month (),
+		        9, 30, 0));
+		    visit_scheduler.run ();
+		    visit_scheduler.destroy ();
 		    return true;
 		}
 		
@@ -180,7 +178,7 @@ namespace Clinica {
                 ctx.set_font_size (10.0);
                 double line_position = 20;
                 double line_height = 13.0;
-                Gee.LinkedList<int> displayed_patients_id = new Gee.LinkedList<int> ();
+                Gee.LinkedList<int64?> displayed_patients_id = new Gee.LinkedList<int64?> ();
     	        ctx.rectangle (0, 0, width - 4, height - 4);
 		        ctx.clip ();
 			    
@@ -208,9 +206,9 @@ namespace Clinica {
 			    
 			    /* Drawing performed visits */
 			    foreach (var visit in visit_list) {
-			        if (visit.patient.get_id () in displayed_patients_id)
+			        if (visit.patient.id in displayed_patients_id)
 			            continue;
-			        displayed_patients_id.add (visit.patient.get_id ());
+			        displayed_patients_id.add (visit.patient.id);
 			        string text = "Visit: " + visit.patient.get_complete_name ();;
 			        ctx.text_extents (text, out extents);
 			        ctx.move_to (4 - extents.x_bearing,
@@ -218,9 +216,6 @@ namespace Clinica {
 			        line_position += line_height;
 			        ctx.show_text (text);
 			    }
-			    
-			    /* Undo the clipping to make the whole day drawable */
-			    ctx.restore ();
 			}
 		    
 		    /* Draw number with the date with the usual switch on can_focus
@@ -291,7 +286,7 @@ namespace Clinica {
 		 */
 		public void remove_visit (Visit visit) {
 		    foreach (var v in visit_list) {
-		        if (v.get_id () == visit.get_id ()) {
+		        if (v.id == visit.id) {
 		            visit_list.remove (v);
         		    area.queue_draw ();
 		            return;
@@ -312,7 +307,7 @@ namespace Clinica {
 		 */
 		public void remove_event (Event event) {
 		    foreach (var e in event_list) {
-		        if (e.get_id () == event.get_id ()) {
+		        if (e.id == event.id) {
 		            event_list.remove (e);
 		            area.queue_draw ();
 		            return;
diff --git a/libclinica/Doctor.vala b/libclinica/Doctor.vala
index b75a4f3..2d3cd96 100644
--- a/libclinica/Doctor.vala
+++ b/libclinica/Doctor.vala
@@ -15,104 +15,61 @@
  *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
  *
  *   Authors: Leonardo Robol <leo at robol.it>
- *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
+ *            Tommaso Bianucci <churli at gmail.com>
  */
- 
- using Gee;
- using Sqlite;
- 
- namespace Clinica {
- 
-         
-    public class DoctorIterator : SqlDataIterator {
+  
+using Jansson;
+
+namespace Clinica {
+
+    public class Doctor : Object {
     
-		private ResourceManager resource_manager;
+        public DataProvider? provider = null;
     
-    	/**
-    	 * @brief Iterator over all the Doctors present
-    	 * in the database. 
-    	 */
-        public DoctorIterator (ResourceManager resources) {
-            base (resources.db, resources.doctor_table);
-            resource_manager = resources;
-        }
+        public int64 id { get; set; default = 0; }
         
-        public new DoctorIterator iterator () { return this; }
+        public string given_name { get; set; }
         
-        public new Doctor get () {
-            return new Doctor.with_id (resource_manager, base.get ());
-        }
-    }
- 
-    /**
-     * @brief A doctor associated with some patients
-     */
-    public class Doctor : SqlDataType {
+        public string surname { get; set; }
         
-        public new static DoctorIterator all (ResourceManager resources) {
-            return new DoctorIterator (resources);
-        }
+        public string phone { get; set; }
         
-        /* FIELDS */
-        public string given_name {
-        	get { return get_text ("given_name"); }
-        	set { set_text ("given_name", value); }
-        }
+        public string mobile { get; set; }
         
-        public string surname {
-        	get { return get_text ("surname"); }
-        	set { set_text ("surname", value); }
+        public string get_complete_name () {
+        	return string.join (" ", this.given_name, this.surname);
         }
         
-        public string phone {
-        	get { return get_text ("phone"); }
-        	set { set_text ("phone", value); }
+        public PatientIterator patients () {
+            return provider.patients (this);
         }
         
-        public string mobile {
-        	get { return get_text ("mobile"); }
-        	set { set_text ("mobile", value); }
+        public bool has_patients () {
+            return (patients ().next ());
         }
         
-		private ResourceManager resource_manager;
-    
-        public Doctor (ResourceManager resources) {
-            base (resources.db);
-            resource_manager = resources;
-            table_name = resources.doctor_table;
-            error.connect ((t,l) => resources.error_callback(t,l));
+        internal Doctor.from_json (Json object, DataProvider? source = null) {
+            this.provider = source;
             
-            add_text_field ("given_name");
-            add_text_field ("surname");
-            add_text_field ("phone");
-            add_text_field ("mobile");
-            
-            /* Finishing connecting the object to the database */
-            init_resources ();
+            id = object.object_get ("id").integer_value ();
+            given_name = object.object_get ("given_name").string_value ();
+            surname = object.object_get ("surname").string_value ();
+            phone = object.object_get ("phone").string_value ();
+            mobile = object.object_get ("mobile").string_value ();
         }
         
-        public Doctor.with_id (ResourceManager resources, int ID) {
-            this (resources);
-            load (ID);
+        internal Json to_json () {
+            var object = Json.object ();
+            
+            object.object_set ("id", Json.integer (id));
+            object.object_set ("given_name", Json.string (given_name));
+            object.object_set ("surname", Json.string (surname));
+            object.object_set ("phone", Json.string (phone));
+            object.object_set ("mobile", Json.string (mobile));
+            
+            return object;
         }
-        
-        public string get_complete_name () {
-        	return string.join(" ", given_name, surname);
-       	}
-       	
-       	public bool has_patients () {
-       		GLib.List<int> associated_ids = associated_ids(resource_manager.patient_table, "doctor");
-       		return (associated_ids.length () != 0);
-       	}
-       	
-       	public new void remove () {
-       		if (has_patients ()) 
-       			error (_("You cannot delete a doctor with associated patients. Delete his patients first."));
-       		else
-	       		base.remove ();
-       	}
-        
-        
+       
+    }
 
-    }   
- }
+}
diff --git a/libclinica/DoctorContextMenu.vala b/libclinica/DoctorContextMenu.vala
index 90d224d..ed52c06 100644
--- a/libclinica/DoctorContextMenu.vala
+++ b/libclinica/DoctorContextMenu.vala
@@ -22,7 +22,7 @@ using Gtk;
 
 namespace Clinica {
 
-	public class DoctorContextMenu : Menu {
+	public class DoctorContextMenu : Gtk.Menu {
 	
 		/**
 		 * @brief The doctor associated to this popup menu 
@@ -36,15 +36,15 @@ namespace Clinica {
 		private DoctorListView view;
 		
 		/**
-		 * @brief MenuItem associated to doctor deletion
+		 * @brief Gtk.MenuItem associated to doctor deletion
 		 */
-		private MenuItem delete_menuitem;
+		private Gtk.MenuItem delete_menuitem;
 		
 		/**
-		 * @brief MenuItem that triggers doctor edit
+		 * @brief Gtk.MenuItem that triggers doctor edit
 		 * dialog.
 		 */
-		private MenuItem edit_menuitem;
+		private Gtk.MenuItem edit_menuitem;
 		
 		private ResourceManager resource_manager;
 	
@@ -55,8 +55,8 @@ namespace Clinica {
 			
 			/* Create menu items, connect them to their callback
 			 * and add it to the menu */
-			delete_menuitem = new MenuItem.with_label (_("Delete"));
-			edit_menuitem   = new MenuItem.with_label (_("Edit"));
+			delete_menuitem = new Gtk.MenuItem.with_label (_("Delete"));
+			edit_menuitem   = new Gtk.MenuItem.with_label (_("Edit"));
 			
 			delete_menuitem.activate.connect (on_delete_menuitem_activated);
 			edit_menuitem.activate.connect (on_edit_menuitem_activated);
@@ -67,13 +67,13 @@ namespace Clinica {
 			show_all ();
 		}
 		
-		private void on_delete_menuitem_activated (MenuItem item) {
+		private void on_delete_menuitem_activated (Gtk.MenuItem item) {
 			view.remove_selected_doctor ();
 		}
 		
-		private void on_edit_menuitem_activated (MenuItem item) {
+		private void on_edit_menuitem_activated (Gtk.MenuItem item) {
 			var doctor_editor = new DoctorEditor.with_doctor (resource_manager, doctor);
-			doctor_editor.dialog.set_transient_for (resource_manager.user_interface.window);
+			doctor_editor.set_transient_for (resource_manager.user_interface.window);
 			doctor_editor.run ();
 			doctor_editor.destroy ();
 		}
diff --git a/libclinica/DoctorEditor.vala b/libclinica/DoctorEditor.vala
index 5d611a9..f8b7cbb 100644
--- a/libclinica/DoctorEditor.vala
+++ b/libclinica/DoctorEditor.vala
@@ -22,7 +22,7 @@ using Gtk;
 
 namespace Clinica {
 
-	public class DoctorEditor : GLib.Object {
+	public class DoctorEditor : Dialog {
 	
 		public enum Response {
 			SAVE = 0,
@@ -33,7 +33,6 @@ namespace Clinica {
 	
 		/* Gtk stuff */
 		private Builder     builder;
-		internal Dialog      dialog;
 	
 		/* Entries */
 		private Entry given_name_entry;
@@ -51,13 +50,11 @@ namespace Clinica {
 		    resource_manager = resources;
 			error.connect ((me, message) => resource_manager.error_callback (me, message));
 		
-			builder = new Builder ();
-			try {
-				builder.add_from_file (resource_manager.get_ui_file ("doctor_editor.glade"));
-				dialog = builder.get_object ("doctor_editor") as Dialog;
-			} catch (Error e) {
-				error ("Error loading doctor_editor.glade, check your installation");
-			}
+			builder = new Clinica.Builder.with_filename (resources, "doctor_editor.glade");
+			builder.load_into_dialog (this);
+			
+			/* Pack buttons and content */
+			add_buttons (Stock.CANCEL, Response.CANCEL, Stock.SAVE, Response.SAVE);
 		
 			/* Load entries from the builder */
 			given_name_entry = builder.get_object ("given_name_entry") as Entry;
@@ -87,8 +84,8 @@ namespace Clinica {
 			phone_entry.set_text (doctor.phone);
 			mobile_entry.set_text (doctor.mobile);
 			
-			/* Set title of edit doctor dialog, space is important! */
-			dialog.set_title (_("Edit doctor named %s").printf(doctor.get_complete_name ()));
+			/* Title of edit doctor dialog */
+			set_title (_("Edit doctor named %s").printf (doctor.get_complete_name ()));
 		}
 		
 		/**
@@ -110,11 +107,11 @@ namespace Clinica {
         	return false;
         }
 	
-		public Response run () {
-			if (dialog.run () == Response.SAVE) {
+		public new Response run () {
+			if (base.run () == Response.SAVE) {
 				Doctor doc;
 				if (existing_doctor == null)		
-					doc = new Doctor (resource_manager);
+					doc = new Doctor ();
 				else
 					doc = existing_doctor;
 				
@@ -123,25 +120,15 @@ namespace Clinica {
 				doc.surname    = surname_entry.get_text ();
 				doc.phone      = phone_entry.get_text ();
 				doc.mobile     = mobile_entry.get_text ();
-				doc.save ();
-		
-				if (existing_doctor == null) {
-					created_doctor = doc;
-					resource_manager.doctor_list_store.add_doctor (doc);
-				} else {
-					resource_manager.doctor_list_store.reload_doctor (doc);
-				}
+				int64 new_id = resource_manager.data_provider.save_doctor (doc);
+				
+				created_doctor = resource_manager.data_provider.get_doctor (new_id);
 				
 				return Response.SAVE;
 			}
 			
 			return Response.CANCEL;
 		}
-		
-	
-		public void destroy () {
-			dialog.destroy ();
-		}
 	
 	}
 }
diff --git a/libclinica/DoctorListPage.vala b/libclinica/DoctorListPage.vala
index c2c9bcb..62e4f22 100644
--- a/libclinica/DoctorListPage.vala
+++ b/libclinica/DoctorListPage.vala
@@ -24,33 +24,29 @@ namespace Clinica {
 
     public class DoctorListPage : Alignment, Page {
         
-        private Alignment sidebar;
         private DoctorListView view;
         private VBox left_vbox;
         private ScrolledWindow scrolled_window;
         
         public ResourceManager resource_manager { get; set; }
         
+        private SidebarEntry sidebar_entry;
+        
         /**
          * @brief Page with the list of doctors. 
          */
         public class DoctorListPage (ResourceManager resources) {
-            var hbox = new HBox (false, 6);
             resource_manager = resources;
             
-            connect_signal ();
-            
-            var builder = new Builder ();
+            var builder = new Builder (resources);
             
             try {
-                builder.add_from_file (resources.get_ui_file ("doctor_list_toolbar.glade"));
-                builder.add_from_file (resources.get_ui_file ("doctor_list_sidebar.glade"));
+                builder.add_from_resource ("doctor_list_toolbar.glade");
             } catch (Error e) {
                 error ("Error loading doctor_list_toolbar.glade. Check your installation.");
             }
             
             left_vbox = builder.get_object ("left_vbox") as VBox;
-            sidebar = builder.get_object ("sidebar") as Alignment;
             scrolled_window = builder.get_object ("treeview_scrolled_window") as ScrolledWindow;
             
             /* Get find_entry to filter the doctors */
@@ -58,38 +54,62 @@ namespace Clinica {
             view = new DoctorListView (resource_manager, find_entry);
             scrolled_window.add (view);
             
-            hbox.pack_start (left_vbox, true, true, 0);
-            hbox.pack_start (sidebar, false, true, 0);
+            add (left_vbox);
+            builder.connect_signals (this);
             
-            add (hbox);
+            sidebar_entry = new SidebarPageEntry (resource_manager, this, _("Doctors"),
+                Utils.pixbuf_from_svg_resource (Config.RESOURCE_BASE + "ui/icons/doctors.svg", 
+                Sidebar.ICON_SIZE, Sidebar.ICON_SIZE));
+                
+            var toolbar = new Clinica.Toolbar (resource_manager);
+            populate_toolbar (toolbar);
+           
+            var box = builder.get_object ("top_box") as Gtk.Box;
+            box.pack_start (toolbar, false, true);
             show_all ();
-            builder.connect_signals (this);
         }
         
-        public void setup () {
-            new_title (_("Doctors"));
+        private void populate_toolbar (Toolbar toolbar) {
+            var add_item = new ToolbarItem (resource_manager, 
+                Config.RESOURCE_BASE + "ui/icons/small_plus.png");
+            add_item.activated.connect (on_add_item_activated);
+            add_item.set_tooltip_text (_("Add a doctor"));
+            toolbar.insert (add_item, -1);
+            
+            var edit_item = new ToolbarItem (resource_manager,
+                Config.RESOURCE_BASE + "ui/icons/small_pencil.png");
+            edit_item.activated.connect (on_modify_item_activated);
+            edit_item.set_tooltip_text (_("Edit the selected doctor"));
+            toolbar.insert (edit_item, -1);
+            
+            var remove_item = new ToolbarItem (resource_manager,
+                Config.RESOURCE_BASE + "ui/icons/small_remove_2.png");
+            remove_item.activated.connect (on_remove_item_activated);
+            remove_item.set_tooltip_text (_("Remove the selected doctor"));
+            toolbar.insert (remove_item, -1);
+        }
+        
+        public string get_title () {
+            return _("Doctors");
+        }
+        
+        public SidebarEntry? get_sidebar_entry () {
+            return sidebar_entry;
         }
         
-        [CCode (instance_pos = -1)]
-        public void on_add_button_clicked (Button button) {
+        private void on_add_item_activated (ToolbarItem item) {
         	var new_doc_dialog = new DoctorEditor (resource_manager);
-        	new_doc_dialog.dialog.set_transient_for (resource_manager.user_interface.window);
+        	new_doc_dialog.set_transient_for (resource_manager.user_interface.window);
         	new_doc_dialog.run ();
 			new_doc_dialog.destroy ();
         }
         
-        [CCode (instance_pos = -1)]
-        public void on_back_button_clicked (Button button) {
-            start_page_requested ();
-        }
-        
-        [CCode (instance_pos = -1)]
-        public void on_modify_button_clicked (Button button) {
+        private void on_modify_item_activated (ToolbarItem item) {
         	Doctor? doc = view.get_selected_doctor ();
         	if (doc == null)
         		return;
         	var edit_doc_dialog = new DoctorEditor.with_doctor (resource_manager, doc);
-        	edit_doc_dialog.dialog.set_transient_for (resource_manager.user_interface.window);
+        	edit_doc_dialog.set_transient_for (resource_manager.user_interface.window);
         	edit_doc_dialog.run ();
         	edit_doc_dialog.destroy ();
         }
@@ -99,8 +119,7 @@ namespace Clinica {
          * clicking on the remove button. It handles removal asking
          * user if associated patients should be deleted. 
          */
-        [CCode (instance_pos = -1)]
-        public void on_remove_button_clicked (Button button) {
+        public void on_remove_item_activated (ToolbarItem item) {
  			view.remove_selected_doctor ();
         }
     }
diff --git a/libclinica/DoctorListStore.vala b/libclinica/DoctorListStore.vala
index 2edf31e..e87237b 100644
--- a/libclinica/DoctorListStore.vala
+++ b/libclinica/DoctorListStore.vala
@@ -45,45 +45,67 @@ namespace Clinica {
                                        
             set_column_types (column_headers);
             
+            load_data ();
+        }
+        
+        public void load_data () {            
             /* Asynchronous loading of doctors... */
             Idle.add (() => {
-	            foreach (Doctor doc in Doctor.all (resource_manager)) {
-    	        	add_doctor (doc);
+	            foreach (Doctor doc in resource_manager.data_provider.doctors ()) {
+    	        	add_doctor (doc.id);
     	        }
     	        
+    	        /* Setup callbacks to add or remove doctors */
+		        resource_manager.data_provider.doctor_added.connect (
+		            (id) => add_doctor (id));
+		        resource_manager.data_provider.doctor_changed.connect (
+		            (id) => reload_doctor (id));
+		        resource_manager.data_provider.doctor_removed.connect (
+		            (id) => remove_doctor (id));
+    	        
     	        /* We don't need to execute any more */
     	        return false;
-    	    });
+    	    });        
         }
         
-        public void add_doctor (Doctor doc) {
-        	TreeIter it;
-            append(out it);
-            set_value (it, Field.DOCTOR, doc);
-            set_value (it, Field.GIVEN_NAME, doc.given_name);
-            set_value (it, Field.SURNAME, doc.surname);
-            set_value (it, Field.COMPLETE_NAME, doc.get_complete_name ());
-        }
-        
-        public void reload_doctor (Doctor doc) {
-        	TreeIter it;
-        	Value doctor;
-        	int this_id = doc.get_id ();
+        private TreeIter id_to_iter (int64 id) {
+            TreeIter it;
+            Value doctor;
         	if (!get_iter_first (out it)) {
         		error (_("Doctors database seems corrupted."));
         	}
         	do {
         		get_value (it, Field.DOCTOR, out doctor);
-        		if ((doctor as Doctor).get_id () == this_id) {			
-		            set_value (it, Field.DOCTOR, doc);
-		            set_value (it, Field.GIVEN_NAME, doc.given_name);
-		            set_value (it, Field.SURNAME, doc.surname);
-		            set_value (it, Field.COMPLETE_NAME, doc.get_complete_name ());
-		            return;
+        		if ((doctor as Doctor).id == id) {
+		            return it;
         		}
         	} while (iter_next (ref it));
         	
-        	assert_not_reached ();
+        	return it;
+        }
+        
+        private void add_doctor (int64 id) {
+            Doctor doc = resource_manager.data_provider.get_doctor (id);
+        	TreeIter it;
+            append(out it);
+            set_value (it, Field.DOCTOR, doc);
+            set_value (it, Field.GIVEN_NAME, doc.given_name);
+            set_value (it, Field.SURNAME, doc.surname);
+            set_value (it, Field.COMPLETE_NAME, doc.get_complete_name ());
+        }
+        
+        private void reload_doctor (int64 id) {
+            Doctor doc = resource_manager.data_provider.get_doctor (id);
+            TreeIter it = id_to_iter (id);		
+            set_value (it, Field.DOCTOR, doc);
+		    set_value (it, Field.GIVEN_NAME, doc.given_name);
+		    set_value (it, Field.SURNAME, doc.surname);
+		    set_value (it, Field.COMPLETE_NAME, doc.get_complete_name ());
+        }
+        
+        private void remove_doctor (int64 id) {
+            TreeIter iter = id_to_iter (id);
+            remove (iter);
         }
     }
 }
diff --git a/libclinica/DoctorListView.vala b/libclinica/DoctorListView.vala
index 3fe387a..7543ddb 100644
--- a/libclinica/DoctorListView.vala
+++ b/libclinica/DoctorListView.vala
@@ -80,7 +80,7 @@ namespace Clinica {
             doctor_list_store.get_value (child_iter, DoctorListStore.Field.DOCTOR, out doctor);
             
             DoctorEditor doctor_editor = new DoctorEditor.with_doctor (resource_manager, doctor as Doctor);
-            doctor_editor.dialog.set_transient_for (resource_manager.user_interface.window);
+            doctor_editor.set_transient_for (resource_manager.user_interface.window);
             doctor_editor.run ();
             doctor_editor.destroy ();
         }
@@ -126,7 +126,7 @@ namespace Clinica {
          * @brief Return an iter in the DoctorListStore associated
          * with the current selection, or null
          */
-        private TreeIter? get_selected_iter () {
+        public TreeIter? get_selected_iter () {
         	TreeSelection selection = get_selection ();
         	TreeIter iter;
         	TreeModel model;
@@ -184,7 +184,7 @@ namespace Clinica {
 		    			MessageType.QUESTION, ButtonsType.YES_NO, "%s", "");
 		    			warning_dialog.set_markup(
 		    				_("The doctor that you have selected for removal has some patients associated. \n") +
-		    				_("It's not possible to remove it without removing all his patients.\n\n") +
+		    				_("It's not possible to remove it without disassociating all his patients.\n\n") +
 		    				_("Do you really want to proceed?"));
 		    			warning_dialog.set_title (_("Doctor has associated patients"));
 		    			warning_dialog.set_transient_for (resource_manager.user_interface.window);
@@ -197,18 +197,14 @@ namespace Clinica {
 		    			warning_dialog.destroy ();
 		    			
 		    			/* Get List of the patients to remove and delete them */
-		    			List<TreeIter?> iters = resource_manager.patient_list_store.get_patients_of (doc);
-		    			
-		    			/* This will be used to retrieve data from liststores */
-		    			Value value;
+		    			PatientIterator patients = doc.patients ();
 		    			
 		    			/* Create an array with the names oft he patients 
 		    			 * that will be deleted */
 		    			string [] patient_names = {};
 		    			
-		    			foreach(TreeIter? it in iters) {
-		    				resource_manager.patient_list_store.get_value (it, 0, out value);
-		    				patient_names += " - <b>" + (value as Patient).get_complete_name() + "</b>";
+		    			foreach(Patient p in patients) {
+		    				patient_names += " - <b>" + p.get_complete_name() + "</b>";
 		    			}
 		    			
 		    			/* Warn another time the user that these patients will be deleted and
@@ -216,10 +212,10 @@ namespace Clinica {
 		    			warning_dialog = new MessageDialog(null, DialogFlags.MODAL | DialogFlags.DESTROY_WITH_PARENT,
 		    				MessageType.QUESTION, ButtonsType.YES_NO, "%s", "");
 		    			warning_dialog.set_markup (
-		    				_("The following patients will be deleted by this action:\n") + 
+		    				_("The following patients will be disassociated from this doctor by this action:\n") + 
 		    				string.joinv("\n", patient_names) + "\n" +
 		    				_("Do you really want to proceed?"));
-		    			warning_dialog.set_title (_("Confirm deletion of patients"));
+		    			warning_dialog.set_title (_("Confirm disassociation of patients"));
 		    			warning_dialog.set_transient_for (resource_manager.user_interface.window);
 		    			
 		    			if (warning_dialog.run () != ResponseType.YES) {
@@ -229,11 +225,6 @@ namespace Clinica {
 		    			
 		    			/* If we got here then the user is really sure, so delete the patients */
 		    			warning_dialog.destroy ();
-		    			foreach (TreeIter? it in iters) {
-		    				resource_manager.patient_list_store.get_value (it, 0, out value);
-		    				(value as Patient).remove ();
-		    				resource_manager.patient_list_store.remove (it);
-		    			}
 		    		}
 		    	}
 		    	else {
@@ -251,8 +242,7 @@ namespace Clinica {
 		    	}
 		    	
 		    	/* Proceed with the removal of the doctor */
-		    	doc.remove ();
-		    	resource_manager.doctor_list_store.remove(get_selected_iter ());
+		    	resource_manager.data_provider.remove_doctor (doc);
 		    }
         
         }
diff --git a/libclinica/PatientDetail.vala b/libclinica/EmptyVisitIterator.vala
similarity index 69%
copy from libclinica/PatientDetail.vala
copy to libclinica/EmptyVisitIterator.vala
index 3139b0f..e482d59 100644
--- a/libclinica/PatientDetail.vala
+++ b/libclinica/EmptyVisitIterator.vala
@@ -15,24 +15,16 @@
  *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
  *
  *   Authors: Leonardo Robol <leo at robol.it>
- *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
  */
-
-using Gtk;
-
-namespace Clinica {
-
-	public class PatientDetail : VBox {
-	
-		private Patient patient;
-	
-		public PatientDetail(Patient p) {
-			/* Initial setup */
-			GLib.Object(homogeneous: false);
-			patient = p;
-			
-			pack_start (new Label("boh"));
-		}
-	}
-
-}
+ 
+ namespace Clinica {
+ 
+    public class EmptyVisitIterator : GLib.Object, VisitIterator {
+    
+        public VisitIterator iterator () { return this; }
+        public bool next () { return false; }
+        public new Visit get () { return new Visit (); }
+    
+    }
+ 
+ }
diff --git a/libclinica/Event.vala b/libclinica/Event.vala
index 9dab3c1..9580472 100644
--- a/libclinica/Event.vala
+++ b/libclinica/Event.vala
@@ -15,158 +15,80 @@
  *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
  *
  *   Authors: Leonardo Robol <leo at robol.it>
- *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
+ *            Tommaso Bianucci <churli at gmail.com>
  */
  
+using Jansson;
+
 namespace Clinica {
 
-    public class EventIterator : SqlDataIterator {
+    public class Event : Object {
     
-        private ResourceManager resource_manager { get; set; }
-        
-        public EventIterator (ResourceManager resources) {
-            /* Grab the resource manager and chain the SqlDataIterator constructor,
-             * ordering by date in decreasing order. */
-            base (resources.db, resources.events_table, "date", false);
-            resource_manager = resources;
-        }
-        
-        public EventIterator.with_day (ResourceManager resources, DateTime date, bool descending = true) {
-            base.with_like (resources.db, resources.events_table, "date", descending, 
-                "date BETWEEN '%s' AND '%s'".printf (SqlDataType.datetime_to_string (date),
-                                                     SqlDataType.datetime_to_string (date.add_days (1).add_minutes(-1))));
-            resource_manager = resources;
-        }
-        
-        public new EventIterator iterator () {
-            return this;
-        }
+        public DataProvider? provider = null;
         
-        public new Event get () {
-            return new Event.with_id (resource_manager, base.get ());
-        }
-    }
-
-    public class Event : SqlDataType {
+        public int64 id { get; set; default = 0; }
     
-        private ResourceManager resource_manager { get; set; }
+        public string title { get; set; }
         
-        /* Properties mapped to the database */
-        public string title {
-            get { return get_text ("title"); }
-            set { set_text ("title", value); }
-        }
+        public string description { get; set; }
         
-        public string description {
-            get { return get_text ("description"); }
-            set { set_text ("description", value); }
-        }
-        
-        public string venue {
-            get { return get_text ("venue"); }
-            set { set_text ("venue", value); }
-        }
+        public string venue { get; set; }
         
         /** 
          * @brief Patient associated to this event, if one exists,
          * or null otherwise
          */
-        private Patient? _patient;
-        public Patient? patient {
-            get { 
-                int id = get_integer ("patient");
-                if (id == 0) {
-                    return null;
-                }
-                else {
-                    _patient = new Patient.with_id (resource_manager, id);
-                    return _patient;
-                }
-            }
-            set {
-                if (value != null) {
-                    set_integer ("patient", value.get_id ());
-                    _patient = value;
-                }
-                else {
-                    set_integer ("patient", 0);
-                }
-            }
-        }
-        
+        public Patient? patient { get; set; }
         
         /** 
          * @brief Visit associated to this event, if one exists,
          * or null otherwise
          */
-        private Visit? _visit;
-        public Visit? visit {
-            get { 
-                int id = get_integer ("visit");
-                if (id == 0) {
-                    return null;
-                }
-                else {
-                    _visit = new Visit.with_id (resource_manager, id);
-                    return _visit;
-                }
-            }
-            set {
-                if (value != null) {
-                    set_integer ("visit", value.get_id ());
-                    _visit = value;
-                }
-                else {
-                    set_integer ("visit", 0);
-                }
-            }
-        }
+        public Visit? visit { get; set; }
         
         /**
          * @brief Date associated to this event.
          */
-        private DateTime _date;
-        public DateTime date {
-        	get { 
-        		_date = get_date ("date");
-        		return _date;
-        	}
-        	set {
-        		_date = value;
-        		set_date ("date", _date);
-        	}
-        }
-    
-        public Event (ResourceManager resources) {
-            base (resources.db);
-            resource_manager = resources;
-            error.connect ((t,l) => resources.error_callback(t,l));
-            table_name = resource_manager.events_table;
-            
-            add_text_field ("title");
-            add_text_field ("description");
-            add_text_field ("venue");
-            add_integer_field ("patient");
-            add_integer_field ("visit");
-            add_date_field ("date");
-            
-            init_resources ();
-            
-            visit = null;
-            patient = null;
-        }
-        
-        public Event.with_id (ResourceManager resources, int id) {
-            this (resources);
-            load (id);
-        }
+        public DateTime date { get; set; }
         
-        public static new EventIterator all (ResourceManager resources) {
-            return new EventIterator (resources);
+        internal Event.from_json (Json o, DataProvider? provider = null) {
+            id = o.object_get ("id").integer_value ();
+            title = o.object_get ("title").string_value ();
+            description = o.object_get ("description").string_value ();
+            venue = o.object_get ("venue").string_value ();
+            date = SqliteDataProvider.string_to_datetime (
+                o.object_get ("date").string_value ());
+            
+            if (provider != null) {
+                var patient_id = o.object_get ("patient").integer_value ();
+                if (patient_id != 0) {
+                    patient = provider.get_patient (patient_id);
+                }
+                
+                var visit_id = o.object_get ("visit").integer_value ();
+                if (visit_id != 0) {
+                    visit = provider.get_visit (visit_id);
+                }
+            }
         }
         
-        public static new EventIterator for_day (ResourceManager resources, DateTime date, bool descending = false) {
-            return new EventIterator.with_day (resources, date, descending);
+        internal Json to_json () {
+            var object = Json.object ();
+            
+            object.object_set ("id", Json.integer (id));
+            object.object_set ("title", Json.string (title));
+            object.object_set ("description", Json.string (description));
+            object.object_set ("venue", Json.string (venue));
+            object.object_set ("patient", Json.integer (
+                (patient != null) ? patient.id : 0));
+            object.object_set ("visit", Json.integer (
+                (visit != null) ? visit.id : 0));
+            object.object_set ("date", Json.string (
+                SqliteDataProvider.datetime_to_string (date)));
+            
+            return object;
         }
+    
     }
+
 }
diff --git a/libclinica/EventDetail.vala b/libclinica/EventDetail.vala
index a46b735..d3f336d 100644
--- a/libclinica/EventDetail.vala
+++ b/libclinica/EventDetail.vala
@@ -41,11 +41,11 @@
             resource_manager = resources;
             associated_event = event;
             
-            var main_box = new VBox (false, resources.PADDING);
+            var main_box = new Box (Orientation.VERTICAL, resources.PADDING);
 			events |= EventMask.BUTTON_PRESS_MASK;
             
             /* First adding hour and title in a row */
-            var box = new HBox (false, resources.PADDING);
+            var box = new Box (Orientation.HORIZONTAL, resources.PADDING);
             var hour_label = new Label("%.2d:%.2d".printf (event.date.get_hour(), 
                 event.date.get_minute()));
             hour_label.set_valign (Align.START);
@@ -55,23 +55,26 @@
             title_label.set_alignment (0.0f, 0.5f);
             title_label.set_size_request (120, -1);
             title_label.set_line_wrap (true);
+            title_label.set_valign (Align.START);
             box.pack_start (title_label);
             
             /* Adding action buttons, such as edit and delete */
             var edit_button = new Button ();
-            edit_button.add (new Image.from_file (resource_manager.get_image_file ("calendar_edit.png")));
+            edit_button.add (new Image.from_resource (Config.RESOURCE_BASE + "ui/icons/calendar_edit.png"));
             edit_button.activate.connect ((button) => on_edit_menu_item_activate ());
             edit_button.set_tooltip_text (_("Edit event"));
             edit_button.clicked.connect ((button) => on_edit_menu_item_activate ());
             edit_button.set_relief (ReliefStyle.NONE);
+            edit_button.set_valign (Align.START);
             box.pack_start (edit_button, false, false);
             
             var remove_button = new Button ();
-            remove_button.add (new Image.from_file (resource_manager.get_image_file ("calendar_delete.png")));
+            remove_button.add (new Image.from_resource (Config.RESOURCE_BASE + "ui/icons/calendar_delete.png"));
             remove_button.activate.connect ((button) => on_remove_menu_item_activate ());
             remove_button.clicked.connect ((button) => on_remove_menu_item_activate ());
             remove_button.set_tooltip_text (_("Delete event"));            
             remove_button.set_relief (ReliefStyle.NONE);
+            remove_button.set_valign (Align.START);
             box.pack_start (remove_button, false, false);
             
             box.set_valign (Align.START);
@@ -104,9 +107,9 @@
          */
         private bool on_button_press_event (Widget widget, EventButton event) {
             if (event.button == 3 && event.type == EventType.BUTTON_PRESS) {
-                var popup_menu = new Menu ();
-                var edit_menu_item = new MenuItem.with_label (_("Edit"));
-                var remove_menu_item = new MenuItem.with_label (_("Remove"));
+                var popup_menu = new Gtk.Menu ();
+                var edit_menu_item = new Gtk.MenuItem.with_label (_("Edit"));
+                var remove_menu_item = new Gtk.MenuItem.with_label (_("Remove"));
                 
                 /* Connect callbacks for the item */
                 edit_menu_item.activate.connect (on_edit_menu_item_activate);
@@ -125,19 +128,17 @@
             return false;
         }
         
-        private void on_edit_menu_item_activate (MenuItem? item = null) {
+        private void on_edit_menu_item_activate (Gtk.MenuItem? item = null) {
             var event_editor = new EventEditor (resource_manager, associated_event);
             event_editor.set_transient_for (resource_manager.user_interface.calendar_window);            
             if (event_editor.run () == EventEditor.Response.SAVE) {
-                event_editor.selected_event.save ();
-                resource_manager.event_list_store.remove_event (event_editor.selected_event);
-                resource_manager.event_list_store.add_event (event_editor.selected_event);
+                resource_manager.data_provider.save_event (event_editor.selected_event);
             }
             
             event_editor.destroy ();
         }
         
-        private void on_remove_menu_item_activate (MenuItem? item = null) {
+        private void on_remove_menu_item_activate (Gtk.MenuItem? item = null) {
         	var question = new MessageDialog (null, 
         				DialogFlags.MODAL | DialogFlags.DESTROY_WITH_PARENT, 
         				MessageType.QUESTION, ButtonsType.YES_NO, "%s", 
@@ -149,8 +150,7 @@
        		}
        		question.destroy ();
         		
-            associated_event.remove ();
-            resource_manager.event_list_store.remove_event (associated_event);
+            resource_manager.data_provider.remove_event (associated_event);
         }
     }
  }
diff --git a/libclinica/EventEditor.vala b/libclinica/EventEditor.vala
index cc4674b..2f9cea0 100644
--- a/libclinica/EventEditor.vala
+++ b/libclinica/EventEditor.vala
@@ -89,7 +89,7 @@
             /* If the event is null, let's create a new one, otherwise
              * store the event passed for editing. */
             if (event == null) {
-                selected_event = new Event (resource_manager);
+                selected_event = new Event ();
                 set_title (_("Create a new event"));
             }
             else {
@@ -102,12 +102,13 @@
                          Stock.SAVE,   Response.SAVE);
                          
             /* A vertical box to contain all the widgets */
-            var structure_box = new VBox (false, resource_manager.PADDING);
+            var structure_box = new Box (Orientation.VERTICAL, resource_manager.PADDING);
             
             /* The header, with a picture representing an event and title 
              * and venue. */
-            var event_picture = new Image.from_file (resource_manager.get_image_file ("calendar.svg"));
-            var header_box = new HBox (false, resource_manager.PADDING);
+            var event_picture = new Image.from_pixbuf (
+                Utils.pixbuf_from_svg_resource (Config.RESOURCE_BASE + "ui/icons/calendar.svg", 64, 64));
+            var header_box = new Box (Orientation.HORIZONTAL, resource_manager.PADDING);
             header_box.pack_start (event_picture, false);
             
             /* Create the entry for title of the event and venue */
@@ -118,29 +119,35 @@
             venue_entry = new Entry ();
             
             /* Packing them near the image */
-            var table = new Table (2, 2, false);
-            table.attach (title_label, 0, 1, 0, 1, AttachOptions.FILL, AttachOptions.FILL, 
-                resource_manager.PADDING / 2, resource_manager.PADDING / 2);
-            table.attach (venue_label, 0, 1, 1, 2, AttachOptions.FILL, AttachOptions.FILL, 
-                resource_manager.PADDING / 2, resource_manager.PADDING / 2);
-            table.attach (title_entry, 1, 2, 0, 1, AttachOptions.FILL | AttachOptions.EXPAND, 
-                AttachOptions.FILL, resource_manager.PADDING / 2, resource_manager.PADDING / 2);
-            table.attach (venue_entry, 1, 2, 1, 2, AttachOptions.FILL | AttachOptions.EXPAND, 
-                AttachOptions.FILL, resource_manager.PADDING / 2, resource_manager.PADDING / 2);
+            var table = new Grid ();
+            table.column_spacing = table.row_spacing = resource_manager.PADDING;
+            table.attach (title_label, 0, 0, 1, 1);
+            title_label.hexpand = false; title_label.vexpand = false;
+            
+            table.attach (venue_label, 0, 1, 1, 1);
+            venue_label.hexpand = venue_label.vexpand = false;
+            
+            table.attach (title_entry, 1, 0, 1, 1);
+            title_entry.hexpand = true; 
+            title_entry.vexpand = false;
+            
+            table.attach (venue_entry, 1, 1, 1, 1);
+            venue_entry.hexpand = true;
+            venue_entry.vexpand = false;
                 
             header_box.pack_start (table);
             structure_box.pack_start (header_box, false);
             
             /* Box for calendar and description */
-            var cal_desc_box = new HBox (false, resource_manager.PADDING);
+            var cal_desc_box = new Box (Orientation.HORIZONTAL, resource_manager.PADDING);
             
             /* Create the calendar used to select the date */
             calendar = new Gtk.Calendar ();
             cal_desc_box.pack_start (calendar, false);
                 
             /* Create the hour and minute selector */
-            var desc_hm_box = new VBox (false, resource_manager.PADDING);
-            var hm_box = new HBox (false, resource_manager.PADDING);
+            var desc_hm_box = new Box (Orientation.VERTICAL, resource_manager.PADDING);
+            var hm_box = new Box (Orientation.HORIZONTAL, resource_manager.PADDING);
             hm_box.pack_start (new Label (_("Time:")), false);
             hour_spinbutton = new SpinButton.with_range (0.0, 23.0, 1.0);
             minute_spinbutton = new SpinButton.with_range (0.0, 45.0, 15.0);
@@ -193,14 +200,14 @@
             structure_box.pack_start (cal_desc_box);
             
             /* Adding entries to select the patient and the visit */
-            var patient_visit_box = new Table (2, 2, false);
+            var patient_visit_box = new Grid ();
             
             var patient_label = new Label(_("Patient"));
             patient_entry = new PatientEntry (resource_manager);
-            patient_visit_box.attach (patient_label, 0, 1, 0, 1, AttachOptions.FILL, 
-                AttachOptions.FILL | AttachOptions.EXPAND, 0, 0);
-            patient_visit_box.attach (patient_entry, 1, 2, 0, 1, AttachOptions.FILL | AttachOptions.EXPAND, 
-                AttachOptions.FILL | AttachOptions.EXPAND, 0, 0);
+            patient_visit_box.attach (patient_label, 0, 0, 1, 1);
+            patient_label.vexpand = true; patient_label.hexpand = false;
+            patient_visit_box.attach (patient_entry, 1, 0, 1, 1);
+            patient_entry.expand = true;
             patient_entry.margin_left = resource_manager.PADDING;;
             structure_box.pack_start (patient_visit_box);
                 
@@ -209,7 +216,8 @@
             alignment.set_padding (resource_manager.PADDING, resource_manager.PADDING, 
                 resource_manager.PADDING, resource_manager.PADDING);
             alignment.add (structure_box);
-            (get_content_area () as Container).add (alignment);
+            var content_area = get_content_area ();
+            content_area.add (alignment);
             alignment.show_all ();
             
             set_size_request (520, -1);
@@ -252,7 +260,8 @@
          */
         public void select_patient (Patient patient) {
             patient_entry.select_patient (patient);
-            title_entry.set_text (_("Visit"));
+            if (selected_event == null)
+                title_entry.set_text (_("Visit"));
         }
         
         private void on_response () {
diff --git a/libclinica/PatientDetail.vala b/libclinica/EventIterator.vala
similarity index 52%
copy from libclinica/PatientDetail.vala
copy to libclinica/EventIterator.vala
index 3139b0f..c9bcded 100644
--- a/libclinica/PatientDetail.vala
+++ b/libclinica/EventIterator.vala
@@ -15,24 +15,30 @@
  *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
  *
  *   Authors: Leonardo Robol <leo at robol.it>
- *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
  */
-
-using Gtk;
+ 
+using Sqlite;
 
 namespace Clinica {
+   
+    public class SqliteEventIterator : Object, EventIterator {
+        
+		private SqliteDataProvider provider;
+		private Statement stmt;
 
-	public class PatientDetail : VBox {
-	
-		private Patient patient;
-	
-		public PatientDetail(Patient p) {
-			/* Initial setup */
-			GLib.Object(homogeneous: false);
-			patient = p;
-			
-			pack_start (new Label("boh"));
-		}
-	}
-
+        public SqliteEventIterator (SqliteDataProvider provider, string clause = "") {
+            this.provider = provider;
+            provider.db.prepare ("SELECT id from %s %s ORDER by date DESC;".printf (provider.event_table, clause), 
+                                 -1, out stmt);
+        }
+        
+        public bool next () {
+            return (stmt.step () == ROW);
+        }
+        
+        public new Event get () {
+            int id = stmt.column_int (0);
+            return provider.get_event (id); 
+        }
+    }
 }
diff --git a/libclinica/EventListStore.vala b/libclinica/EventListStore.vala
index 4b090cf..74bf4c1 100644
--- a/libclinica/EventListStore.vala
+++ b/libclinica/EventListStore.vala
@@ -24,9 +24,6 @@
     
     public class EventListStore : ListStore {
     
-        public signal void event_added   (int event_id);
-        public signal void event_removed (int event_id);
-    
         /**
          * @brief Fields present in the store, i.e. header of
          * the columns.
@@ -62,13 +59,43 @@
                 typeof (string), typeof (Patient?), typeof (Visit?), typeof (DateTime) };
                 
             set_column_types (column_headers);
-            GLib.Idle.add (load_events_from_db);
+            load_data ();
+            
+	        /* Setup callbacks to add or remove events */
+	        resource_manager.data_provider.event_added.connect (
+	            (id) => add_event (id));
+	        resource_manager.data_provider.event_changed.connect (
+	            (id) => reload_event (id));
+	        resource_manager.data_provider.event_removed.connect (
+	            (id) => remove_event (id));
+        }
+        
+        public void load_data () {
+            GLib.Idle.add (load_events_from_db);            
+        }
+        
+        /**
+         * @brief Reload information about an event
+         */
+        private void reload_event (int64 id) {
+            var event = resource_manager.data_provider.get_event (id);
+            TreeIter iter = id_to_iter (id);
+            
+            /* Set values in the treeview */
+            set_value (iter, Field.EVENT, event);
+            set_value (iter, Field.DATE, event.date);
+            set_value (iter, Field.DESCRIPTION, event.description);
+            set_value (iter, Field.PATIENT, event.patient);
+            set_value (iter, Field.TITLE, event.title);
+            set_value (iter, Field.VENUE, event.venue);
+            set_value (iter, Field.VISIT, event.visit);
         }
         
         /**
          * @brief Add an event to the liststore.
          */
-        public void add_event (Event event) {
+        public void add_event (int64 id) {
+            var event = resource_manager.data_provider.get_event (id);
             TreeIter iter;
             append (out iter);
             
@@ -80,31 +107,28 @@
             set_value (iter, Field.TITLE, event.title);
             set_value (iter, Field.VENUE, event.venue);
             set_value (iter, Field.VISIT, event.visit);
-            
-            /* Emit event_added to make calendars and other pieces of interface
-             * using events know that they must reload their dates */
-            event_added (event.get_id ());
         }
         
-        public void remove_event (Event event) {
+        public void remove_event (int64 id) {
+            remove (id_to_iter (id));
+        }
+        
+        private TreeIter id_to_iter (int64 id) {
             TreeIter iter;
             Value value;
+            
             if (!get_iter_first (out iter)) {
                 error (_("Events database seems corrupted. This is likely to be a bug in the application"));
             }
             
             do {
                 get_value (iter, Field.EVENT, out value);
-                if ((value as Event).get_id () == event.get_id ()) {
-                    /* Delete this event from the liststore */
-                    int event_id = event.get_id ();
-                    remove (iter);
-                    event_removed (event_id);
-                    return;
+                if ((value as Event).id == id) {
+                    return iter;
                 }
             } while (iter_next (ref iter));
             
-            assert_not_reached ();
+            return iter;
         }
         
         /**
@@ -114,8 +138,8 @@
          * This function is now called by default from the constructor.
          */
         private bool load_events_from_db () {
-            foreach (var event in Event.all (resource_manager)) {
-                add_event (event);
+            foreach (var event in resource_manager.data_provider.events ()) {
+                add_event (event.id);
             }
             
             return false;
diff --git a/libclinica/FileDetail.vala b/libclinica/FileDetail.vala
new file mode 100644
index 0000000..4bd927c
--- /dev/null
+++ b/libclinica/FileDetail.vala
@@ -0,0 +1,140 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
+ */
+ 
+ using Gtk;
+ using Gdk;
+ 
+ namespace Clinica {
+ 
+    public class FileDetail : Gtk.EventBox {
+    
+        /**
+         * @brief Signal emitted when an error occurs.
+         */
+        public signal void error (string message);
+    
+        /**
+         * @brief The FileObject that describes the file that we are displaying.
+         */
+        private FileObject file_object;
+        
+        /** 
+         * @brief The resource manager used to retrieve data about files, patients
+         * and more.
+         */
+        private ResourceManager resource_manager;
+        
+        /**
+         * @brief The maixmum number of characters shown in the file name before
+         * starting to elide characters.
+         */
+        private const int max_chars = 18;
+        
+        /**
+         * @brief The VisitWindow in which we are packed, that will be the parent
+         * of all dialogs.
+         */
+        private VisitPage visit_page;
+        
+        /**
+         * @brief The current FileStore found in the DataProvider implementation.
+         */
+        private FileStore file_store;
+    
+        public class FileDetail (ResourceManager resources, VisitPage page, FileObject object) {
+            resource_manager = resources;
+			events |= EventMask.BUTTON_PRESS_MASK;
+			file_object = object;
+			visit_page = page;
+			
+			file_store = resource_manager.data_provider.get_file_store ();
+			
+			error.connect ((t,l) => resource_manager.error_callback (t,l));
+			
+			var box = new Box (Orientation.HORIZONTAL, resource_manager.PADDING);
+			
+			/* Elide strings if longer than maximum allowed chars */
+			string button_label = object.get_file_name ();
+			if (button_label.length > max_chars) {
+			    button_label = button_label[0:max_chars - 2] + "...";
+            }
+            
+            
+			var open_button = new Button();
+			var button_box = new Box (Orientation.HORIZONTAL, resource_manager.PADDING);
+            
+            /* First get a suitable icon for the file */        
+            try {
+                Icon icon = file_object.get_file ().query_info(FileAttribute.STANDARD_ICON, FileQueryInfoFlags.NONE).get_icon ();
+                button_box.pack_start (new Gtk.Image.from_gicon (icon, IconSize.BUTTON), false, true);
+            } catch (GLib.Error e) {
+                // Nothing to do for now.
+                warning (_("Error while loading icon for file %s: %s").printf (file_object.get_file_name (), e.message));
+            }
+            
+			/* Create the Open File button */
+			var button_text = new Label (button_label);
+			button_text.set_alignment (0.0f, 0.5f);
+			button_box.pack_start (button_text, true, true);
+			
+			open_button.set_relief (ReliefStyle.NONE);
+			open_button.set_tooltip_text (_("Open file"));
+			open_button.clicked.connect (on_open_button_clicked);
+			open_button.activate.connect (on_open_button_clicked);
+			open_button.add (button_box);
+			
+			box.pack_start (open_button, true, true);
+			
+			/* Create the remove file button */
+			var remove_button = new Button ();
+            remove_button.add (new Image.from_resource (Config.RESOURCE_BASE + "ui/icons/calendar_delete.png"));
+            remove_button.activate.connect (on_remove_button_clicked);
+            remove_button.clicked.connect (on_remove_button_clicked);
+            remove_button.set_tooltip_text (_("Delete file"));            
+            remove_button.set_relief (ReliefStyle.NONE);
+            box.pack_start (remove_button, false, false);
+            
+            /* Add the box */
+			add (box);
+        }
+        
+        private void on_remove_button_clicked (Button button) {
+            var dialog = new MessageDialog (resource_manager.user_interface.window,
+                DialogFlags.MODAL | DialogFlags.DESTROY_WITH_PARENT, 
+                MessageType.QUESTION, ButtonsType.YES_NO, "%s", 
+                _("Do you really want to delete the file %s?\nIf you proceed it will be definitively lost.").printf (file_object.get_file_name ()));
+            dialog.set_transient_for (resource_manager.user_interface.window);
+            if (dialog.run () == Gtk.ResponseType.YES) {
+                file_store.remove_file (file_object.get_id (), file_object.get_file_name ());
+            }
+                
+            dialog.destroy ();
+        }
+        
+        private void on_open_button_clicked (Button button) {
+            try {
+                Gtk.show_uri (null, "file://" + file_object.get_file_path (), Gdk.CURRENT_TIME);
+            } catch (GLib.Error e) {
+                error (_("Error while opening the file %s").printf (file_object.get_file_name ()));
+            }
+        }
+    
+    }
+ }
diff --git a/libclinica/FileObject.vala b/libclinica/FileObject.vala
new file mode 100644
index 0000000..e849fb7
--- /dev/null
+++ b/libclinica/FileObject.vala
@@ -0,0 +1,88 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+ 
+ namespace Clinica {
+ 
+    /**
+     * @brief Generic File obtained through the FileStore
+     * interface. 
+     */
+    public class FileObject {
+    
+        /**
+         * @brief The store from which this FileObject was generated.
+         */
+        private FileStore store;
+        
+        /**
+         * @brief The real path of the file in the filtestore.
+         */
+        string path;
+        
+        /**
+         * @brief The ID of the file store where this file is saved.
+         */
+        int64 id;
+        
+        /**
+         * @brief Generate a FileObject starting from an existing file.
+         * A copy of that filed will be stored in the FileStore specified.
+         */
+        public FileObject (FileStore store, int64 id, string filename, bool in_store = false) {
+            this.store = store;
+            this.id = id;
+            if (!in_store)
+                path = store.store_file (id, filename);
+            else
+                path = filename;
+        }
+        
+        /**
+         * @brief Obtain the ID in the file store where the file can
+         * be retrieved.
+         */
+        public int64 get_id () {
+            return id;
+        }
+        
+        /**
+         * @brief Get a path where the file will be accessible. This will be
+         * the real path of the file in the database, so the user is responsible
+         * for overwriting it.
+         */
+        public string get_file_path () {
+            return path;
+        }
+        
+        /**
+         * @brief Return the name of the file (without the full path).
+         */
+        public string get_file_name () {
+            return File.new_for_path (path).get_basename ();
+        }
+        
+        /**
+         * @brief get a GFile associated with this file.
+         */
+        public File get_file () {
+            return File.new_for_path (path);
+        }
+        
+    }
+ }
diff --git a/libclinica/FileStore.vala b/libclinica/FileStore.vala
new file mode 100644
index 0000000..6940d1a
--- /dev/null
+++ b/libclinica/FileStore.vala
@@ -0,0 +1,57 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+ 
+namespace Clinica {
+
+    public interface FileStore : GLib.Object {
+    
+        /**
+         * @brief Signal emitted when the FileStore changes. This invalidates
+         * all the FileObjects around, that must be reloaded.
+         */
+        public signal void changed (int64 id);
+        
+        /**
+         * @brief Signal emitted when something goes wrong :)
+         */
+        public signal void error (string message);
+        
+        /**
+         * @brief Get the path where the files related to the given ID
+         * are stored.
+         */        
+        public abstract string get_id_path (int64 id);
+        
+        /** 
+         * @brief Get the list of files associated to an ID.
+         * This may even be an empty List.
+         */
+        public abstract GLib.List<FileObject> get_files (int64 id);
+        
+        /**
+         * @brief Store a file called filename in the FileStore.
+         */
+        public abstract string store_file (int64 id, string filename);
+        
+        /**
+         * @brief Remove a file from the store.
+         */
+        public abstract void remove_file (int64 id, string filename);
+    }
+}
diff --git a/libclinica/FindEntry.vala b/libclinica/FindEntry.vala
index dd8cde3..8a11dae 100644
--- a/libclinica/FindEntry.vala
+++ b/libclinica/FindEntry.vala
@@ -1,3 +1,23 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
+ */
+
 using Gtk;
 
 namespace Clinica {
diff --git a/libclinica/ImportDialog.vala b/libclinica/ImportDialog.vala
new file mode 100644
index 0000000..f42a99d
--- /dev/null
+++ b/libclinica/ImportDialog.vala
@@ -0,0 +1,52 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+ 
+using Gtk;
+ 
+namespace Clinica {
+
+    public class ImportDialog : Dialog {
+    
+        private ResourceManager resource_manager;
+        
+        private FileChooserButton file_chooser_button;
+    
+        public ImportDialog (ResourceManager resources) {
+            this.resource_manager = resources;
+            
+            add_buttons (Gtk.Stock.CANCEL, ResponseType.CANCEL, Gtk.Stock.OK, ResponseType.ACCEPT);
+            
+            var builder = new Clinica.Builder.with_filename (
+                resource_manager,
+                "import_dialog.glade");
+            builder.load_into_dialog (this);
+            
+            set_title (_("Import data from backup file"));
+            
+            // Load the needed objects from the Builder. 
+            file_chooser_button = builder.get_object ("filechooserbutton") as FileChooserButton;
+        }
+        
+        public string get_filename () {
+            return file_chooser_button.get_filename ();
+        }
+    
+    }
+
+}
diff --git a/libclinica/LocalFileStore.vala b/libclinica/LocalFileStore.vala
new file mode 100644
index 0000000..3ce7486
--- /dev/null
+++ b/libclinica/LocalFileStore.vala
@@ -0,0 +1,195 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+ 
+ namespace Clinica {
+ 
+    /**
+     * @brief Generic store that allows to store files 
+     * with a key based approach. 
+     *
+     * One key correspond to one or more files (or even no 
+     * one).
+     */
+    public class LocalFileStore : GLib.Object, FileStore {
+    
+        /**
+         * @brief The resource manage assoiated with this Clinica application instance.
+         */
+        private ResourceManager resource_manager;
+        
+        /**
+         * @brief List of directories that are monitored by the
+         * GioFileMonitor, so we don't monitor the twice.
+         */
+        private GLib.List<int64?> monitored_ids;
+        
+        public LocalFileStore (ResourceManager resources) {
+            resource_manager = resources;
+            error.connect ((t,l) => resource_manager.error_callback (t,l));
+            
+            monitored_ids = new GLib.List<int64?> ();
+            
+            /* Setup some monitored folders */
+            try {
+                File st = File.new_for_path (resource_manager.get_filestore_dir ());
+                FileEnumerator enumerator = st.enumerate_children (FileAttribute.STANDARD_NAME, FileQueryInfoFlags.NONE);
+                
+                FileInfo info;
+                while ((info = enumerator.next_file ()) != null) {
+                    int64 id = int64.parse (info.get_name ());
+                    if (id.to_string () == info.get_name ()) {
+                        setup_monitor (id);
+                    }
+                }
+
+            } catch (GLib.Error e) {
+                warning (_("Unable to setup file monitors for the filestore folder: %s").printf (e.message));
+            }
+        }
+        
+        /**
+         * @brief Get the path where the files related to the given ID
+         * are stored.
+         */
+        internal string get_id_path (int64 id) {
+            string path = Path.build_filename (resource_manager.get_filestore_dir (),
+                                               id.to_string ());                      
+                                                
+            /* Check that the path exists before returning */
+            File dir_path = File.new_for_path (path);
+            if (!dir_path.query_exists ()) {
+                DirUtils.create_with_parents (path, -1);
+            }
+            
+            /* Setup the monitor on the file so we will get notifications
+             * for created files, that are likely to appear since someone
+             * requested the path explicitly. */
+            setup_monitor (id);
+            
+            return path;
+        }
+        
+        /**
+         * @brief Setup a FileMonitor on the given directory ID, so we
+         * may check for files created in there.
+         */
+        private void setup_monitor (int64 id) {
+            if (monitored_ids.find (id) != null) {
+                return;
+            }
+        
+            File dir_file = File.new_for_path (Path.build_filename (resource_manager.get_filestore_dir (),
+                                                id.to_string ()));
+            
+            try {
+                FileMonitor monitor = dir_file.monitor (FileMonitorFlags.NONE);
+                monitor.changed.connect (on_dir_changed);
+                    
+                monitored_ids.append (id);
+            } catch (GLib.Error e) {
+                warning (_("Unable to setup a file monitor on directory %s").printf (dir_file.get_path ()));
+            }
+        }
+        
+        private void on_dir_changed (File monitored_file, File? other_files, FileMonitorEvent event) {
+            File feasible_dir = monitored_file.get_parent ();
+            int id = int.parse (feasible_dir.get_basename ());
+            if (id != 0)
+                changed (id);
+        }
+        
+        /** 
+         * @brief Get the list of files associated to an ID.
+         * This may even be an empty List.
+         */
+        public GLib.List<FileObject> get_files (int64 id) {
+            // Get the local data directory
+            string this_id_path = get_id_path (id);
+            File d = File.new_for_path (this_id_path);
+            
+            // Prepare the list with the output files
+            GLib.List<FileObject> results = new GLib.List<FileObject> ();
+            
+            if (!d.query_exists ())
+                return results;
+            
+            try {
+                FileEnumerator enumerator = d.enumerate_children (FileAttribute.STANDARD_NAME, FileQueryInfoFlags.NONE);
+            
+                FileInfo info;
+                while ((info = enumerator.next_file ()) != null) {
+                    results.append (new FileObject (this, id,
+                        Path.build_filename (this_id_path, info.get_name ()), true));
+                }
+            } catch (GLib.Error e) {
+                error (_("Error while listing the files for the visit identified by id %d").printf (id));
+            }
+            
+            return results;
+        }
+        
+        /**
+         * @brief Store a file called filename in the FileStore.
+         */
+        public string store_file (int64 id, string filename) {
+            // Source file
+            File source_file = File.new_for_path (filename);
+            
+            // Get the local data directory
+            string this_id_path = Path.build_filename (resource_manager.get_filestore_dir (), id.to_string ());
+            File d = File.new_for_path (this_id_path);
+            
+            if (!d.query_exists ()) {
+                debug ("Creating directory %s".printf (d.get_path ()));
+                GLib.DirUtils.create_with_parents (d.get_path (), -1);
+                
+                setup_monitor (id);
+            }
+                
+            File dest_file = File.new_for_path (Path.build_filename (d.get_path (), source_file.get_basename ()));
+            if (dest_file.query_exists ())
+                warning (_("Destination file already exists"));
+                
+            try {
+                source_file.copy (dest_file, FileCopyFlags.OVERWRITE);
+            } catch (GLib.Error e) {
+                error (_("Error while adding the file %s to the selected visit").printf (source_file.get_basename ()));
+            }
+            
+            /* Emit the changed signal */
+            changed (id);
+            
+            return dest_file.get_path ();
+        }
+        
+        /**
+         * @brief Remove a file from the store.
+         */
+        public void remove_file (int64 id, string filename) {
+            FileUtils.remove (Path.build_filename (resource_manager.get_filestore_dir (),
+                                                   id.to_string (), filename));
+                                                               
+            /* Emit the changed signal */
+            changed (id);
+        }
+    
+    
+    }
+ 
+ }
diff --git a/libclinica/LocalMedicinesDatabase.vala b/libclinica/LocalMedicinesDatabase.vala
new file mode 100644
index 0000000..aaf84ab
--- /dev/null
+++ b/libclinica/LocalMedicinesDatabase.vala
@@ -0,0 +1,383 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+ 
+using Sqlite;
+
+namespace Clinica {
+
+    public class LocalMedicineIter {
+    
+        public int64 id;
+        
+        public Medicine medicine;
+        
+        public LocalMedicineIter (int64 id, Medicine medicine) {
+            this.id = id;
+            this.medicine = medicine;
+        }
+        
+    }
+
+    /**
+     * @brief This class implements a local medicines database than can
+     * be mantained by the user. 
+     *
+     * In general this database will use a different Sqlite database from
+     * the current DataProvider, and the medicines will always be local. 
+     * 
+     * In every case they will be backupped by the BackupEngine, and 
+     * recopied in place after an import.
+     */
+    public class LocalMedicinesDatabase : Object, Gtk.TreeModel, MedicineSearchEngine {
+
+        /**
+         * @brief ResourceManager associated to this Clinica instance. 
+         */
+        public ResourceManager resource_manager { get; set; } 
+        
+        /**
+         * @brief Sqlite.Database where the medicines will stay. Please not
+         * that is a different database from the one with the patient's data. 
+         */
+        private Database db;
+        
+        private int stamp = 0;
+    
+        public LocalMedicinesDatabase (ResourceManager resources) {
+            resource_manager = resources;
+            string db_path = Path.build_filename(resource_manager.get_data_path (),
+                                                 "medicines.db");
+            Sqlite.Database.open (db_path, out db);
+            
+            // Create the table if it does not exists
+            db.exec("""CREATE TABLE IF NOT EXISTS medicines (
+            id INTEGER PRIMARY KEY,
+            name VARCHAR(80),
+            description TEXT,
+            active_ingredient VARCHAR(150),
+            storage_reccomendations TEXT,
+            price VARCHAR(30),
+            other_notes TEXT)""");
+        }
+        
+        public void search_medicine (string key, MedicineTreeView treeview) {
+            // Build the SQL query needed to retrieve the medicines
+            Statement stmt;
+            string sql = """SELECT id FROM medicines WHERE name LIKE "%""" + key + """%" """;
+            
+            db.prepare (sql, -1, out stmt);
+            stmt.bind_text (1, key);
+            
+            while (stmt.step () == ROW) {
+                int64 id = stmt.column_int64 (0);
+                treeview.push_medicine (build_medicine (id));
+            }
+        }
+        
+        /**
+         * @brief Build a medicine from its ID in the database. 
+         */
+        private Medicine? build_medicine (int64 id) {
+            Statement stmt;
+            
+            db.prepare ("""SELECT name, description, active_ingredient, storage_reccomendations, 
+            price, other_notes FROM medicines WHERE id=:id""", -1, out stmt);
+            
+            stmt.bind_int64 (1, id);
+            
+            if (stmt.step() != ROW) {
+                warning(_("Medicine with id = %lld not found in DB: %s"), id, db.errmsg ());
+                return null;
+            }
+            else {
+                var medicine = new Medicine ();
+                medicine.name = stmt.column_text (0);
+                medicine.description = stmt.column_text (1);
+                medicine.active_ingredient = stmt.column_text (2);
+                medicine.storage_reccomendations = stmt.column_text (3);
+                medicine.price = stmt.column_text (4);
+                medicine.other_notes = stmt.column_text (5);
+                
+                return medicine;
+            }
+        }
+        
+        public void add_medicine (Medicine medicine) {
+            Statement stmt;
+            db.prepare ("""INSERT INTO medicines (name, description, active_ingredient, storage_reccomendations, 
+            price, other_notes) VALUES (?, ?, ?, ?, ?, ?);""", -1, out stmt);
+            
+            stmt.bind_text (1, medicine.name);
+            stmt.bind_text (2, medicine.description);
+            stmt.bind_text (3, medicine.active_ingredient);
+            stmt.bind_text (4, medicine.storage_reccomendations);
+            stmt.bind_text (5, medicine.price);
+            stmt.bind_text (6, medicine.other_notes);
+            
+            if (stmt.step() != DONE) {
+                warning (_("Error inserting medicine in the database: %s"), db.errmsg ());
+            }
+            
+            stamp++;
+            
+            var iter = Gtk.TreeIter ();
+            iter.user_data = new LocalMedicineIter (db.last_insert_rowid (), medicine);
+            iter.stamp = stamp;
+            
+            row_inserted (get_path (iter), iter);
+        }
+        
+        public void update_medicine (LocalMedicineIter it, Medicine medicine) {
+            Statement stmt;
+            db.prepare ("""INSERT OR REPLACE INTO medicines (id, name, description, active_ingredient, storage_reccomendations, 
+            price, other_notes) VALUES (?, ?, ?, ?, ?, ?, ?);""", -1, out stmt);
+            
+            stmt.bind_int64 (1, it.id);
+            stmt.bind_text (2, medicine.name);
+            stmt.bind_text (3, medicine.description);
+            stmt.bind_text (4, medicine.active_ingredient);
+            stmt.bind_text (5, medicine.storage_reccomendations);
+            stmt.bind_text (6, medicine.price);
+            stmt.bind_text (7, medicine.other_notes);
+            
+            if (stmt.step() != DONE) {
+                warning (_("Error inserting medicine in the database: %s"), db.errmsg ());
+            }
+            
+            stamp++;
+            
+            var iter = Gtk.TreeIter ();
+            iter.user_data = new LocalMedicineIter (it.id, medicine);
+            iter.stamp = stamp;
+            
+            row_changed (get_path (iter), iter);
+        }
+        
+        public void delete_medicine (LocalMedicineIter it) {
+            Statement stmt;
+            
+            // Create the TreeIter pointing at that medicine
+            var iter = Gtk.TreeIter ();
+            iter.user_data = it;
+            iter.stamp = stamp;
+            var path = get_path (iter);
+            
+            db.prepare ("""DELETE FROM medicines WHERE id=:id""", -1, out stmt);
+            
+            stmt.bind_int64 (1, it.id);
+            
+            if (stmt.step () != DONE) {
+                warning ("Error while deleting medicine from DB");
+            }
+            
+            stamp++;
+            
+            row_deleted (path);
+        }
+        
+        public void abort_search () {
+            // Nothing to do, since our request will return immediately
+            // not having network request to perform. 
+        }
+        
+        public string get_name () {
+            return "Local Medicines Database";
+        }
+        
+        /* IMPLEMENTATION OF THE TREEMODEL INTERFACES */
+        
+        public Type get_column_type (int index_) {
+            if (index_ <= 6)
+                return typeof (string);
+            else
+                return Type.INVALID;
+        }
+        
+        public Gtk.TreeModelFlags get_flags () {
+            return Gtk.TreeModelFlags.LIST_ONLY;
+        }
+        
+        private int get_nth_id (int n) {
+            Statement stmt;
+            
+            db.prepare ("""SELECT id FROM medicines ORDER BY id LIMIT 1 OFFSET :off""", 
+                        -1, out stmt);
+            stmt.bind_int (1, n);
+            if (stmt.step () == ROW) {
+                return stmt.column_int (0);
+            }
+            else {
+                return -1;
+            }
+        }
+        
+        public bool get_iter (out Gtk.TreeIter iter, Gtk.TreePath path) {
+            int [] indices = path.get_indices ();
+            iter = Gtk.TreeIter ();
+            
+            if (indices.length > 1) {
+                return false;
+            }
+            
+            if (indices.length == 1)
+                iter.stamp = stamp;
+            else
+                iter.stamp = -1;
+                
+            if (indices[0] >= 0) {
+                int64 id = get_nth_id (indices[0]);
+                Medicine? medicine = build_medicine (id);
+                if (medicine == null) {
+                    iter.stamp = -1;
+                    iter.user_data = null;
+                }
+                else
+                    iter.user_data = new LocalMedicineIter (id, medicine);
+                
+            }
+
+            return iter.stamp != -1;
+        }
+        
+        public int get_n_columns () {
+            return 6;
+        }
+        
+        public Gtk.TreePath? get_path (Gtk.TreeIter iter) {
+            if (iter.user_data == null) {
+                return null;
+            }
+            else {
+                LocalMedicineIter? it = iter.user_data as LocalMedicineIter;
+                int64 position = -1;
+                
+                Statement stmt;
+                db.prepare ("SELECT COUNT(id) FROM medicines WHERE id < :id", -1, out stmt);
+                stmt.bind_int64 (1, it.id);
+                
+                if (stmt.step () != ROW) {
+                    warning ("Error while fetching position of medicine with id = %lld", it.id);
+                }
+                else {
+                    position = stmt.column_int64 (0);
+                }
+                
+                return new Gtk.TreePath.from_indices (position);
+            }
+        }
+        
+        public void get_value (Gtk.TreeIter iter, int column, out GLib.Value value) {
+                
+            var it = iter.user_data as LocalMedicineIter;
+            Medicine? medicine = it.medicine;
+            
+            value = GLib.Value (typeof (string));
+        
+            switch (column) {
+                case 0:
+                    value = medicine.name;
+                    break;
+                case 1:
+                    value = medicine.description;
+                    break;
+                case 2:
+                    value = medicine.active_ingredient;
+                    break;
+                case 3:
+                    value = medicine.storage_reccomendations;
+                    break;
+                case 4:
+                    value = medicine.price;
+                    break;
+                case 5:
+                    value = medicine.other_notes;
+                    break;
+                default:
+                    value = GLib.Value (Type.INVALID);
+                    break;
+            }
+        }
+        
+        public bool iter_children (out Gtk.TreeIter iter, Gtk.TreeIter? parent) {
+            iter = Gtk.TreeIter ();
+            if (parent == null)  {
+                get_iter (out iter, new Gtk.TreePath.first ());
+                return iter.stamp != -1;
+            }
+            else
+                return false;
+        }
+        
+        public bool iter_has_child (Gtk.TreeIter iter) {
+            return false;
+        }
+        
+        public int iter_n_children (Gtk.TreeIter? iter) {
+            Statement stmt;
+            db.prepare ("""SELECT COUNT(id) FROM medicines""", -1, out stmt);
+            
+            if (stmt.step () == ROW) {
+                return stmt.column_int (0);
+            }
+            else {
+                warning ("Failing query on database: %s", db.errmsg ());
+                return 0;
+            }
+        }
+        
+        public bool iter_next (ref Gtk.TreeIter iter) {
+            Statement stmt;
+            db.prepare ("""SELECT id FROM medicines WHERE id > :base LIMIT 1""", -1, 
+                        out stmt);
+            LocalMedicineIter? it = iter.user_data as LocalMedicineIter;
+            stmt.bind_int64 (1, it.id);
+                        
+            if (stmt.step () == ROW) {
+                int64 new_id = stmt.column_int64(0);
+                iter.user_data = new LocalMedicineIter (new_id, build_medicine (new_id));
+                return true;
+            }
+            else {
+                iter.stamp = -1;
+                return false;
+            }
+        }
+        
+        public bool iter_nth_child (out Gtk.TreeIter iter, Gtk.TreeIter? parent, int n) {
+            if (parent == null) {
+                get_iter (out iter, new Gtk.TreePath.from_indices (n));
+            }
+            else {
+                iter = Gtk.TreeIter ();
+                iter.stamp = -1;
+            }
+            
+            return iter.stamp != -1;
+        }
+        
+        public bool iter_parent (out Gtk.TreeIter iter, Gtk.TreeIter child) {
+            iter = Gtk.TreeIter ();
+            iter.stamp = -1;
+            return false;
+        }
+        
+           
+    }
+
+}
diff --git a/libclinica/MedicineBrowserDialog.vala b/libclinica/MedicineBrowserDialog.vala
new file mode 100644
index 0000000..da795a8
--- /dev/null
+++ b/libclinica/MedicineBrowserDialog.vala
@@ -0,0 +1,89 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+ 
+using Gtk;
+ 
+namespace Clinica {
+
+    public class MedicineBrowserDialog : Gtk.Dialog {
+    
+        private ResourceManager resource_manager { get; set; }
+        
+        private Clinica.Builder builder;
+        
+        private TreeView treeview;
+        
+        public MedicineBrowserDialog (ResourceManager resources) {
+            resource_manager = resources;
+            
+            builder = new Clinica.Builder.with_filename (resources, "medicine_browser.glade");
+            builder.load_into_dialog (this);
+            
+            treeview = builder.get_object ("treeview") as TreeView;
+            treeview.set_model (resource_manager.local_medicines_search_engine);
+            
+            add_buttons (Stock.CLOSE, 0);
+            
+            set_title (_("Local medicine browser"));
+            set_size_request (480, 320);
+            
+            // Connect callbacks to signals
+            var new_toolbutton = builder.get_object ("new_toolbutton") as ToolButton;
+            new_toolbutton.clicked.connect (on_new_toolbutton_activated);
+            
+            var edit_toolbutton = builder.get_object ("edit_toolbutton") as ToolButton;
+            edit_toolbutton.clicked.connect (on_edit_toolbutton_activated);
+            
+            var delete_toolbutton = builder.get_object ("delete_toolbutton") as ToolButton;
+            delete_toolbutton.clicked.connect (on_delete_toolbutton_activated);
+        }
+        
+        private void on_new_toolbutton_activated (ToolButton button) {
+            var new_medicine_dialog = new MedicineEditor (resource_manager);
+            new_medicine_dialog.run ();
+            new_medicine_dialog.destroy ();
+        }
+        
+        private void on_edit_toolbutton_activated (ToolButton button) {
+            TreeModel model;
+            TreeIter iter;
+            
+            var selected = treeview.get_selection ().get_selected (out model, out iter);
+            
+            if (selected) {
+                var new_medicine_dialog = new MedicineEditor (resource_manager, iter.user_data as LocalMedicineIter);
+                new_medicine_dialog.run ();
+                new_medicine_dialog.destroy ();
+            }
+        }
+        
+        private void on_delete_toolbutton_activated (ToolButton button) {            
+            TreeModel model;
+            TreeIter iter;
+            
+            var selected = treeview.get_selection ().get_selected (out model, out iter);
+            
+            if (selected) {
+                resource_manager.local_medicines_search_engine.delete_medicine (iter.user_data as LocalMedicineIter);
+            }
+        }
+        
+    }
+
+}
diff --git a/libclinica/MedicineDetailDialog.vala b/libclinica/MedicineDetailDialog.vala
index 00abd9b..f1a6be4 100644
--- a/libclinica/MedicineDetailDialog.vala
+++ b/libclinica/MedicineDetailDialog.vala
@@ -1,3 +1,22 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+
 using Gtk;
 
 namespace Clinica {
@@ -31,9 +50,9 @@ namespace Clinica {
             
             /* Create the content area with a title on top */
             title = medicine.name;
-            var hbox = new HBox (false, 6);
-            hbox.pack_start (
-                new Image.from_file (resource_manager.get_image_file ("search.svg")), false);
+            var hbox = new Box (Orientation.HORIZONTAL, 6);
+            hbox.pack_start (new Image.from_pixbuf (
+                Utils.pixbuf_from_svg_resource (Config.RESOURCE_BASE + "ui/icons/search.svg", 64, 64)), false);
             var title_label = new Label ("");
             title_label.set_markup ("<big>" + medicine.name + "</big>");
             hbox.pack_start (title_label);
diff --git a/libclinica/MedicineEditor.vala b/libclinica/MedicineEditor.vala
new file mode 100644
index 0000000..6fe89d9
--- /dev/null
+++ b/libclinica/MedicineEditor.vala
@@ -0,0 +1,97 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+ 
+using Gtk;
+
+namespace Clinica {
+
+    public class MedicineEditor : Gtk.Dialog {
+    
+        public enum Response {
+            SAVE = 0,
+            CANCEL
+        }
+    
+        private ResourceManager resource_manager;
+    
+        private Clinica.Builder builder;        
+        
+        private LocalMedicineIter? iter;
+    
+        public MedicineEditor (ResourceManager resources, LocalMedicineIter? iter = null) {
+            resource_manager = resources;
+            this.iter = iter;
+                        
+            builder = new Builder.with_filename (resource_manager, "medicine_editor.glade");
+            builder.load_into_dialog (this);
+            add_buttons (Stock.CANCEL, Response.CANCEL, Stock.SAVE, Response.SAVE);
+
+            if (iter == null)
+                set_title (_("Create a new Medicine"));
+            else {
+                set_title (_("Editing medicine: %s").printf (iter.medicine.name));
+                
+                (builder.get_object ("name_entry") as Entry).set_text (iter.medicine.name);
+                (builder.get_object ("description_entry") as Entry).set_text (iter.medicine.description);
+                (builder.get_object ("active_ingredient_entry") as Entry).set_text (iter.medicine.active_ingredient);
+                (builder.get_object ("price_entry") as Entry).set_text (iter.medicine.price);
+                (builder.get_object ("storage_reccomendations_entry") as Entry).set_text (
+                    iter.medicine.storage_reccomendations);
+                var view = builder.get_object ("other_notes_textview") as TextView;
+                
+                view.get_buffer ().set_text (iter.medicine.other_notes);
+                
+            }
+        }
+        
+        public new Response run () {
+            if (base.run () == Response.SAVE) {
+            
+                var medicine = new Medicine ();
+                medicine.name = (builder.get_object ("name_entry") as Entry).get_text ();
+                medicine.description = (builder.get_object ("description_entry") as Entry).get_text ();
+                medicine.active_ingredient = (builder.get_object ("active_ingredient_entry") as Entry).get_text ();
+                medicine.price = (builder.get_object ("price_entry") as Entry).get_text ();
+                medicine.storage_reccomendations = (builder.get_object ("storage_reccomendations_entry") as Entry).get_text ();
+                
+                var other_notes_textview = builder.get_object ("other_notes_textview") as Gtk.TextView;
+                var buffer = other_notes_textview.get_buffer ();
+                
+                Gtk.TextIter start_iter;
+                Gtk.TextIter end_iter;
+                
+                buffer.get_start_iter (out start_iter);
+                buffer.get_end_iter   (out end_iter);
+                
+                medicine.other_notes = buffer.get_text (start_iter, end_iter, false);
+            
+                if (iter == null)
+                    resource_manager.local_medicines_search_engine.add_medicine (medicine);
+                else
+                    resource_manager.local_medicines_search_engine.update_medicine (iter, medicine);
+                
+                return Response.SAVE;
+            }
+            else
+                return Response.CANCEL;
+        }
+    
+    }
+
+}
diff --git a/libclinica/MedicineSearchEngine.vala b/libclinica/MedicineSearchEngine.vala
index 42ce2d3..6d634ad 100644
--- a/libclinica/MedicineSearchEngine.vala
+++ b/libclinica/MedicineSearchEngine.vala
@@ -1,6 +1,25 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+ 
 namespace Clinica {
 
-    public interface MedicineSearchEngine : UserInterfaceActivatable {
+    public interface MedicineSearchEngine : Object {
     
         /**
          * @brief Return the name of the search engine.
diff --git a/libclinica/MedicineSearchPage.vala b/libclinica/MedicineSearchPage.vala
index a160778..27cea0d 100644
--- a/libclinica/MedicineSearchPage.vala
+++ b/libclinica/MedicineSearchPage.vala
@@ -1,9 +1,30 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+
 using Gtk;
 
 namespace Clinica {
     
     public class MedicineSearchPage : Alignment, Page {
     
+        private delegate void SearchFunction();
+    
         /**
          * @brief Entry used to insert search keys for the 
          * medicines.
@@ -16,37 +37,30 @@ namespace Clinica {
          */
         public MedicineTreeView treeview;
         
+        /**
+         * @brief The key that is being searched.
+         */
         private string key;
         
         public ResourceManager resource_manager { get; set; }
         
-        private unowned MedicineSearchEngine? selected_search_engine = null;
-        
         /**
-         * @brief Button that brings back to the main page or stop searches if they
-         * are running. 
+         * @brief This is the selected search engine, used to retrieve the result
+         * that the user asks. 
          */
-        private Button back_button;
+        private unowned List<MedicineSearchEngine> selected_search_engines;
+        
+        private SidebarEntry sidebar_entry;
         
         public MedicineSearchPage (ResourceManager resources) {
             resource_manager = resources;
-            connect_signal ();
             
-            var main_vbox = new VBox (false, 5);
+            var main_vbox = new Box (Orientation.VERTICAL, resource_manager.PADDING);
             
             /* Add a search bar on top */
             find_entry = new FindEntry ();
             find_entry.activate.connect (on_find_entry_activate);
-
-            /* And the button to go back */
-            back_button = new Button.with_label (_("Back"));
-            back_button.clicked.connect (on_back_button_clicked);
-            
-            /* Creating the search box */
-            var search_box = new HBox (false, 5);
-            search_box.pack_start (find_entry);
-            search_box.pack_start (back_button, false);
-            main_vbox.pack_start (search_box, false);
+            main_vbox.pack_start (find_entry, false);
             
             /* And the treeview just below */
             treeview = new MedicineTreeView (resource_manager);
@@ -58,28 +72,19 @@ namespace Clinica {
             /* Show all the items added to this VBox */
             add (main_vbox);
             show_all ();
-        }
-        
-        /**
-         * @brief Callback called when the used click on the back button.
-         */
-        private void on_back_button_clicked (Button back_button) {
-            if (find_entry.is_sensitive ())
-                start_page_requested ();
-            else {
-                selected_search_engine.abort_search ();
-                find_entry.set_sensitive (true);
-                (back_button.get_child () as Label).set_text (_("Back"));
-            }
+            
+            sidebar_entry = new SidebarPageEntry (resource_manager, this, _("Search medicines"),
+                Utils.pixbuf_from_svg_resource (Config.RESOURCE_BASE + "ui/icons/search.svg", 
+                Sidebar.ICON_SIZE, Sidebar.ICON_SIZE));
         }
         
         /**
          * @brief Callback called when the user want to search for a Medicine.
          */
-        private void on_find_entry_activate (Editable e) {
+        private void on_find_entry_activate (Entry e) {
             /* Select the right search engine */
-            selected_search_engine = resource_manager.settings.get_medicine_search_engine ();
-            if (selected_search_engine == null) {
+            selected_search_engines = resource_manager.settings.get_medicine_search_engines ();
+            if (selected_search_engines.length () == 0) {
                 debug ("No search engine available");
                 
                 /* Tell to the user that a plugin is needed */
@@ -87,6 +92,7 @@ namespace Clinica {
                     DialogFlags.MODAL,
                     MessageType.INFO,
                     ButtonsType.OK,
+                    "%s",
                     _("It's not possible to perform a search for medicine
 since no search engine is available.
 You should enable a search engine in the plugins
@@ -101,30 +107,38 @@ to solve this issue."));
             key = find_entry.get_text ();
             find_entry.set_text (_("Searching for %s...").printf (key));
             find_entry.set_sensitive (false);
-            (back_button.get_child () as Label).set_text (_("Stop"));
             treeview.clear ();
             /* And start the research in another thread */
             try {
-                Thread<void>.create<void> (this.do_search, false);
+                new Thread<void*>.try ("MedicineSearchPage", this.do_search);
             } catch (GLib.Error e) {
-                // FIXME: Add the error handler.
+                warning ("Failed to start the Medicine search thread");
             }
         }
         
         /**
          * @brief Function that performs the search, spawned in another thread.
          */
-        private void do_search () {
-            selected_search_engine.search_medicine (key, treeview);
-                
-            Gdk.threads_enter ();                
-            find_entry.set_sensitive (true);
-            find_entry.set_text ("");
-            Gdk.threads_leave ();
+        private void* do_search () {
+            GLib.Idle.add (() => {
+                find_entry.set_sensitive (true);
+                find_entry.set_text ("");
+                return false;
+            });
+            
+            // Trigger searches
+            foreach (var search_engine in selected_search_engines) {
+                search_engine.search_medicine (key, treeview);
+            }
+            return null;
+        }
+        
+        public string get_title () {
+            return _("Medicines");
         }
         
-        public void setup () {
-            new_title (_("Medicine search"));
+        public SidebarEntry? get_sidebar_entry () {
+            return sidebar_entry;
         }
 
     }
diff --git a/libclinica/MedicineTreeView.vala b/libclinica/MedicineTreeView.vala
index 39b2d62..fac4b99 100644
--- a/libclinica/MedicineTreeView.vala
+++ b/libclinica/MedicineTreeView.vala
@@ -1,3 +1,22 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+
 using Gtk;
 
 namespace Clinica {
@@ -15,7 +34,7 @@ namespace Clinica {
             
             /* Create necessary columns */
             var name_renderer = new CellRendererText ();
-            insert_column_with_attributes (0, _("Name"), name_renderer, "text", 0);
+            insert_column_with_attributes (0, _("Medicine name"), name_renderer, "text", 0);
             
             var price_renderer = new CellRendererText ();
             insert_column_with_attributes (1, _("Price"), price_renderer, "text", 1);
@@ -49,14 +68,15 @@ namespace Clinica {
          * MUST BE CALLED FROM ANOTHER THREAD!
          */
         public void push_medicine (Medicine medicine) {
-            Gdk.threads_enter ();
-            TreeIter iter;
-            medicine_store.append (out iter);
-            
-            medicine_store.set_value (iter, 0, medicine.name);
-            medicine_store.set_value (iter, 1, medicine.price);
-            medicine_store.set_value (iter, 2, medicine);
-            Gdk.threads_leave ();
+            GLib.Idle.add (() => {
+                TreeIter iter;
+                medicine_store.append (out iter);
+                
+                medicine_store.set_value (iter, 0, medicine.name);
+                medicine_store.set_value (iter, 1, medicine.price);
+                medicine_store.set_value (iter, 2, medicine);
+                return false;
+            });
         }
     }
 }
diff --git a/libclinica/NetworkedDataProvider.vala b/libclinica/NetworkedDataProvider.vala
new file mode 100644
index 0000000..380bfee
--- /dev/null
+++ b/libclinica/NetworkedDataProvider.vala
@@ -0,0 +1,608 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+  
+using Jansson;
+ 
+namespace Clinica {
+
+    public enum RpcType {
+        STRING = 1,
+        INTEGER,
+        JSON_OBJECT
+    }
+ 
+    internal class NetworkedDoctorIterator : Object, DoctorIterator {
+    
+        private Json array;
+        
+        private uint counter;
+        
+        private NetworkedDataProvider provider;
+    
+        public class NetworkedDoctorIterator (NetworkedDataProvider provider, Json node) {
+            this.provider = provider;
+            array = node;
+            counter = array.array_size ();
+        }
+        
+        public bool next () {
+            if (counter == 0) {
+                return false;
+            }
+            else {
+                counter -= 1;
+                return true;
+            }
+        }
+        
+        public new Doctor get () {
+            var id_element = array.array_get ((int) counter);
+            return provider.get_doctor (id_element.integer_value ());
+        }
+    
+    }
+ 
+    internal class NetworkedPatientIterator : Object, PatientIterator {
+    
+        private Json array;
+        
+        private uint counter;
+        
+        private NetworkedDataProvider provider;
+        
+        public NetworkedPatientIterator (NetworkedDataProvider provider, Json node) {
+            this.provider = provider;
+            array = node;
+            counter = array.array_size ();
+        }
+        
+        public bool next () {
+            if (counter == 0) {
+                return false;
+            }
+            else {
+                counter -= 1;
+                return true;
+            }
+        }
+        
+        public new Patient get () {
+            var id_element = array.array_get ((int) counter);
+            return provider.get_patient (id_element.integer_value ());
+        }
+    
+    }
+ 
+    internal class NetworkedVisitIterator : Object, VisitIterator {
+    
+        private Json array;
+        
+        private uint counter;
+        
+        private NetworkedDataProvider provider;
+    
+        public NetworkedVisitIterator (NetworkedDataProvider provider, Json node) {
+            this.provider = provider;
+            array = node;
+            counter = array.array_size ();
+        }
+        
+        public bool next () {
+            if (counter == 0) {
+                return false;
+            }
+            else {
+                counter -= 1;
+                return true;
+            }
+        } 
+        
+        public new Visit get () {
+            var id_element = array.array_get ((int) counter);
+            return provider.get_visit (id_element.integer_value ());
+        }
+        
+    }
+    
+    internal class NetworkedEventIterator : Object, EventIterator {
+    
+        private Json array;
+        
+        private uint counter;
+        
+        private NetworkedDataProvider provider;
+    
+        public NetworkedEventIterator (NetworkedDataProvider provider, Json node) {
+            this.provider = provider;
+            array = node;
+            counter = array.array_size ();
+        }
+        
+        public bool next () {
+            if (counter == 0) {
+                return false;
+            }
+            
+            counter -= 1;
+            return true;
+        }
+        
+        public new Event get () {
+            var id_element = array.array_get ((int) counter);
+            return provider.get_event (id_element.integer_value ());
+        }
+    
+    }
+ 
+    public class NetworkedDataProvider : GLib.Object , DataProvider {
+    
+        /**
+         * @brief Return the name of the DataProvider. 
+         */
+        public string get_name () { return "Network Data Provider"; }
+        
+        /**
+         * @brief True if a connection was established with the remote Clinica
+         * server. 
+         * 
+         * If connected is false, i.e. if connect() method has never
+         * been called or the connection has been dropped for some reason then
+         * the NetworkedDataProvider will not return any result.
+         */
+        internal bool connected { get; private set; }
+        
+        /**
+         * @brief The SoupSession used to communicate with the server. 
+         */
+        private Soup.Session? session = null;
+        
+        /**
+         * @brief The base URL used for the request. Could be, for example, 
+         * http://192.168.0.4:20843/. 
+         */
+        private string base_url;
+        
+        /**
+         * @brief The URL used for RPC requests.
+         */
+        private string rpc_url;
+        
+        private ResourceManager resource_manager;
+        
+        internal string username = "";
+        
+        internal string password = "";
+        
+        private int64 request_id = 0;
+        
+        public NetworkedDataProvider (ResourceManager resources) {
+            resource_manager = resources;
+        }
+        
+        ~NetworkedDataProvider () {
+            debug ("Freeing NetworkedDataProvider");
+        }
+        
+        public void disconnect_from_server () {
+            connected = false;
+            session = null;
+        }
+        
+        public bool connect_to_server (string hostname, int port = 20843) {
+            if (session != null) {
+                warning ("connect_to_server() has been called without calling disconnect_from_server() first, calling it now");
+                disconnect_from_server ();
+            }
+            
+            session = new Soup.SessionAsync ();
+            
+            session.authenticate.connect (this.perform_authentication);
+            
+            /* Try the connection to the server to make sure that it is
+             * reachable */
+            base_url = "http://" + hostname + ":" + port.to_string () + "/";
+            rpc_url = base_url + "rpc/";
+            var msg = new Soup.Message ("GET", base_url);
+            session.send_message (msg);
+
+            if (msg.response_body.data == null) {
+                connected = false;
+                return false;
+            }
+            
+            connected = true;
+            
+            debug ("Connected to the clinica server that answered: %s", (string) msg.response_body.data);
+            
+            // Perform authentication
+            var auth_dialog = new AuthenticationDialog (resource_manager);
+            if (auth_dialog.run () == Gtk.ResponseType.OK) {
+                username = auth_dialog.get_username ();
+                password = auth_dialog.get_password ();
+                auth_dialog.destroy ();
+            }
+            else {
+                auth_dialog.destroy ();
+                debug ("Switching to Sqlite database");
+                var info_dialog = new Gtk.MessageDialog (null,
+                    Gtk.DialogFlags.DESTROY_WITH_PARENT | Gtk.DialogFlags.MODAL,
+                    Gtk.MessageType.INFO, Gtk.ButtonsType.OK,
+                    "%s", _("You canceled the authentication process on the remote server.\nFrom now on Clinica will use the local database. If you want to connect to\nremote server please re-enable networking in the settings dialog."));
+                info_dialog.run ();
+                info_dialog.destroy ();
+                resource_manager.select_data_provider (resource_manager.sqlite_data_provider);
+                disconnect_from_server ();
+            }
+            
+            return connected;
+        }
+        
+        private void perform_authentication (Soup.Session session, Soup.Message msg, Soup.Auth auth, 
+            bool retrying) {
+            auth.authenticate (username, password);
+        }
+         
+        public bool try_authentication (string host, string port, string username, string password) {
+                // Try to authenticate to the remote server to check if the password
+                // is correct
+                bool pw_correct = true;
+                var session = new Soup.SessionAsync ();
+                var msg = new Soup.Message ("POST", "http://%s:%s/rpc/".printf (
+                    host, port));
+                session.authenticate.connect ((session, msg, auth, retrying) => {
+                    if (retrying) {
+                        pw_correct = false;
+                        session.cancel_message (msg, 500);
+                    }
+                    else
+                        auth.authenticate (username, password);
+                });
+                session.send_message (msg);        
+                
+                return pw_correct;
+        }   
+        
+        private bool check_connection () {
+            if (!connected) {
+                warning ("Calling a method of NetworkedDataProvider before connect_to_server(), aborting");
+                return false;
+            }
+            
+            return true;
+        }
+        
+        private string api_request (string method, ...) {
+            Json? params = Json.object ();
+            var l = va_list ();
+            
+            while (true) {
+                RpcType type = l.arg ();
+                
+                if (type == 0)
+                    break;
+                
+                string param_name = l.arg ();
+                switch (type) {
+                    case RpcType.INTEGER:
+                        int64 value = l.arg ();
+                        params.object_set (param_name, Json.integer (value));
+                        break;
+                    case RpcType.STRING:
+                        string value = l.arg ();
+                        params.object_set (param_name, Json.string (value));
+                        break;
+                    case RpcType.JSON_OBJECT:
+                        Json? value = l.arg ();
+                        if (value != null)
+                            params.object_set (param_name, value);
+                        break;
+                }
+            }
+
+            Json? root = Json.object ();
+            
+            root.object_set ("jsonrpc", Json.string ("2.0"));
+            root.object_set ("method", Json.string (method));
+            root.object_set ("params", params);
+            root.object_set ("id", Json.integer (request_id++));
+            
+            return post_message (root.dumps ());
+        }
+        
+        private string post_message (string json_data) {
+            var msg = new Soup.Message ("POST", rpc_url);
+            msg.set_request ("text/html", Soup.MemoryUse.COPY, 
+                json_data.data);
+            session.send_message (msg);
+            return (string) msg.response_body.data;
+        }
+        
+        public Visit? get_visit (int64 id) {
+            if (!check_connection()) {
+                return null;
+            }
+            
+            var response = api_request ("get_visit", 
+                RpcType.INTEGER, "id", id);
+                
+            Jansson.Error error;
+            return new Visit.from_json (Json.loads (response, 0, out error).object_get ("result"), this);
+        }
+        
+        public int64 save_visit (Visit visit) {
+        
+            var response = api_request ("save_visit", 
+                RpcType.JSON_OBJECT, "visit", visit.to_json ());
+                
+            Jansson.Error error;
+            var root = Json.loads (response, 0, out error).object_get ("result");
+            var id = root.object_get ("id").integer_value ();
+            if (visit.id == 0) {
+                visit.id = id;
+                visit_added (id);
+            }
+            else
+                visit_changed (id);
+            return id;
+        }
+        
+        public int64 remove_visit (Visit visit) {
+            if (!check_connection ())
+                return -1;
+
+            var response = api_request ("remove_visit", RpcType.INTEGER, "id", visit.id);
+            
+            Jansson.Error error;
+            Json? response_root = Json.loads (response, 0, out error);
+            if (response_root == null)
+                return -1;
+            
+            Json? error_el = response_root.object_get ("error");
+            if (! error_el.is_null ())
+                return -1;
+                
+            visit_removed (visit.id);
+            return 0;
+        }
+        
+        public VisitIterator visits (Patient? patient = null, DateTime? start = null, 
+                                     DateTime? end = null, DataProvider.SortOrder order = DataProvider.SortOrder.DESCENDING) {
+            if (!check_connection ()) {
+                var empty_array = Json.array ();
+                return new NetworkedVisitIterator (this, empty_array);
+            }
+            
+            string response = "";
+            if (patient == null)
+                response = api_request ("visits",
+                    RpcType.STRING, "start_date", (start == null) ? "" : SqliteDataProvider.datetime_to_string (start),
+                    RpcType.STRING, "end_date", (end == null) ? "" : SqliteDataProvider.datetime_to_string (end));
+            else
+                response = api_request ("visits",
+                    RpcType.INTEGER, "patient", patient.id,
+                    RpcType.STRING, "start_date", (start == null) ? "" : SqliteDataProvider.datetime_to_string (start),
+                    RpcType.STRING, "end_date", (end == null) ? "" : SqliteDataProvider.datetime_to_string (end));
+            
+            Jansson.Error error;
+            var node = Json.loads (response, 0, out error);
+            
+            return new NetworkedVisitIterator (this, node.object_get ("result"));
+        }
+        
+        public Patient? get_patient (int64 id) {
+            if (!check_connection ())
+                return null;
+
+            var response = api_request ("get_patient", RpcType.INTEGER, "id", id);
+            
+            Jansson.Error error;
+            var node = Json.loads (response, 0, out error);
+            
+            var patient = new Patient.from_json (node.object_get ("result"), this);
+            return patient;
+        }
+        
+        public int64 save_patient (Patient patient) {
+            var response = api_request ("save_patient", 
+                RpcType.JSON_OBJECT, "patient", patient.to_json ());
+            Jansson.Error error;
+            var id = Json.loads (response, 0, out error).object_get ("result")
+                .object_get ("id").integer_value ();
+            if (patient.id == 0) {
+                patient.id = id;
+                patient_added (id);
+            }
+            else
+                patient_changed (id);
+            return id;
+        }
+        
+        public int64 remove_patient (Patient patient) {
+            if (!check_connection ())
+                return -1;
+
+            var response = api_request ("remove_patient", RpcType.INTEGER, "id", patient.id);
+            
+            Jansson.Error error;
+            Json? response_root = Json.loads (response, 0, out error);
+            if (response_root == null)
+                return -1;
+            
+            Json? error_el = response_root.object_get ("error");
+            if (! error_el.is_null ())
+                return -1;
+                
+            patient_removed (patient.id);
+            return 0;
+        }
+        
+        public PatientIterator patients (Doctor? doctor = null) {
+            if (!check_connection ()) {
+                var node = Json.array ();
+                return new NetworkedPatientIterator (this, node);
+            }
+            
+            string response;
+            if (doctor != null)
+                response = api_request ("patients", 
+                    RpcType.INTEGER, "doctor", doctor.id);
+            else
+                response = api_request ("patients");
+                
+            Jansson.Error error;
+            var node = Json.loads (response, 0, out error);
+                
+            if (node == null) {
+                return new NetworkedPatientIterator (this, Json.array ());
+            }
+            
+            return new NetworkedPatientIterator (this, node.object_get ("result"));
+        }
+        
+        public Doctor? get_doctor (int64 id) {
+            if (!check_connection ())
+                return null;
+
+            var response = api_request ("get_doctor", RpcType.INTEGER, "id", id);
+            Jansson.Error error;
+            var node = Json.loads (response, 0, out error);
+            var doctor = new Doctor.from_json (node.object_get ("result"), this);
+            
+            return doctor;
+        }
+        
+        public int64 save_doctor (Doctor doctor) {
+            var response = api_request ("save_doctor", RpcType.JSON_OBJECT, "doctor", 
+                doctor.to_json ());
+            Jansson.Error error;
+            var id = Json.loads (response, 0, out error).object_get ("result")
+                .object_get ("id").integer_value ();
+            if (doctor.id == 0) {
+                doctor.id = id;
+                doctor_added (id);
+            }
+            else
+                doctor_changed (id);
+            return id;
+        }
+        
+        public int64 remove_doctor (Doctor doctor) {
+            if (!check_connection ())
+                return -1;
+                
+            var response = api_request ("remove_doctor", RpcType.INTEGER, "id", 
+                doctor.id);
+            
+            Jansson.Error error;
+            Json? response_root = Json.loads (response, 0, out error);
+            if (response_root == null)
+                return -1;
+            
+            Json? error_el = response_root.object_get ("error");
+            if (! error_el.is_null ())
+                return -1;
+                
+            doctor_removed (doctor.id);
+            return 0;
+        }
+        
+        public DoctorIterator doctors () {
+            if (!check_connection ()) {
+                var node = Json.array ();
+                return new NetworkedDoctorIterator (this, node);
+            }
+            
+            var response = api_request ("doctors");
+            Jansson.Error error;
+            var node = Json.loads (response, 0, out error);
+            
+            if (node == null) {
+                return new NetworkedDoctorIterator (this, Json.array ());
+            }
+            
+            return new NetworkedDoctorIterator (this, node.object_get ("result"));
+        }
+        
+        public Event? get_event (int64 id) {
+            if (!check_connection ())
+                return null;
+
+            var response = api_request ("get_event", RpcType.INTEGER, "id", id);
+            
+            Jansson.Error error;
+            var event = new Event.from_json (Json.loads (response, 0, out error).object_get ("result"), this);
+            
+            return event;
+        }
+        
+        public int64 save_event (Event event) {
+            var response = api_request ("save_event", RpcType.JSON_OBJECT,
+                "event", event.to_json ());
+            Jansson.Error error;
+            var id = Json.loads (response, 0, out error).object_get ("result")
+                .object_get ("id").integer_value ();
+            if (event.id == 0) {
+                event.id = id;
+                event_added (id);
+            }
+            else
+                event_changed (id);
+            return id;
+        }
+        
+        public int64 remove_event (Event event) {
+            if (!check_connection ())
+                return -1;
+
+            var response = api_request ("remove_event", RpcType.INTEGER, "id", event.id);
+            
+            Jansson.Error error;
+            Json? response_root = Json.loads (response, 0, out error);
+            if (response_root == null)
+                return -1;
+            
+            Json? error_el = response_root.object_get ("error");
+            if (! error_el.is_null ())
+                return -1;
+            
+            event_removed (event.id);
+            return 0;
+        }
+        
+        public EventIterator events (DateTime? from = null, DateTime? to = null) {
+            if (!check_connection ()) {
+                var empty_array = Json.array ();
+                return new NetworkedEventIterator (this, empty_array);
+            }
+            
+            var response = api_request ("events", 
+                RpcType.STRING, "start_date", (from == null) ? "" : SqliteDataProvider.datetime_to_string (from),
+                RpcType.STRING, "end_date", (to == null) ? "" : SqliteDataProvider.datetime_to_string (to));
+
+            Jansson.Error error;
+            var node = Json.loads (response, 0, out error);
+                
+            if (node == null) {
+                return new NetworkedEventIterator (this, Json.array ());
+            }
+            
+            return new NetworkedEventIterator (this, node.object_get ("result"));
+        }
+    } 
+}
diff --git a/libclinica/Page.vala b/libclinica/Page.vala
index f10d8a0..919f2ef 100644
--- a/libclinica/Page.vala
+++ b/libclinica/Page.vala
@@ -31,26 +31,37 @@ namespace Clinica {
      * is add-able in the main-align. 
      */
     public interface Page : Alignment {
-    	public signal void start_page_requested ();
-    	public signal void patient_list_requested ();
-    	public signal void doctor_list_requested ();
-    	public signal void medicines_search_page_requested ();
-    	public signal void calendar_window_requested ();
-        public signal void error (string message);
-        public signal void new_title (string title);
-        public abstract ResourceManager resource_manager { get; set; }
+    
+        /**
+         * @brief Return the title to be displayed in the Clinica
+         * window when this page is loaded. 
+         */
+        public abstract string get_title ();
+        
+        /**
+         * @brief Get a SidebarEntry to be displayed when this page is
+         * loaded.
+         *
+         * Return null if you do not want a SidebarEntry for this
+         * page (this is the default implementation). 
+         */
+        public virtual SidebarEntry? get_sidebar_entry () {
+            return null;
+        }
         
-        public void connect_signal () {
-        	error.connect (resource_manager.user_interface.error_callback);
-        	start_page_requested.connect((t) => resource_manager.user_interface.show_start_page ());
-        	patient_list_requested.connect((t) => resource_manager.user_interface.show_patient_list_page());
-        	doctor_list_requested.connect((t) => resource_manager.user_interface.show_doctor_list_page());
-        	medicines_search_page_requested.connect ((t) => resource_manager.user_interface.show_medicines_search_page ());
-        	calendar_window_requested.connect ((t) => resource_manager.user_interface.show_calendar_window ());
-        	new_title.connect((t, title) => resource_manager.user_interface.window.set_title(title));
+        /**
+         * @brief Return the Parent entry of the Sidebar entry 
+         * obtained from the get_sidebar_entry () method.
+         *
+         * The new sidebar will be attached below its parent, 
+         * or on top-level if null is returned (this is the default
+         * implementation). 
+         */
+        public virtual SidebarEntry? get_parent_entry () {
+            return null;
         }
         
-        public abstract void setup ();
+        public abstract ResourceManager resource_manager { get; set; }
     }
 
 }
diff --git a/libclinica/Patient.vala b/libclinica/Patient.vala
index ab9ea0f..c900ae4 100644
--- a/libclinica/Patient.vala
+++ b/libclinica/Patient.vala
@@ -15,173 +15,97 @@
  *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
  *
  *   Authors: Leonardo Robol <leo at robol.it>
- *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
  */
- 
- using Gee;
- using Sqlite;
- 
- namespace Clinica {
+  
+using Jansson;
+
+namespace Clinica {
  
     public enum Gender {
         MALE,
         FEMALE,
     }
+
+    public class Patient : Object {
     
-    public class PatientIterator : SqlDataIterator {
-		private ResourceManager resource_manager;
-        public PatientIterator (ResourceManager resources) {
-            base (resources.db, resources.patient_table);
-            resource_manager = resources;
-        }
-        
-        public new PatientIterator iterator () { return this; }
-        
-        public new Patient get () {
-            return new Patient.with_id (resource_manager, base.get ());
-        }
-    }
- 
-    /**
-     * @brief A Patient object represent a person
-     * whose data are stored in the database (or
-     * are going to be stored soon).
-     */
-    public class Patient : SqlDataType {
+        public DataProvider? provider = null; 
     
-        /**
-         * @brief Doctor associated to this patient. 
-         */
-        private Doctor? _doctor;
-        public Doctor? doctor {
-        	get {
-        		/* Always reload the doctor to make edits available immediately */
-        		if (get_integer ("doctor") == -1)
-        		    return null;
-          		this._doctor = new Doctor.with_id (resource_manager, get_integer ("doctor"));
-        		return this._doctor;
-        	}
-        	set {
-        		this._doctor = value;
-        		if (_doctor == null)
-        		    set_integer ("doctor", -1);
-                else
-            		set_integer("doctor", value.get_id ());
-        	}
-        }
+        public int64 id { get; set; default = 0; }
+    
+        public string given_name { get; set; }
         
-        /* FIELDS */
-        public string given_name {
-        	get { return get_text ("given_name"); }
-        	set { set_text ("given_name", value); }
-        }
+        public string surname { get; set; }
+
+        public DateTime birth_date { get; set; }
         
-        public string surname {
-        	get { return get_text ("surname"); }
-			set { set_text ("surname", value); }
-        }
+        public Gender gender { get; set; }
         
-        private DateTime _birth_date;
-        public DateTime birth_date {
-        	get {
-        		_birth_date = get_date ("birth_date");
-        		return _birth_date;
-        	}
-        	set { 
-        		_birth_date = value;
-        		set_date ("birth_date", _birth_date); 
-        	}
-        }
+        public string phone { get; set; }
         
-        public Gender gender {
-        	get { 
-        		if (get_text("gender") == "MALE")
-        			return Gender.MALE;
-        		else
-        			return Gender.FEMALE;
-        	}
-        	set {
-        		if (value == Gender.MALE)
-        			set_text("gender", "MALE");
-        		else
-        			set_text("gender", "FEMALE");
-        	}
-        }
+        public string residence_address { get; set; }
         
-        public string phone {
-        	get { return get_text ("phone"); }
-        	set { set_text ("phone", value); }
-        }
+        public string identification_code { get; set; }
         
-        public string residence_address {
-        	get { return get_text ("residence_address"); }
-        	set { set_text ("residence_address", value); }
-        }
+        public Doctor doctor { get; set; }
         
-        public string identification_code {
-        	get { return get_text ("identification_code"); }
-        	set { set_text ("identification_code", value); }
+        public string get_complete_name () {
+        	return string.join (" ", this.given_name, this.surname);
         }
         
-        
-		private ResourceManager resource_manager;
-    
-        /**
-         * @brief Create a new patient
-         */
-        public Patient (ResourceManager resources, Doctor? doctor) {
-            base (resources.db);
-            resource_manager = resources;
-            table_name = resources.patient_table;
-            error.connect ((t,l) => resources.error_callback(t,l));
-            
-            add_text_field ("given_name");
-            add_text_field ("surname");
-            add_date_field ("birth_date");
-            add_text_field ("gender");
-            add_text_field ("phone");
-            add_text_field ("residence_address");
-            add_text_field ("identification_code");
-            add_integer_field ("doctor");
-
-            this.doctor = doctor;
-                
-            init_resources ();
+        public VisitIterator visits (DateTime? start = null, DateTime? end = null) {
+            if (provider == null)
+                return new EmptyVisitIterator ();
+            else
+                return provider.visits (this, start, end);
         }
         
-        public Patient.with_id (ResourceManager resources, int ID) {
-            this (resources, null);
-            load (ID);
-            if (doctor != null)
-            {   
-                doctor = new Doctor.with_id (resources, get_integer ("doctor"));
+        internal Patient.from_json (Json object, DataProvider? provider = null) {
+            
+            this.provider = provider;
+            id = object.object_get ("id").integer_value ();
+            given_name = object.object_get ("given_name").string_value ();
+            surname = object.object_get ("surname").string_value ();
+            birth_date = SqliteDataProvider.string_to_datetime (
+                object.object_get ("birth_date").string_value ());
+            residence_address = object.object_get ("residence_address").string_value ();
+            identification_code = object.object_get ("identification_code").string_value ();
+            phone = object.object_get ("phone").string_value ();
+            
+            if (provider != null) {
+                var doctor_id = object.object_get ("doctor").integer_value ();
+                if (doctor_id != 0) {
+                    doctor = provider.get_doctor (doctor_id);
+                    
+                    // Check if the doctor is removed later, and in that case
+                    // update the patient accordingly. 
+                    provider.doctor_removed.connect ((removed_id) => {
+                        if (doctor_id == removed_id)
+                            doctor = null;
+                    });
+                }
             }
         }
         
-        public static new PatientIterator all (ResourceManager resources) {
-            return new PatientIterator (resources);
-        }
-        
-        public string get_complete_name () {
-        	return string.join (" ", this.given_name, this.surname);
+        internal Json to_json () {
+            var object = Json.object ();
+            
+            object.object_set ("id", Json.integer (id));
+            object.object_set ("phone", Json.string (phone));
+            object.object_set ("given_name", Json.string (given_name));
+            object.object_set ("surname", Json.string (surname));
+            object.object_set ("birth_date", Json.string (
+                SqliteDataProvider.datetime_to_string (birth_date)));
+            object.object_set ("residence_address", Json.string (residence_address));
+            object.object_set ("identification_code", Json.string (identification_code));
+            
+            if (doctor != null)
+                object.object_set ("doctor", Json.integer (doctor.id));
+            else 
+                object.object_set ("doctor", Json.integer (0));
+            
+            return object;
         }
-
-		public int64 get_age () {
-			DateTime today = new DateTime.now_utc ();
-			var diff = today.difference (this.birth_date);
-
-			/* TimeSpan seems not to work.. :( */
-			return (diff / 31557600000000);
-		}
-		
-		/**
-		 * @brief Get the visit IDs for the selected patient.
-		 * Actual visits can then be retrieved with 
-		 * var visit = new Visit (ID);
-		 */
-		public GLib.List<int> get_visit_ids () {
-			return associated_ids (resource_manager.visits_table, "patient");
-		}
+    
     }
- 
- }
+
+}
diff --git a/libclinica/PatientContextMenu.vala b/libclinica/PatientContextMenu.vala
index b7f1bf6..7531eae 100644
--- a/libclinica/PatientContextMenu.vala
+++ b/libclinica/PatientContextMenu.vala
@@ -26,7 +26,7 @@ namespace Clinica {
      * @brief Menu to be displayed when a user right click on a patient
      * in the TreeView
      */
-    public class PatientContextMenu : Menu {
+    public class PatientContextMenu : Gtk.Menu {
     
     	/* Patient where that user has right clicked on */
     	Patient patient;
@@ -35,9 +35,9 @@ namespace Clinica {
     	PatientListView view;
     	
     	/* MENU ITEMS */
-    	MenuItem edit_menuitem;
-    	MenuItem delete_menuitem;
-    	MenuItem view_visits_menuitem;
+    	Gtk.MenuItem edit_menuitem;
+    	Gtk.MenuItem delete_menuitem;
+    	Gtk.MenuItem view_visits_menuitem;
     	
 		private ResourceManager resource_manager;
     
@@ -48,13 +48,13 @@ namespace Clinica {
     		this.view = view;
     		
     		/* Instantiate menu items */
-    		edit_menuitem = new MenuItem.with_label(_("Edit"));
+    		edit_menuitem = new Gtk.MenuItem.with_label(_("Edit"));
     		edit_menuitem.activate.connect (on_edit_menuitem_activated);
     		
-    		delete_menuitem = new MenuItem.with_label(_("Delete"));
+    		delete_menuitem = new Gtk.MenuItem.with_label(_("Delete"));
     		delete_menuitem.activate.connect(on_delete_menuitem_activated);
     		
-    		view_visits_menuitem = new MenuItem.with_label(_("Edit visits"));
+    		view_visits_menuitem = new Gtk.MenuItem.with_label(_("Edit visits"));
     		view_visits_menuitem.activate.connect(on_view_visits_menuitem_activated);
     		
     		/* Append menuitems */
@@ -65,18 +65,18 @@ namespace Clinica {
     		show_all ();
     	}
     	
-    	private void on_edit_menuitem_activated (MenuItem item) {
+    	private void on_edit_menuitem_activated (Gtk.MenuItem item) {
     		var patient_editor = new PatientEditor.with_patient (resource_manager, patient);
-    		patient_editor.dialog.set_transient_for (resource_manager.user_interface.window);
+    		patient_editor.set_transient_for (resource_manager.user_interface.window);
     		patient_editor.run();
     		patient_editor.destroy ();
     	}
     	
-    	private void on_delete_menuitem_activated (MenuItem item) {
+    	private void on_delete_menuitem_activated (Gtk.MenuItem item) {
     		view.remove_selected_patient ();
     	}
     	
-    	private void on_view_visits_menuitem_activated (MenuItem item) {
+    	private void on_view_visits_menuitem_activated (Gtk.MenuItem item) {
             resource_manager.user_interface.show_visit_window (patient);
     	}
     }
diff --git a/libclinica/PatientEditor.vala b/libclinica/PatientEditor.vala
index 2e54894..7fc336f 100644
--- a/libclinica/PatientEditor.vala
+++ b/libclinica/PatientEditor.vala
@@ -22,7 +22,7 @@ using Gtk;
 
 namespace Clinica {
 
-    public class PatientEditor : GLib.Object  {
+    public class PatientEditor : Dialog  {
     
     	public enum Response {
     	    SAVE = 0,
@@ -52,7 +52,7 @@ namespace Clinica {
         public Entry month_entry;
         public Entry year_entry;
         public Entry doctor_entry;
-	public ComboBox gender_combobox;
+        public ComboBox gender_combobox;
 		
         /* Selected doctor is set from matched signal
          * of the autocompletion. */
@@ -61,15 +61,11 @@ namespace Clinica {
         /* Set to a patient that is the existing object for the
          * one represented here. */
         private Patient? existing_patient { get; set; default = null; }
-        
-        /* Dialog opened to select data of the new patient */
-        public Dialog dialog;
-
-		public Button save_button;
 		
 		/* Completion for doctors */
 		private EntryCompletion completion;
-		
+
+#if HAVE_PLUGINS
 		/**
 		 * @brief Extensions loaded for this PatientEditor
 		 */
@@ -80,6 +76,7 @@ namespace Clinica {
 		 * not working it out and the gobject introspections seems to be
 		 * failing on this */
 		extern Peas.ExtensionSet setup_extension_set (Peas.Engine engine);
+#endif
 		
 		/**
 		 * @brief Color used to notify the user about fields in which
@@ -95,15 +92,11 @@ namespace Clinica {
             resource_manager = resources;
         	error.connect ((t,l) => resource_manager.error_callback (t,l));
             
-            builder = new Builder ();
-            try {
-                builder.add_from_file (resource_manager.get_ui_file ("patient_editor.glade"));
-            } catch (Error e) {
-                error (_("Error loading patient_editor.glade."));
-            }
+            builder = new Builder.with_filename (resource_manager, "patient_editor.glade");
+            builder.load_into_dialog (this);
             
-            /* Fill the dialog with the pieces from the gtk builder file */ 
-            dialog = builder.get_object("patient_editor") as Dialog;
+            /* Add buttons to the Dialog */
+            add_buttons (Stock.CANCEL, Response.CANCEL, Stock.SAVE, Response.SAVE);
 
             /* Prepare for drag and drop if the patient is changed */
             notify["existing_patient"].connect (update_draggable_patient_status);
@@ -121,8 +114,7 @@ namespace Clinica {
             gender_combobox = builder.get_object ("gender_combobox") as ComboBox;
 
             /* Make save_button insensitive until user does not select a valid doctor. */
-            save_button = builder.get_object ("save_button") as Button;
-            save_button.set_sensitive (false);
+            set_response_sensitive (Response.SAVE, false);
             
             /* Create Doctor Entry with autocompletion, and setup a callback
              * to store the Doctor selected with autocompletion when this 
@@ -151,8 +143,12 @@ namespace Clinica {
             month_entry.changed.connect (on_date_entry_changed);
             year_entry.changed.connect (on_date_entry_changed);
             
+            set_title ("Create a new patient");
+            
             builder.connect_signals (this);
+#if HAVE_PLUGINS
 	        extensions = setup_extension_set (resource_manager.plugin_engine);
+#endif
         }
         
         private void update_draggable_patient_status () {  
@@ -164,7 +160,8 @@ namespace Clinica {
             Gtk.drag_source_set (patient_eventbox, Gdk.ModifierType.BUTTON1_MASK, { patient_target }, Gdk.DragAction.COPY);  
             patient_eventbox.drag_begin.connect ((widget, context) => { 
                 resource_manager.dragging_patient = existing_patient;
-                Gtk.Image image = new Gtk.Image.from_file (resource_manager.get_image_file ("patient.svg"));
+                Gtk.Image image = new Gtk.Image.from_pixbuf (
+                    Utils.pixbuf_from_svg_resource (Config.RESOURCE_BASE + "ui/icons/patient.svg", 64, 64));
                 Gtk.drag_set_icon_pixbuf (context, image.get_pixbuf (), 0, 0);
             });
         }
@@ -202,7 +199,7 @@ namespace Clinica {
 			if (!is_birth_date_valid ())
 			    data_is_ok = false;
 			    
-			save_button.set_sensitive (data_is_ok);
+			set_response_sensitive (Response.SAVE, data_is_ok);
 				
 			/* Emit check_finished so additional checks can
 			 * be added here by external plugins. */
@@ -304,7 +301,7 @@ namespace Clinica {
         	year_entry.set_text (birth_date.get_year ().to_string ());
         	
         	// Set title to edit patient * instead of create new patient
-        	dialog.set_title (_("Edit patient named %s").printf (p.get_complete_name ()));
+        	set_title (_("Edit patient named %s").printf (p.get_complete_name ()));
         }
         
         /**
@@ -355,7 +352,7 @@ namespace Clinica {
             /* Create a new dialog precompiled with the user input until now */
             string doc_name = doctor_entry.get_text ();
             var dialog = new DoctorEditor.with_name (resource_manager, Utils.capitalize (doc_name));
-            dialog.dialog.set_transient_for (this.dialog);
+            dialog.set_transient_for (this);
             if (dialog.run () == DoctorEditor.Response.CANCEL) {
             	dialog.destroy ();
             	return;
@@ -401,8 +398,8 @@ namespace Clinica {
         	return true;
         }
         
-        public Response run () {
-            if (dialog.run () == 0) {
+        public new Response run () {
+            if (base.run () == 0) {
             /* Check if there exists a selected doctor and if that
          	 * doctor is still the selected one. */
             	if (selected_doctor != null && 
@@ -415,8 +412,10 @@ namespace Clinica {
             	
             	/*  Save the new patient, creating a new one if this is a new patient, or
             	 *  reusing the existing one if we are only modifying a patient. */
-            	if (existing_patient == null)
-	            	created_patient = new Patient (resource_manager, selected_doctor);
+            	if (existing_patient == null) {
+	            	created_patient = new Patient ();
+	            	created_patient.doctor = selected_doctor;
+	            }
 	            else
 					created_patient = existing_patient;
 					
@@ -442,7 +441,7 @@ namespace Clinica {
 	            }
 	            else
 	            {
-	            		save_button.set_sensitive (false);
+                        set_response_sensitive (Response.SAVE, false);
 	            		error (_("Date inserted is invalid, aborting patient editing"));
 	            		return Response.CANCEL;
 	            }
@@ -453,25 +452,13 @@ namespace Clinica {
 	            else
 	            	created_patient.gender = Gender.FEMALE;
 	            
-            	created_patient.save ();
-            	
-            	// If this was an existing patient we need to reload it in the patient
-            	// list store, otherwise we can just add it
-            	if (existing_patient != null) {
-            		resource_manager.patient_list_store.reload_patient (created_patient);
-            	} else {
-	            	resource_manager.patient_list_store.add_patient (created_patient);
-	            }
+            	resource_manager.data_provider.save_patient (created_patient);
             	
                 return Response.SAVE;
             }
             
             return Response.CANCEL;
         }
-        
-        public void destroy () {
-            dialog.destroy ();
-        }
     }
 }
 
diff --git a/libclinica/PatientEditorActivatable.vala b/libclinica/PatientEditorActivatable.vala
index a1e8023..a5067e5 100644
--- a/libclinica/PatientEditorActivatable.vala
+++ b/libclinica/PatientEditorActivatable.vala
@@ -1,3 +1,22 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+
 namespace Clinica {
 
     /**
diff --git a/libclinica/PatientEntry.vala b/libclinica/PatientEntry.vala
index 8044c2e..17bdd5d 100644
--- a/libclinica/PatientEntry.vala
+++ b/libclinica/PatientEntry.vala
@@ -28,7 +28,7 @@
      * The selected patient, or null, if there is no selected patient,
      * can be retrieved git the get_patient () method.
      */
-    public class PatientEntry : Entry {
+    public class PatientEntry : Entry, Clinica.Buildable {
     
         public signal void selection_changed ();
     
@@ -39,7 +39,7 @@
         /**
          * @brief The reference to the resource manager
          */
-        private ResourceManager resource_manager { get; set; }
+        private ResourceManager resource_manager;
         
         /**
          * @brief The reference to the selected patient
@@ -52,6 +52,10 @@
         private new EntryCompletion completion;
         
         public PatientEntry (ResourceManager resources) {
+            setup (resources);
+        }
+        
+        public void setup (ResourceManager resources) {
             resource_manager = resources;
             
             /* Init the completion */
@@ -125,6 +129,8 @@
         	/* Set selected doctor in this object to use it later */
         	selected_patient = value as Patient;
         	
+        	selection_changed ();
+        	
         	return true;
         }
         
@@ -163,6 +169,8 @@
 	        else 
 	        	completion.insert_action_text (PatientCompletionAction.CREATE_NEW,
 	        		@"Create a new patient");
+	        		
+	        selection_changed ();
         }   
     }
  }
diff --git a/libclinica/PatientListPage.vala b/libclinica/PatientListPage.vala
index 1d05a2f..3fa307e 100644
--- a/libclinica/PatientListPage.vala
+++ b/libclinica/PatientListPage.vala
@@ -25,91 +25,120 @@ namespace Clinica {
     public class PatientListPage : Alignment, Page {
     
         public  PatientListView view;
-        private Alignment sidebar;
-        private VBox left_vbox;
+        private Box left_vbox;
         private ScrolledWindow scrolled_window;
         
         public ResourceManager resource_manager { get; set; }
         
+        private SidebarEntry sidebar_entry;
+        
         /**
          * @brief PatientListPage is the Page loaded when the user
          * asks for a list of the Patients in the database 
          */
         public PatientListPage (ResourceManager resources) {
-            var hbox = new HBox (false, 6);
             resource_manager = resources;
             
-            connect_signal ();
-            
             /* Load files from the XML */
-            var builder = new Builder ();
+            var builder = new Builder (resources);
             
             try {
-                builder.add_from_file (resource_manager.get_ui_file ("patient_list_toolbar.glade"));
-                builder.add_from_file (resource_manager.get_ui_file ("patient_list_sidebar.glade"));
+                builder.add_from_resource ("patient_list_toolbar.glade");
             } catch (Error e) {
                 error ("Error opening patient_list_toolbar.glade. Check you installation.\n");
             }
             
-            left_vbox = builder.get_object ("left_vbox") as VBox;
-            sidebar = builder.get_object ("sidebar") as Alignment;
+            left_vbox = builder.get_object ("left_vbox") as Box;
             scrolled_window = builder.get_object ("treeview_scrolled_window") as ScrolledWindow;
             
             view = new PatientListView (resource_manager, builder.get_object ("find_entry") as Entry);
             scrolled_window.add (view);
             
-            hbox.pack_start (left_vbox);
-            hbox.pack_start (sidebar, false);
-            add (hbox);
+            add (left_vbox);
             show_all ();
             
             /* Connect XML specified signals */
             builder.connect_signals (this);
+            
+            /* Create the SidebarEntry */
+            sidebar_entry = new SidebarPageEntry (resource_manager, this, _("Patients"), 
+                Utils.pixbuf_from_svg_resource (Config.RESOURCE_BASE + "ui/icons/patients.svg", 
+                Sidebar.ICON_SIZE, Sidebar.ICON_SIZE));
+                
+            /* Create the Toolbar */
+            var toolbar = new Toolbar (resource_manager);
+            populate_toolbar (toolbar);
+            var top_box = builder.get_object ("top_box") as Box;
+            
+            top_box.pack_start (toolbar, false, true, 0);
+            show_all ();
         }
         
-        /**
-         * @brief Routine called for initialization
-         */
-        public void setup () {
-            new_title (_("Patients"));
+        private void populate_toolbar (Toolbar toolbar) {
+            var add_item = new ToolbarItem (resource_manager,
+                Config.RESOURCE_BASE + "ui/icons/small_plus.png");
+            add_item.activated.connect (on_add_button_clicked);
+            add_item.set_tooltip_text (_("Add a new patient"));
+            toolbar.insert (add_item, -1);
+            
+            var remove_item = new ToolbarItem (resource_manager,
+                Config.RESOURCE_BASE + "ui/icons/small_remove_2.png");
+            remove_item.activated.connect (on_remove_button_clicked);
+            remove_item.set_tooltip_text (_("Remove the selected patient"));
+            toolbar.insert (remove_item, -1);
+            
+            var modify_item = new ToolbarItem (resource_manager,
+                Config.RESOURCE_BASE + "ui/icons/small_pencil.png");
+            modify_item.activated.connect (on_modify_button_clicked);
+            modify_item.set_tooltip_text (_("Modify the selected patient"));
+            toolbar.insert (modify_item, -1);
+            
+            var visit_item = new ToolbarItem (resource_manager,
+                Config.RESOURCE_BASE + "ui/icons/small_notes_2.png");
+            visit_item.activated.connect (on_edit_visit_button_clicked);
+            visit_item.set_tooltip_text (_("Edit visits of the selected patient"));
+            toolbar.insert (visit_item, -1);
+            
+            var schedule_visit = new ToolbarItem (resource_manager,
+                Config.RESOURCE_BASE + "ui/icons/small_calendar.png");
+            schedule_visit.activated.connect (on_schedule_a_visit_button_clicked);
+            schedule_visit.set_tooltip_text (_("Schedule a visit with the selected patient"));
+            toolbar.insert (schedule_visit, -1);
         }
         
-        /**
-         * @brief Callback for the back_button 
-         */
-        [CCode (instance_pos = -1)]
-        public void on_back_button_clicked (Button button) {
-            start_page_requested ();
+        public string get_title () {
+            return _("Patients");
+        }
+        
+        public SidebarEntry? get_sidebar_entry () {
+            return sidebar_entry;
         }
         
         /**
          * @brief Callback for the remove_button
          */
-        [CCode (instance_pos = -1)]
-        public void on_remove_button_clicked (Button button) {
+        private void on_remove_button_clicked (ToolbarItem item) {
         	view.remove_selected_patient ();
         }
         
         /**
          * @brief Callback for the add_button
          */
-        [CCode (instance_pos = -1)]
-        public void on_add_button_clicked (Button button) {
+        private void on_add_button_clicked (ToolbarItem item) {
         	var new_patient_dialog = new PatientEditor (resource_manager);
-        	new_patient_dialog.dialog.set_transient_for (resource_manager.user_interface.window);
+        	new_patient_dialog.set_transient_for (resource_manager.user_interface.window);
         	new_patient_dialog.run ();
       		new_patient_dialog.destroy ();
         }
         
-        [CCode (instance_pos = -1)]
-        public void on_modify_button_clicked (Button button) {
+        private void on_modify_button_clicked (ToolbarItem item) {
         	var patient = view.get_selected_patient ();
         	if (patient == null)
         		return;
         	
         	/*  Create the patient browser */
         	var edit_patient_dialog = new PatientEditor.with_patient (resource_manager, patient);
-        	edit_patient_dialog.dialog.set_transient_for (resource_manager.user_interface.window);
+        	edit_patient_dialog.set_transient_for (resource_manager.user_interface.window);
         	edit_patient_dialog.run ();
         	edit_patient_dialog.destroy ();
         }
@@ -118,8 +147,7 @@ namespace Clinica {
          * @brief Callback for the Edit visits button that opens the default
          * VisitBrowser for the selected patient.
          */
-        [CCode (instance_pos = -1)]
-        public void on_edit_visit_button_clicked (Button button) {	
+        private void on_edit_visit_button_clicked (ToolbarItem item) {	
         	var patient = view.get_selected_patient ();
         	if (patient == null) {
         		return;
@@ -127,6 +155,17 @@ namespace Clinica {
         	
             resource_manager.user_interface.show_visit_window (patient);
         }
+        
+        /**
+         * @brief Callback for the Schedule a visit button, that schedule a new visit
+         * with the selected patient.
+         */
+        private void on_schedule_a_visit_button_clicked (ToolbarItem item) {
+            var patient = view.get_selected_patient ();
+            var scheduler = new VisitSchedulerDialog (resource_manager, patient);
+            scheduler.run ();
+            scheduler.destroy ();
+        }
     }
     
 }
diff --git a/libclinica/PatientListStore.vala b/libclinica/PatientListStore.vala
index 2f7537d..f09a7f0 100644
--- a/libclinica/PatientListStore.vala
+++ b/libclinica/PatientListStore.vala
@@ -34,6 +34,12 @@ namespace Clinica {
         public signal void error (string message);
         
 		private ResourceManager resource_manager;
+		
+		private DataProvider provider;
+		
+		private ulong patient_added_id = 0;
+		private ulong patient_changed_id = 0;
+		private ulong patient_removed_id = 0;
         
         /**
          * @brief Create a new PatientListStore starting
@@ -51,24 +57,59 @@ namespace Clinica {
                                        typeof (string) , typeof (string)};
             set_column_types (column_headers);
             
+            load_data ();
+        }
+        
+        public void load_data () {            
             /* Asynchronous loading of patients */
             Idle.add(() => {
-		        foreach (Patient p in Patient.all (resource_manager)) {
-		        	add_patient (p);
+		        foreach (Patient p in resource_manager.data_provider.patients ()) {
+		        	add_patient (p.id);
 		        }
 		        
+		        provider = resource_manager.data_provider;
+		        update_signals ();
+		        
+		        resource_manager.notify["data_provider"].connect ((provider) => update_signals ());
+		        
 		        /* We don't need to reiterate this function any more */
 		        return false;
-		    });
+		    });        
+        }
+        
+        public void update_signals () {
+            /* Remove old callbacks if present */
+            if (patient_added_id > 0)
+                provider.disconnect (patient_added_id);
+            if (patient_changed_id > 0)
+                provider.disconnect (patient_changed_id);
+            if (patient_removed_id > 0)
+                provider.disconnect (patient_changed_id);
+                
+            provider = resource_manager.data_provider;
+            
+	        /* Setup callbacks to add or remove patient */
+	        resource_manager.data_provider.patient_added.connect (
+	            (id) => add_patient (id));
+	        resource_manager.data_provider.patient_changed.connect (
+	            (id) => reload_patient (id));
+	        resource_manager.data_provider.patient_removed.connect (
+	            (id) => remove_patient (id));
+        }
+        
+        public void remove_patient (int64 id) {
+            TreeIter iter = id_to_iter (id);
+            remove (iter);
         }
         
         /**
          * @brief Append the given patient to the liststore
          */
-        public void add_patient (Patient p) {
+        private void add_patient (int64 id) {
+            Patient p = resource_manager.data_provider.get_patient (id);
         	TreeIter it;
             append (out it);
-            set_value (it, Field.PATIENT,    p);
+            set_value (it, Field.PATIENT,    p);    
             set_value (it, Field.GIVEN_NAME, p.given_name);
             set_value (it, Field.SURNAME,    p.surname);
             set_value (it, Field.COMPLETE_NAME, p.get_complete_name ());
@@ -78,7 +119,8 @@ namespace Clinica {
 	     * @brief Reload information about patient p that
 	     * should be already present in the database
 	     */
-	    public void reload_patient (Patient p) {
+	    private void reload_patient (int64 id) {
+	        Patient p = resource_manager.data_provider.get_patient (id);
 	    	TreeIter iter;
 	    	Value patient;
 	    	
@@ -88,7 +130,7 @@ namespace Clinica {
 	    	
 	    	do {
 	    		get_value (iter, Field.PATIENT, out patient);
-	    		if ((patient as Patient).get_id () == p.get_id ()) {
+	    		if ((patient as Patient).id == p.id) {
 	    			set_value(iter, Field.PATIENT, p);
 	    			set_value(iter, Field.GIVEN_NAME, p.given_name);
 	    			set_value(iter, Field.SURNAME, p.surname);
@@ -101,63 +143,19 @@ namespace Clinica {
 	    	assert_not_reached ();
 	    }
 	    
-	    /**
-	     * @brief Return a list of treeiters pointing to the patients
-	     * of the given doctor. 
-	     */
-	    public List<TreeIter?> get_patients_of (Doctor doc) {
-	    	Value value;
-	    	var iters = new List<TreeIter?> ();
-	    	TreeIter it;
-	    	Patient p;
-	    	
-	    	if (!get_iter_first (out it)) {
-	    		return iters;
-	    	}
-	    	do {
-	    		get_value (it, Field.PATIENT, out value);
-	    		p = value as Patient;
-	    		if (p.doctor.get_id () == doc.get_id ()) {
-	    			iters.append (it);
-	    		} 
-	    	} while (iter_next(ref it));
-	    	
-	    	return iters;
-	    }
-	    
-	    public TreeIter patient_to_iter (Patient p) {
+	    private TreeIter id_to_iter (int64 id) {
 	    	TreeIter it;
 	    	Value patient;
 	    	if (!get_iter_first (out it))
 				error(_("Patients database seems corrupted. This is likely to be a bug in the application"));
 	    	do {
 	    		get_value (it, Field.PATIENT, out patient);
-	    		if ((patient as Patient).get_id () == p.get_id ()) {
+	    		if ((patient as Patient).id == id) {
 	    			return it;
 	    		}
 	    	} while (iter_next (ref it));
 	    	
 	    	assert_not_reached ();
 	    }
-	    
-	    public void remove_patient (Patient p) {
-	    	TreeIter p_iter = patient_to_iter (p);
-	    	remove_patient_from_iter (p_iter);
-	    }
-	    
-	    public void remove_patient_from_iter (TreeIter it) {
-	    	Value patient;
-	    	get_value (it, Field.PATIENT, out patient);
-	    	
-	    	var visits = resource_manager.visit_list_store.get_visits_of (patient as Patient);
-	    	
-	    	foreach (TreeIter v_it in visits) {
-	    		resource_manager.visit_list_store.remove_visit_from_iter (v_it);
-	    	}
-	    	
-	    	/* Actually remove the patient */
-	    	(patient as Patient).remove ();
-	    	remove (it);
-	    }
 	}
 }
diff --git a/libclinica/PatientListView.vala b/libclinica/PatientListView.vala
index c1a73c9..217bc23 100644
--- a/libclinica/PatientListView.vala
+++ b/libclinica/PatientListView.vala
@@ -115,10 +115,7 @@ namespace Clinica {
             filtered_store.convert_iter_to_child_iter (out child_iter, iter);
             store.get_value (child_iter, PatientListStore.Field.PATIENT, out patient);
             
-            PatientEditor patient_editor = new PatientEditor.with_patient (resource_manager, patient as Patient);
-            patient_editor.dialog.set_transient_for (resource_manager.user_interface.window);
-            patient_editor.run ();
-            patient_editor.destroy ();
+            resource_manager.user_interface.show_visit_window (patient as Patient);
         }
         
         private void on_name_cell_edited (CellRenderer renderer, string path, string new_text) {
@@ -135,10 +132,7 @@ namespace Clinica {
             /*  Cast patient and update database data */
             patient = value as Patient;
             patient.given_name = new_text;
-            patient.save ();
-            
-            /*  Update UI */
-            resource_manager.patient_list_store.reload_patient (patient);
+            resource_manager.data_provider.save_patient (patient);
         }
         
         private void on_surname_cell_edited (CellRenderer renderer, string path, string new_text) {
@@ -155,10 +149,7 @@ namespace Clinica {
             /*  Set new data in the Patient, save and update treeview */
             patient = value as Patient;
             patient.surname = new_text;
-            patient.save ();
-            
-            /*  Update UI */
-            resource_manager.patient_list_store.reload_patient (patient);
+            resource_manager.data_provider.save_patient (patient);
         }
         
         /**
@@ -189,8 +180,17 @@ namespace Clinica {
         		TreeIter it;
 				sortable_model.convert_iter_to_child_iter (out it, iter);
         		filtered_store.convert_iter_to_child_iter (out iter, it);
-		    	/* Delete patient from the database and from the store*/
-		    	store.remove_patient_from_iter (iter);
+        		
+		    	/* Delete patient from the database */
+		    	Value value;
+		    	store.get_value (iter, PatientListStore.Field.PATIENT, out value);
+		    	
+		    	/* Removing the visits associated with this patient */
+		    	foreach (Visit visit in (value as Patient).visits ()) {
+		    	    resource_manager.data_provider.remove_visit (visit);
+		    	}
+		    	
+		    	resource_manager.data_provider.remove_patient (value as Patient);
 		    }
     	}
     	
diff --git a/libclinica/PluginEngine.vala b/libclinica/PluginEngine.vala
index ce24fd9..2f37a02 100644
--- a/libclinica/PluginEngine.vala
+++ b/libclinica/PluginEngine.vala
@@ -1,3 +1,22 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+
 namespace Clinica {
 
     public class PluginEngine : Peas.Engine {
@@ -12,9 +31,11 @@ namespace Clinica {
             if (!resource_manager.settings.get_boolean ("use-plugins"))
                 return;
          
-            /* Add a search path useful to us */   
-            debug ("Scanning %s for plugins", resource_manager.get_plugins_dir ());
-            add_search_path (resource_manager.get_plugins_dir (), null);
+            /* Add a search path useful to us */
+            foreach (var path in resource_manager.get_plugins_dirs ()) {
+                debug ("Adding %s to the search path for plugins", path);
+                add_search_path (path, null);
+            }
             
             /* Connect callback to make loading and unloading persistent */
             load_plugin.connect (on_load_plugin);
diff --git a/libclinica/PluginManager.vala b/libclinica/PluginManager.vala
index 64cd2e7..64263a0 100644
--- a/libclinica/PluginManager.vala
+++ b/libclinica/PluginManager.vala
@@ -28,7 +28,7 @@ namespace Clinica {
         public PluginManager (ResourceManager resources) {
             GLib.Object (xalign: 0.5F, yalign: 0.5F, xscale: 1.0F, yscale: 1.0F);
             
-            var vbox = new VBox (false, 6);
+            var vbox = new Box (Orientation.VERTICAL, 6);
             var pm = new PeasGtk.PluginManager (resources.plugin_engine);
             
             vbox.pack_start (new Label (
@@ -37,7 +37,8 @@ namespace Clinica {
             vbox.pack_start (pm);
             
             var align = new Alignment (0.5F, 0.5F, 1, 1);
-            align.set_padding (6, 6, 6, 6);
+            align.set_padding (resources.PADDING, resources.PADDING, 
+                resources.PADDING, resources.PADDING);
             
             align.add (vbox);
             add (align);
diff --git a/libclinica/ResourceManager.vala b/libclinica/ResourceManager.vala
index 1111308..4d667b7 100644
--- a/libclinica/ResourceManager.vala
+++ b/libclinica/ResourceManager.vala
@@ -40,7 +40,12 @@ namespace Clinica {
          * @brief The padding the should be used in windows
          * in Clinica.
          */
-        public const int PADDING = 6;
+        public int PADDING = 6;
+        
+        /**
+         * @brief GtkApplication of Clinica.
+         */
+        internal Clinica.Application application;
     
         /**
          * @brief Callback that manages errors
@@ -73,6 +78,25 @@ namespace Clinica {
         public EventListStore event_list_store;
         
         /**
+         * @brief This is the object used to retrieve all the data
+         * about patients and which events should be connected
+         * to the views to make them react to changes in the database
+         * or whatever the data source is.
+         */
+        internal DataProvider data_provider { get; private set; }
+        
+        /**
+         * @brief A NetworkedDataProvider that can communicate with other clinica
+         * instances on the LAN. 
+         */
+        internal NetworkedDataProvider networked_data_provider;
+        
+        /**
+         * @brief DataProvider bounded to the local database.
+         */
+        internal SqliteDataProvider sqlite_data_provider;
+        
+        /**
          * @brief Reference to a user interface
          */
         public UserInterface user_interface;
@@ -93,23 +117,20 @@ namespace Clinica {
          * @brief Local configuration directory
          * obtained at runtime.
          */
-        private string local_config_directory;
-        
-        /**
-         * @brief Database path.
-         */
-        private string database_path;
+        internal string local_config_directory;
         
         /**
-         * @brief SQLite database with data and
-         * configurations.
+         * @brief Local data directory obtained 
+         * at runtime.
          */
-        public Database db;
-        
+        internal string local_data_directory;
+
+#if HAVE_PLUGINS
         /**
          * @brief PluginEngine for Clinica
          */
         public PluginEngine plugin_engine;
+#endif
         
         /**
          * @brief Array containing the valid medicine search engines that
@@ -119,21 +140,39 @@ namespace Clinica {
         internal GLib.List<unowned MedicineSearchEngine> medicine_search_engines;
         
         /**
+         * @brief Instance of the local Medicines search engine.
+         */
+        internal LocalMedicinesDatabase local_medicines_search_engine;
+        
+        /** 
+         * @brief List containing the available DataProviders that 
+         * can be used to retrieve data in Clinica. 
+         */
+        internal List<DataProvider> data_providers;
+        
+        /**
          * @brief A pointer to the patient that is been dragged. Should
          * be set on drag_begin by the treeview and reset to null by the
          * drag destination handler. 
          */
 		internal Patient? dragging_patient = null;
+		
+		/**
+		 * @brief A pointer to the DataServer instance if is activated, or null
+		 * if is disabled.
+		 */
+		internal DataServer? data_server = null;
+		
+#if HAVE_PLUGINS
+		private Peas.ExtensionSet core_set;
+#endif
+
+        internal bool persistency_required = false;
         
         /**
-         * @brief Path to the UI files directory
+         * @brief Prefix where Clinica is installed. 
          */
-        private string ui_files_path;
-        private string icons_files_path;
-        private string prefix;
-        private string data_path;
-        
-        private bool is_local = false;
+        internal string prefix;
         
         public const string doctor_table = "doctors";
         public const string patient_table = "patients";
@@ -141,18 +180,22 @@ namespace Clinica {
         public const string events_table = "events";
         
         /** SIGNALS **/
-        public signal void medicine_search_engines_added (MedicineSearchEngine engine);
-        public signal void medicine_search_engines_removed (MedicineSearchEngine engine);
-        
-        private const string [] supported_db_versions = { "0.1", "0.2" };
-        private const string db_version = "0.2";
-    
-        public ResourceManager (string program_name = "clinica", ErrorCallback? callback = null) {
+        internal signal void medicine_search_engines_added (MedicineSearchEngine engine);
+        internal signal void medicine_search_engines_removed (MedicineSearchEngine engine);
+        internal signal void data_provider_added (DataProvider provider);
+        internal signal void data_provider_removed (DataProvider provider);
+
+        public ResourceManager (Clinica.Application? application, 
+                                string program_name = "clinica", 
+                                ErrorCallback? callback = null){
             if (callback != null)
                 error_callback = callback;
             else {
                 error_callback = (source, message) => debug (message);
             }
+            
+            /* Save the GtkApplication */
+            this.application = application;
         
             /* Connect error callback */
             error.connect ((t,l) => callback(t,l));
@@ -162,67 +205,24 @@ namespace Clinica {
             local_config_directory = Environment.get_user_config_dir ();
             local_config_directory = Path.build_filename (local_config_directory,
                                                           "clinica");
-            database_path = Path.build_filename (local_config_directory,
-                                                 "clinica.db");
-                                                 
+            /* Set local configuration directory */                                    
+            local_data_directory = Environment.get_user_data_dir ();
+            local_data_directory = Path.build_filename (local_data_directory, "clinica");
+                                                
             /* Check if configuration directory exists */
             if (!FileUtils.test (local_config_directory, 
                                   FileTest.IS_DIR)) {
-                DirUtils.create_with_parents (local_config_directory, -1);
+                DirUtils.create_with_parents (local_config_directory, 0755);
             }
-                                                 
-            /* Read database version if existant, saved actual version otherwise.
-             * This may be used in future to perform one-time upgrade of the database */
-            var version_db_file = Path.build_filename (local_config_directory, 
-            										    ".clinica_db_version");
-            										   
-        	if (!FileUtils.test (version_db_file, FileTest.IS_REGULAR)) {
-        		/* Create the file with the version of the database */
-        		try {
-	        		FileUtils.set_contents(version_db_file, db_version);
-	        	} catch (Error e) {
-	        		error (_("Error creating some configuration files, check permission on %s".printf(version_db_file)));
-	        	}
-        	}
-        	else {
-        		string content;
-        		try {
-        			FileUtils.get_contents(version_db_file, out content);
-        		} catch (Error e) {
-        			error (_("Error reading some configuration files, check permission on %s".printf(version_db_file)));
-        		}
-        		
-        		bool upgraded_correcty = true;
-        		if (db_version != content) {
-        		    /* Ask the user if he really wants to upgrade */
-        		    if (!ask_for_upgrade()) {
-        		        debug ("The user doesn't want to upgrade, exiting.");
-        		        Posix.exit (0);
-        		    }
-        		
-        		    upgraded_correcty = false;
-        		    /* Try to determine if the version of the local database is supported */
-        		    if (content in supported_db_versions) {
-        		        if (upgrade_database (content)) {
-        		            upgraded_correcty = true;
-        		            try {
-            		            FileUtils.set_contents (version_db_file, db_version);
-            		        } catch (GLib.Error e) {
-            		            error (_("Failure while settings new database version to %s").printf (db_version));
-                            }
-        		        } else {
-        		            error (_("Failure while upgrading database"));
-        		        }
-        		    }
-        		    else
-        			    error (_("Version of the database is not compatible"));
-        		}
-        		
-        		if (!upgraded_correcty) {
-      		        debug ("Upgrade failed, exiting.");
-        		    Posix.exit (1);
-        		}
-        	}
+            
+            if (!FileUtils.test (local_data_directory, FileTest.IS_DIR)) {
+                DirUtils.create_with_parents (local_data_directory, 0755);
+            }
+            
+            /* Check if the directory for the FileStore exists */
+            File fsd = File.new_for_path (get_filestore_dir ());
+            if (!fsd.query_exists ())
+                DirUtils.create_with_parents (get_filestore_dir (), 0755);
                                                 
             /* Find prefix */
             prefix = "/usr/local";
@@ -230,93 +230,102 @@ namespace Clinica {
             	prefix = "/usr";
             }
             
-            /* Check if this is a local build and if that's the case then
-             * load local interface files. Since we use libtoo to compie, the real
-             * program will be in the dir .libs, so added the .. :) */
-            is_local = true;
-            string [] source_files = { "AboutDialog.vala", "Page.vala", "StartPage.vala" };
-            string src_base = Path.build_filename(Path.get_dirname (program_name), "..", "..");
-            foreach(string source in source_files) {
-	            if (!FileUtils.test (Path.build_filename(src_base, "libclinica", source), FileTest.IS_REGULAR)) {
-		            is_local = false;
-	            }
-            }
-             
-            if (is_local) {
-                debug ("Local build detected, loading files from here");
-            	data_path = src_base;
-            } else {
-	            data_path = Path.build_filename(prefix, "share", "clinica");
-        	}
-	       
-            /* Find UI files */
-            ui_files_path = Path.build_filename(data_path, "ui");
-            
-            /* Find icons */
-            icons_files_path = Path.build_filename (ui_files_path, "icons");
-
-
-            /* Preparing for the creations of the settings, if the build is local try to
-             * use local schema file */
-            if (is_local) {
-                debug ("Trying to compile my own gsettings schema");
-            try {
-	            Process.spawn_sync (null, {Environment.find_program_in_path ("glib-compile-schemas"), 
-                                               src_base}, 
-                                        null, GLib.SpawnFlags.STDERR_TO_DEV_NULL, null);
-                } catch (SpawnError error) {
-                    debug ("Cannot compile the gsettings schema, clinica is likely to not work: %s", error.message);
-                }
-                Environment.set_variable ("GSETTINGS_SCHEMA_DIR", src_base, true);
-                Environment.set_variable ("GI_TYPELIB_PATH", 
-                    Path.build_filename (src_base, "_build_", "libclinica"), true);
+            /* Try setting GSETTINGS_SCHEMA_DIR to this directory so if this is 
+             * a local build or the Windows version we are able to use the in-place
+             * compiled schema. 
+             *
+             * Do this only if the file "gschemas.compiled" is found.
+             */
+            if (FileUtils.test ("gschemas.compiled", FileTest.EXISTS)) {
+                debug ("Settings GSETTINGS_SCHEMA_DIR to '.' since gschemas.compiled is found");
+                Environment.set_variable ("GSETTINGS_SCHEMA_DIR", ".", true);
             }
             
             /* Create configuration */
             settings = new Settings (this);
             
-            /* Load all extensions found... this is quite ugly, but an
-             * interface to select loaded plugins is still needed. 
-             * For now, do it in the idle cycle to allow clinica to start
-             * faster. */
+            /* SqliteDataProvider must always be the first DataProvider
+             * in the list */
+            data_providers = new List<DataProvider> ();
+            sqlite_data_provider = new SqliteDataProvider (this);
+            register_data_provider (sqlite_data_provider);
+            
+            // Create the DataServer used to share data from the local DB
+            // on the local network.
+            data_server = new DataServer (this, data_provider);
+            
+            /* Start the Server if required and subscribe to change in the settings.
+             * to adjust its behaviour. */
+            if (settings.get_boolean ("data-server-activated"))
+                data_server.start ();
+            
+            settings.changed["data-server-activated"].connect ((settings, key) => {
+                if (settings.get_boolean ("data-server-activated"))
+                    data_server.start ();
+                else
+                    data_server.stop (); 
+            });
+
+            /* Instantiate a NetworkDataProvider to communicate with other clinica on the
+             * network. */
+            networked_data_provider = new NetworkedDataProvider (this);
+            register_data_provider (networked_data_provider);
+            
+            if (settings.get_string ("data-provider") == networked_data_provider.get_name ()) {
+                networked_data_provider.connect_to_server (
+                    settings.get_string ("network-data-provider-host"),
+                    int.parse (settings.get_string ("network-data-provider-port")));
+                    
+                // Check if the given authentication data is correct or not. 
+                if (!networked_data_provider.try_authentication (
+                    settings.get_string ("network-data-provider-host"),
+                    settings.get_string ("network-data-provider-port"),
+                    networked_data_provider.username, networked_data_provider.password)) {
+                    
+                    // Check if the networked data provider is still the current one. If that's
+                    // the case then disconnect and warn the user abount wrong credentials. 
+                    if (data_provider == networked_data_provider as DataProvider) {
+                        var dialog = new MessageDialog (null, DialogFlags.MODAL, MessageType.ERROR, ButtonsType.OK,
+                           "%s",  _("Username or password are wrong. Disconnecting from the server."));
+                        dialog.set_title (_("Error while authenticating on the server"));
+                        dialog.run ();
+                        dialog.destroy ();
+                        
+                        select_data_provider (sqlite_data_provider);
+                        networked_data_provider.disconnect_from_server ();
+                    }
+                }
+            }
+                 
+            load_stores.begin ();
+                  
+#if HAVE_PLUGINS
              if (settings.get_boolean ("use-plugins"))
                  load_plugins.begin ();
+#endif
         }
-        
-        private bool ask_for_upgrade () {
-            var mb = new MessageDialog (null,
-                DialogFlags.DESTROY_WITH_PARENT |
-                DialogFlags.MODAL,
-                MessageType.QUESTION,
-                ButtonsType.YES_NO,
-                "%s", "Database upgrade");
-            mb.format_secondary_markup (_("This is a version of Clinica newer than the one that created the\npatients database installed on the system.\nUsing this version requires upgrading the database, and\n<b>the old version will not be able to use it anymore</b>.\nDo you wish to perform this one-time upgrade?\n"));
-            mb.set_title (_("Upgrade database"));
-            if (mb.run () == ResponseType.YES) {
-                mb.destroy ();
-                return true;
-            }
-            else {
-                mb.destroy ();
-                return false;
-           }
-        }
+
+
+#if HAVE_PLUGINS
+        private extern Peas.ExtensionSet setup_extension_set (PluginEngine engine);
         
         /**
          * @brief Instantiate the plugin engine and load
          * all the plugins present in the directory
          */
         public async void load_plugins () {
+        
+            /* Load our internal medicine search engine */
+            local_medicines_search_engine = new LocalMedicinesDatabase (this);
+            register_medicine_search_engine (local_medicines_search_engine);
+        
             /* Setup plugin engine */
             plugin_engine = new PluginEngine (this);   
             plugin_engine.enable_loader ("python");
-        
-            unowned GLib.List<weak Peas.PluginInfo> list = 
-                plugin_engine.get_plugin_list ();
-                
+            
             string [] active_plugins = settings.get_active_plugins ();
             
-            foreach (Peas.PluginInfo info in list) {
+            foreach (Peas.PluginInfo info in plugin_engine.get_plugin_list ()) {
                 if (info.get_module_name () in active_plugins) {
                     debug ("Activating plugin %s".printf (info.get_name ()));
                     plugin_engine.load_plugin (info);
@@ -325,151 +334,138 @@ namespace Clinica {
                     debug ("Plugin %s found but disabled".printf (info.get_name ()));
                 }
             }
+            
+            /* Setup the CoreActivatable extension set, so new DataProviders will be available */
+            core_set = setup_extension_set (plugin_engine);
         }
+#endif
         
-        public void register_medicine_search_engine (MedicineSearchEngine engine) {
-            medicine_search_engines.append (engine);
-            
-            /* If no medicine_search_engine is loaded, load this one */
-            if (settings.selected_search_engine == null) {
-                debug ("Loading search engine %s", engine.get_name ());
-                settings.selected_search_engine = engine;
-            }
-            medicine_search_engines_added  (engine);
+        private async void load_stores () {
+            /* Create the store that will be attached to the data provider selected 
+             * above */         
+            if (doctor_list_store != null)
+                return;
+            doctor_list_store = new DoctorListStore (this);
+            patient_list_store = new PatientListStore (this);
+            visit_list_store = new VisitListStore (this);
+            event_list_store = new EventListStore (this);
         }
         
-        public bool unregister_medicine_search_engine (MedicineSearchEngine engine) {
-            if (engine == settings.selected_search_engine) {
-                settings.selected_search_engine = null;
-                settings.set_string ("medicine-search-engine", "");
-            }
-            foreach (MedicineSearchEngine e in medicine_search_engines) {
-                if (e == engine) {
-                    medicine_search_engines.remove (e);
-                    medicine_search_engines_removed (e);
-                    return true;
-                }
+        private async void reload_stores () {
+            // Reload the stores only if they are not already loaded. 
+            debug ("Reloading stores");
+            if (doctor_list_store == null) {
+                load_stores.begin ();
+                return;
             }
-            return false;
+            doctor_list_store.clear ();
+            doctor_list_store.load_data ();
+            patient_list_store.clear ();
+            patient_list_store.load_data ();
+            visit_list_store.clear ();
+            visit_list_store.load_data ();
+            event_list_store.clear ();
+            event_list_store.load_data ();
         }
         
-        public string get_ui_file (string filename) {
-            return Path.build_filename (ui_files_path, filename);
-        }
+        public void register_data_provider (DataProvider provider) {
+            data_providers.append (provider);
+            data_provider_added (provider);
             
-        public string get_image_file (string image_name) {
-        	return Path.build_filename (icons_files_path, image_name);
+            if (data_provider == null)
+                data_provider = provider;
+                
+            if (provider.get_name () == settings.get_string ("data-provider"))
+                data_provider = provider;
         }
         
-        public string get_plugins_dir () {
-            if (is_local)
-                return Path.build_filename (data_path, "_build_", "plugins");
-            else {
-                return Path.build_filename (prefix, "lib", "clinica", "plugins");
+        public void unregister_data_provider (DataProvider provider) {
+            if (provider == data_provider) {
+                data_provider = data_providers.nth_data (0);
+                settings.set_string ("data-provider", "");
             }
         }
         
-        private bool upgrade_database (string db_version) {
-            /* Try to open the database first */
-            if (!(Database.open (database_path, out db) == OK)) {
-                error (_("Error upgrading database, please check your installation"));
-            }
+        internal void select_data_provider (DataProvider provider) {
+            if (data_provider == provider)
+                return;
+
+            data_provider = provider;
+            settings.set_string ("data-provider", 
+                provider.get_name ());
+
+            reload_stores.begin ();
+        }
+        
+        public void register_medicine_search_engine (MedicineSearchEngine engine) {
+            medicine_search_engines.append (engine);
             
-            string sql;
-            Statement stmt;
-            int rc;
+            var name = engine.get_name ();
+            var active_names = settings.get_strv ("medicine-search-engines");
             
-            /* Performing upgrade from 0.1 */
-            if (db_version == "0.1") {
-                /* We need to create the new table for the events */
-               sql = "CREATE TABLE IF NOT EXISTS events (id INTEGER PRIMARY KEY, title TEXT, description TEXT, venue TEXT, patient INTEGER, visit INTEGER, date TEXT);";
-               db.prepare (sql, -1, out stmt, null);
-               rc = stmt.step ();
-               
-               if (rc != DONE) {
-                   error (_("Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %d".printf (rc)));
-                   return false;
-               } else {
-                   db_version = "0.2";
-               }
+            foreach (var active_name in active_names) {
+                if (active_name == name) {
+                    settings.selected_search_engines.append (engine);
+                    break;
+                }
             }
             
-            return true;
+            medicine_search_engines_added (engine);
         }
         
-        /**
-         * @brief Check that all the resources needed by Clinica
-         * are actually available, and if they are not create them.
-         */
-        public void initResources () {
-            int rc;
-            Statement stmt;
-            string sql;
-            
-            /* Open database and, if it does not exists, create it */
-            if (!(Database.open (database_path, out db) == OK)) {
-                error ("Error opening database.");
-            };
-            
-            /* Check if the required tables exists */
-            sql = "SELECT * from sqlite_master WHERE type='table';";
-            db.prepare (sql, -1, out stmt, null);
-            rc = stmt.step ();
+        public bool unregister_medicine_search_engine (MedicineSearchEngine engine) {
+            var index = settings.selected_search_engines.index (engine);
+            if (index != -1) {
+                settings.selected_search_engines.remove (engine);
+                
+                string [] new_selected_search_engines = {};
+                foreach (var e in settings.get_strv ("medicine-search-engines")) {
+                    if (e != engine.get_name ()) {
+                        new_selected_search_engines += e.dup ();
+                    }
+                }
+                
+                settings.set_value ("medicine-search-engines", new_selected_search_engines);
+            }
             
-            if (rc == DONE) {
-                /* That means no tables in the database */
-                initDatabase ();
+            foreach (MedicineSearchEngine e in medicine_search_engines) {
+                if (e == engine) {
+                    medicine_search_engines.remove (e);
+                    medicine_search_engines_removed (e);
+                    return true;
+                }
             }
-
-            /* Load stores */
-            doctor_list_store = new DoctorListStore (this);
-            patient_list_store = new PatientListStore (this);
-            visit_list_store = new VisitListStore (this);
-            event_list_store = new EventListStore (this);
+            
+            return false;
         }
         
-        
-        /**
-         * @brief Init the database with the required tables
-         */
-        private void initDatabase () {
-            Statement stmt; 
-            string sql;
-            string err_msg;
+        public List<string> get_plugins_dirs () {
+            List<string> plugin_dirs = new List<string> ();
+            plugin_dirs.append (Path.build_filename (prefix, "lib", "clinica", "plugins"));
             
-            /* Create config table */
-            sql = "CREATE TABLE config (id INTEGER PRIMARY KEY, " +
-                  "key TEXT, value TEXT);";
-            db.prepare (sql, -1, out stmt, null);
-            if (!(stmt.step () == DONE)) {
-                err_msg = db.errmsg ();
-                error ("Error creating config structure in the Database: "
-                + err_msg);
+            // Load custom dirs if defined in the appropriate Environment variable. 
+            string user_defined_dirs = Environment.get_variable ("CLINICA_PLUGINS_PATH");
+            if (user_defined_dirs != null) {
+                foreach (var path in user_defined_dirs.split(":")) {
+                    plugin_dirs.append (path);
+                }
             }
-        }            
-        
-        /**
-         * @brief Return a Doctor object associated to the given ID
-         */
-        public Doctor getDoctor (int ID) {
-            Doctor doctor = new Doctor.with_id (this, ID);
-            return doctor;
+            
+            return plugin_dirs;
         }
         
         /**
-         * @brief Return a Patient object associated to the given ID
+         * @brief Get the directory where the data of the user shall be stored. 
          */
-        public Patient getPatient (int ID) {
-            Patient p = new Patient.with_id (this, ID);
-            return p;
+        public string get_data_path () {
+            return local_data_directory;
         }
         
         /**
-         * @brief Return a Visit object associated to the given ID
+         * @brief Get the directory in which the FileStore can store its files.
          */
-        public Visit getVisit (int ID) {
-            Visit visit = new Visit.with_id (this, ID);
-            return visit;
+        public string get_filestore_dir () {
+            return Path.build_filename (local_data_directory, "filestore");
         }
         
         
diff --git a/libclinica/Service.vala b/libclinica/Service.vala
new file mode 100644
index 0000000..29babb8
--- /dev/null
+++ b/libclinica/Service.vala
@@ -0,0 +1,231 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+ 
+ namespace Clinica {
+ 
+    [DBus (name = "org.phcteam.clinica.Service")]
+    public class Service : GLib.Object {
+    
+        /**
+         * @brief The resource manager associated to this
+         * Service.
+         */
+        internal ResourceManager resource_manager;
+    
+        /**
+         * @brief Return the version of clinica that is running.
+         */
+        public string version () {
+            return Config.VERSION;
+        }
+        
+        /**
+         * @brief Return a lists of patients id whose name
+         * match the given string.
+         */
+        public int64 [] patients_filter (string filter) {
+            string lfilter = filter.down();
+            int64 [] patients = {};
+            foreach (var patient in resource_manager.data_provider.patients ()) {
+                if (lfilter in patient.get_complete_name ().down ()) {
+                    patients += patient.id;
+                }
+            }
+            
+            return patients;
+        }
+        
+        /**
+         * @brief Get the patients name associated to the given ID.
+         */
+        public string get_patient_name (int64 id) {
+           var patient = resource_manager.data_provider.get_patient (id);
+            
+            if (patient == null)
+                return "";
+                
+           return patient.get_complete_name (); 
+        }
+        
+        /**
+         * @brief Return patient data as a dictionary.
+         */
+        public HashTable<string, string> get_patient_data (int64 id) {
+            HashTable<string, string> table = new HashTable<string, string> (GLib.str_hash, GLib.str_equal);
+            var patient = resource_manager.data_provider.get_patient (id);
+            
+            if (patient == null)
+                return table;
+            
+            /* Fill the table with the patient data */
+            table["given_name"] = patient.given_name;
+            table["surname"] = patient.surname;
+            table["birth_date"] = patient.birth_date.to_string();
+            table["gender"] = (patient.gender == Gender.MALE) ? "MALE" : "FEMALE";
+            table["residence_address"] = patient.residence_address;
+            table["phone"] = patient.phone;
+            table["identification_code"] = patient.identification_code;
+            
+            return table;
+        }
+        
+        /**
+         * @brief Retrieve the id of the patient's doctor. May be 0 if that patient
+         * has no doctor. 
+         */
+        public int64 get_patient_doctor (int64 id) {
+            var patient = resource_manager.data_provider.get_patient (id);
+            
+            if (patient == null)
+                return -1;
+                
+            return (patient.doctor == null) ? 0 : patient.doctor.id;
+        }
+        
+        /**
+         * @brief Retrieve data associated to a given doctor.
+         */
+        public HashTable<string, string> get_doctor_data (int64 id) {
+            HashTable<string, string> table = new HashTable<string, string> (GLib.str_hash, GLib.str_equal);
+            var doctor = resource_manager.data_provider.get_doctor (id);
+            
+            if (doctor == null)
+                return table;
+            
+            table["given_name"] = doctor.given_name;
+            table["surname"] = doctor.surname;
+            table["phone"] = doctor.phone;
+            table["mobile"] = doctor.mobile;
+            
+            return table;
+        }
+        
+        /** 
+         * @brief Retrieve a list of IDs of the the visits of the given patient (or of all the patients
+         * if id is 0). Optional time boundaries can be given in the internal format used by clinica, that
+         * is "yyyy mm dd hh mm ss"
+         */
+        public int64 [] get_patient_visits (int64 id = 0, string start = "", string end = "") {
+            int64 [] visits = {};
+            Patient? patient = null;
+            
+            DateTime? start_time = null;
+            DateTime? end_time = null;
+
+            if (start != "")            
+                start_time = SqliteDataProvider.string_to_datetime (start);
+            if (end != "")
+                end_time = SqliteDataProvider.string_to_datetime (end);
+            
+            if (id != 0) {
+                patient = resource_manager.data_provider.get_patient (id);
+                if (patient == null)
+                    return visits;
+            }
+            else
+                patient = null;
+            
+            foreach (var visit in resource_manager.data_provider.visits (patient, start_time, end_time)) {
+                visits += visit.id;
+            }
+            
+            return visits;
+        }
+        
+        /**
+         * @brief Retrieve the data associated with a visits.
+         */
+        public HashTable<string, string> get_visit_data (int64 id) {
+            var table = new HashTable<string, string> (GLib.str_hash, GLib.str_equal);
+            var visit = resource_manager.data_provider.get_visit (id);
+            
+            if (visit == null)
+                return table;
+                
+            table["anamnesis"] = visit.anamnesis;
+            table["physical_examination"] = visit.physical_examination;
+            table["laboratory_exam"] = visit.laboratory_exam;
+            table["histopathology"] = visit.histopathology;
+            table["diagnosis"] = visit.diagnosis;
+            table["topical_therapy"] = visit.topical_therapy;
+            table["systemic_therapy"] = visit.systemic_therapy;
+            table["subsequent_checks"] = visit.subsequent_checks;
+            table["date"] = SqliteDataProvider.datetime_to_string (visit.date);
+            table["patient"] = visit.patient.id.to_string ();
+            
+            return table;
+        }
+        
+        /** 
+         * @brief Retrieve a list of IDs of the the events with the optional
+         * time boundaries that can be given in the internal format used by clinica, that
+         * is "yyyy mm dd hh mm ss"
+         */        
+        public int64 [] get_events (string start = "", string end = "") {            
+            int64 [] events = {};
+            
+            DateTime? start_time = null;
+            DateTime? end_time = null;
+
+            if (start != "")            
+                start_time = SqliteDataProvider.string_to_datetime (start);
+            if (end != "")
+                end_time = SqliteDataProvider.string_to_datetime (end);
+            
+            foreach (var event in resource_manager.data_provider.events (start_time, end_time)) {
+                events += event.id;
+            }
+            
+            return events;
+        }
+        
+        public HashTable<string, string> get_event_data (int64 id) {
+            var table = new HashTable<string, string> (GLib.str_hash, GLib.str_equal);
+            
+            var event = resource_manager.data_provider.get_event (id);
+            if (event == null)
+                return table;
+                
+            table["title"] = event.title;
+            table["description"] = event.description;
+            table["venue"] = event.venue;
+            table["patient"] = (event.patient == null) ? "" : event.patient.id.to_string ();
+            table["visit"] = (event.visit == null) ? "" : event.visit.id.to_string ();
+            table["date"] = SqliteDataProvider.datetime_to_string (event.date);
+            
+            return table;
+        }
+        
+        /**
+         * @brief Open the vists of the patients specified by the given
+         * ID.
+         */
+        public void open_visits (int64 id) {
+            Patient p = resource_manager.data_provider.get_patient (id);
+            resource_manager.application.show_visits (p);
+        }
+        
+        public Service (ResourceManager resources) {
+            resource_manager = resources;
+        }
+        
+    }
+    
+    
+ }
diff --git a/libclinica/Settings.vala b/libclinica/Settings.vala
index 80965d3..4761dc2 100644
--- a/libclinica/Settings.vala
+++ b/libclinica/Settings.vala
@@ -24,7 +24,6 @@ namespace Clinica {
 
     private bool has_gsettings = false;
     
-
     public class Settings : GLib.Settings {
     
         private ResourceManager resource_manager { get; set; }
@@ -33,45 +32,36 @@ namespace Clinica {
          * @brief A pointer to the selected search engine for the medicines,
          * or null if not search engine is available nor selected.
          */
-        internal unowned MedicineSearchEngine selected_search_engine;
+        internal unowned List<MedicineSearchEngine> selected_search_engines;
         
         public Settings (ResourceManager resources) {
             string? my_schema = null;
             
             /* Check if clinica's schema is insatlled system-wide and, 
              * if it's found, use it. */
-            if ("org.phcteam.clinica" in list_schemas ()) {
-                has_gsettings = true;
-                my_schema = "org.phcteam.clinica";
-            }
+            has_gsettings = true;
+            my_schema = "org.phcteam.clinica";
             
             GLib.Object (
                 schema: my_schema
             );
+            
             resource_manager = resources;
             
             /* Select the right search engines according to user preferences */
-            var se_name = get_string ("medicine-search-engine");
-            if (se_name == "") {
-                /* No preference, select the first that is found */
-                if (resource_manager.medicine_search_engines.length () > 0) {
-                    selected_search_engine = resource_manager.medicine_search_engines.nth_data (0);
-                    set_string ("medicine-search-engine", selected_search_engine.get_name ());
-                }
-            }
-            else {
-                /* Select the one that was preferred, or nothing if that is not found */
+            var se_names = get_strv_safe ("medicine-search-engines");
+            foreach (var se_name in se_names) {
                 foreach (var engine in resource_manager.medicine_search_engines) {
                     if (engine.get_name () == se_name) {
-                        selected_search_engine = engine;
+                        selected_search_engines.append (engine);
                         break;
                     }
                 }
             }
         }
         
-        public unowned MedicineSearchEngine? get_medicine_search_engine () {
-            return selected_search_engine;
+        public unowned List<MedicineSearchEngine> get_medicine_search_engines () {
+            return selected_search_engines;
         }
         
         /**
@@ -79,11 +69,7 @@ namespace Clinica {
          * plugins as modules.
          */
         public string [] get_active_plugins () {
-            if (has_gsettings)
-                return get_strv ("active-plugins");
-            else {
-                return {};
-            }
+            return get_strv_safe ("active-plugins");
         }
         
         /**
@@ -92,33 +78,66 @@ namespace Clinica {
         public bool is_plugin_active (string plugin_name) {
             if (schema != null)
             {
-                string [] active_plugins = get_strv ("active_plugins");
+                string [] active_plugins = get_active_plugins ();
                 return (plugin_name in active_plugins);
             }
             else
                 return false;
         }
         
+        private string [] get_strv_safe (string key) {
+            string [] results = {};
+            foreach (var res in get_strv (key)) {
+                results += res;
+            }
+            
+            return results;
+        }
+        
+        public void activate_medicine_search_engine (string name) {
+            if (has_gsettings)
+                debug ("Activating search engine: %s", name);
+                if (! (name in get_strv_safe ("medicine-search-engines"))) {
+                    string [] active_engines = get_strv_safe ("medicine-search-engines");
+                    active_engines += name;
+                    set_value ("medicine-search-engines", active_engines);
+                }
+        }
+        
+        public void deactivate_medicine_search_engine (string name) {
+            debug ("Deactivating search engine: %s", name);
+            if (has_gsettings && name in get_strv_safe ("medicine-search-engines")) 
+            {
+                string [] active_engines = get_strv_safe ("medicine-search-engines");
+                string [] new_active_engines = {};
+                foreach (string pl in active_engines) {
+                    if (pl != name)
+                        new_active_engines += pl;
+                }
+                set_value ("medicine-search-engines", new_active_engines);
+            }
+        }
+        
         public void activate_plugin (string module_name) {
             if (has_gsettings)
-                if (! (module_name in get_strv ("active-plugins"))) {
-                    string [] active_plugins = get_strv ("active-plugins");
+                if (! (module_name in get_active_plugins ())) {
+                    string [] active_plugins = get_strv_safe ("active-plugins");
                     active_plugins += module_name;
-                    set_strv ("active-plugins", active_plugins);
+                    set_value ("active-plugins", active_plugins);
                 }
         }
         
         
         public void deactivate_plugin (string module_name) {
-            if (has_gsettings && module_name in get_strv ("active-plugins")) 
+            string [] active_plugins = get_strv_safe ("active-plugins");
+            if (has_gsettings && module_name in active_plugins) 
             {
-                string [] active_plugins = get_strv ("active-plugins");
                 string [] new_active_plugins = {};
                 foreach (string pl in active_plugins) {
                     if (pl != module_name)
                         new_active_plugins += pl;
                 }
-                set_strv ("active-plugins", new_active_plugins);
+                set_value ("active-plugins", new_active_plugins);
             }
         }
     }
diff --git a/libclinica/SettingsManager.vala b/libclinica/SettingsManager.vala
index 1dc1a56..cc9af6b 100644
--- a/libclinica/SettingsManager.vala
+++ b/libclinica/SettingsManager.vala
@@ -24,140 +24,298 @@ namespace Clinica {
 
     public class SettingsManager : Gtk.Window {
     
-        /**
-         * @brief Settings to set and read from.
-         */
+        private ResourceManager resource_manager;
+        
         private Settings settings;
         
-        private ResourceManager resource_manager;
+        private Clinica.Builder builder;
+        
+        private MedicineSearchEngineModel se_model;
         
+        private DataProviderModel dp_model;
+    
         public SettingsManager (ResourceManager resources) {
-            /* Init the GtkWindow object */
-            GLib.Object (type: Gtk.WindowType.TOPLEVEL);
             resource_manager = resources;
+            settings = resource_manager.settings;
+            set_title (_("Clinica settings"));
             
-            /* Load the settings of clinica */
-            this.settings = resources.settings;
+            // Create the Clinica Builder used to retrieve widgets
+            builder = new Clinica.Builder.with_filename (resource_manager,
+                "settings_window.glade");
+            builder.load_into_window (this);
             
-            /* Build up the interface */
-            build_ui ();
-            set_title (_("Clinica settings"));
+            // Load the plugin selector and put it in place
+            var plugins_alignment = builder.get_object ("plugins_alignment") as Alignment;            
+#if HAVE_PLUGINS
+            plugins_alignment.add (new PluginManager (resource_manager));
+#else
+            plugins_alignment.add (new Label (_("Clinica has been built without plugins support")));
+#endif
+            
+            // Bind the switch in the first page to their corresponding
+            // GSettings values. 
+            settings.bind ("use-plugins", builder.get_object ("plugins_switch") as Switch, 
+                "active", SettingsBindFlags.DEFAULT);
+            settings.bind ("show-visit-file-manager", builder.get_object ("browse_files_switch") as Switch,
+                "active", SettingsBindFlags.DEFAULT);
+                
+            // Bind the personal data of the doctor to the related GSettings
+            // values.
+            personal_details_init ();
+                
+            // Init the comboboxes for DataProvider and 
+            // MedicineSearchEngines selections
+            medicine_search_engine_tab_init ();
+            data_provider_combobox_init ();
+            
+            // DataProvider could change without being expressely chosen
+            // in the combobox, so in that case update it. 
+            resource_manager.notify["data-provider"].connect ((p) => select_active_data_provider ());
+            
+            // And finally the frames containing the connection data
+            // and the server configuration. 
+            connection_frame_init ();
+            server_frame_init ();
         }
         
-        /**
-         * @brief This functions take care of constructing
-         * all the pieces of the interface.
-         */
-        private void build_ui () {
-            var structure_vbox = new VBox (false, 6);
-            var notebook = new Notebook ();
-            
-            /* Create the use-plugins checkbox */
-            var plugins_switch = new SettingsSwitch (_("Use plugins (need restart)"));
-            settings.bind ("use-plugins", 
-                plugins_switch.switcher,
-                "active",
-                SettingsBindFlags.DEFAULT);
-            structure_vbox.pack_start (plugins_switch, false);
+        private void personal_details_init () {
+            settings.bind ("personal-details-name", builder.get_object ("name_entry") as Entry,
+                "text", SettingsBindFlags.DEFAULT);
+            settings.bind ("personal-details-address", builder.get_object ("address_entry") as Entry,
+                "text", SettingsBindFlags.DEFAULT);
+            settings.bind ("personal-details-institution", builder.get_object ("institution_entry") as Entry,
+                "text", SettingsBindFlags.DEFAULT);
+            settings.bind ("personal-details-email", builder.get_object ("email_entry") as Entry,
+                "text", SettingsBindFlags.DEFAULT);
+        }
+        
+        private void medicine_search_engine_tab_init () {
+            // Configure the treeview containing the Medicine search engines
+            se_model = new MedicineSearchEngineModel (resource_manager);
+            var se_view = builder.get_object ("medicine_search_engines_treeview") as TreeView;
+            se_view.set_model (se_model);
             
-            /* Create the selector for the search engine */
-            var mse_selector = new MedicineSearchEngineSelector (resource_manager);
-            structure_vbox.pack_start (mse_selector, false);
+            var active_renderer = builder.get_object ("active_cellrenderer") as Gtk.CellRendererToggle;
+            active_renderer.toggled.connect (on_active_cellrenderer_toggled);
+        }
+        
+        private void on_active_cellrenderer_toggled (Gtk.CellRenderer renderer, string path) {
+            Gtk.TreePath t_path = new Gtk.TreePath.from_string (path);
+            Gtk.TreeIter iter;
+            string name;
+            GLib.Value value;
+            bool active;
             
-            /* Add structure vbox to the first page of the Notebook */
-            var sv_alignment = new Alignment (0.5F, 0.5F, 1.0F, 1.0F);
-            sv_alignment.set_padding (6,6,6,6);
-            sv_alignment.add (structure_vbox);
-            notebook.append_page (sv_alignment, new Label (_("General")));
+            se_model.get_iter (out iter, t_path);
             
-            /* Plugins window in the Notebook */
-            notebook.append_page (new PluginManager (resource_manager), 
-                new Label (_("Plugins")));
+            se_model.get_value (iter, 0, out value);
+            active = (bool) value;
             
-            /* Ask for a window sufficiently large */
-            set_size_request (240, 380  );
+            se_model.get_value (iter, 1, out value);
+            name = value as string;
             
-            /* Create an alignment to set the right padding */
-            var alignment = new Alignment (0.5F, 0.5F, 1.0F, 1.0F);
-            alignment.set_padding (6, 6, 6, 6);
-            alignment.add (notebook);
+            se_model.set_value (iter, 0, !active);
             
-            add (alignment);
+            se_model.get_value (iter, 2, out value);
+            if (! active) {
+                resource_manager.settings.selected_search_engines.append (value as MedicineSearchEngine);
+                resource_manager.settings.activate_medicine_search_engine (name);
+            }
+            else {
+                resource_manager.settings.selected_search_engines.remove (value as MedicineSearchEngine);
+                resource_manager.settings.deactivate_medicine_search_engine (name);
+            }        
+        }
+        
+        
+        private void data_provider_combobox_init () {
+            // ...and the one that allows to choose the data providers
+            dp_model = new DataProviderModel (resource_manager);
+            var dp_combobox = builder.get_object ("data_sources_combobox") as ComboBox;
+            dp_combobox.set_model (dp_model);
+            select_active_data_provider ();       
+            dp_combobox.changed.connect (on_dp_combobox_changed); 
+        }
+        
+        private void on_dp_combobox_changed () {
+            var dp_combobox = builder.get_object ("data_sources_combobox") as ComboBox;
+            Gtk.TreeIter active_iter;
+            dp_combobox.get_active_iter (out active_iter);
+            Value dp_value;
+            dp_model.get_value (active_iter, 1, out dp_value);
+            
+            // Check that the DataProvider selected by the user does not match a NetworkDataProvider.
+            // In that case the user should use the Network tab to configure it. 
+            if ((dp_value as DataProvider) is NetworkedDataProvider && 
+                !resource_manager.networked_data_provider.connected) {
+                var info_dialog = new Gtk.MessageDialog (null,
+                    Gtk.DialogFlags.DESTROY_WITH_PARENT | Gtk.DialogFlags.MODAL,
+                    Gtk.MessageType.INFO, 
+                    Gtk.ButtonsType.OK,
+                    "%s", _("Please use the Network tab to enable the Networked data provider"));
+                info_dialog.set_title (_("Use the Network tab"));
+                info_dialog.run ();
+                info_dialog.destroy ();
+                
+                select_active_data_provider ();
+            }
+            else
+                resource_manager.select_data_provider (dp_value as DataProvider);
+        }
+        
+        private void connection_frame_init () {
+            // Bind the fields to the corresponing GSettings values
+            var host_entry = builder.get_object ("host_entry") as Entry;
+            settings.bind ("network-data-provider-host", host_entry, "text", SettingsBindFlags.DEFAULT);
+            var port_entry = builder.get_object ("port_entry") as Entry;
+            settings.bind ("network-data-provider-port", port_entry, "text", SettingsBindFlags.DEFAULT);
+            
+            // Update the Label inside the connect button and the state of the 
+            // DataProvider selector
+            update_connect_button_label ();
+            
+            var connect_button = builder.get_object ("connect_button") as Button;
+            connect_button.clicked.connect (on_connect_button_clicked);
+        }
+        
+        private void update_connect_button_label () {
+            var button = builder.get_object ("connect_button") as Button;
+            var label = button.get_child () as Label;
+            
+            label.set_text (resource_manager.networked_data_provider.connected ? 
+                _("Disconnect") : _("Connect"));
+                
+            // Update the status of the combobox with the data provider. 
+            var dp_combobox = builder.get_object ("data_sources_combobox") as ComboBox;
+            dp_combobox.set_sensitive (!resource_manager.networked_data_provider.connected);
+        }
+        
+        private void on_connect_button_clicked (Button button) {
+            var host_entry = builder.get_object ("host_entry") as Entry;
+            var port_entry = builder.get_object ("port_entry") as Entry;
+        
+            if (resource_manager.networked_data_provider.connected)
+                resource_manager.networked_data_provider.disconnect_from_server ();
+                host_entry.set_sensitive (true);
+                port_entry.set_sensitive (true);
+                
+                if (resource_manager.data_provider == resource_manager.networked_data_provider as DataProvider) {
+                    resource_manager.select_data_provider (resource_manager.sqlite_data_provider);
+                }
+            else {
+                if (!resource_manager.networked_data_provider.connect_to_server (
+                    host_entry.get_text (), int.parse (port_entry.get_text ()))) {
+                    debug ("Connection to the given host failed");
+                    var connection_failed_dialog = new MessageDialog (this, DialogFlags.MODAL, 
+                        MessageType.ERROR, ButtonsType.OK,
+                        "%s", _("Connection to the given host failed. Please check your settings."));
+                    connection_failed_dialog.set_title (_("Connection failed"));
+                    connection_failed_dialog.run ();
+                    connection_failed_dialog.destroy (); 
+                    
+                    update_connect_button_label ();
+
+                    return;
+                }
+                    
+                if (!resource_manager.networked_data_provider.try_authentication (host_entry.get_text (), 
+                            port_entry.get_text (), resource_manager.networked_data_provider.username,
+                            resource_manager.networked_data_provider.password)) {
+                    resource_manager.networked_data_provider.disconnect_from_server ();
+                    var dialog = new MessageDialog (this, DialogFlags.MODAL, MessageType.ERROR, ButtonsType.OK,
+                        "%s", _("Username or password are wrong. Disconnecting from the server."));
+                    dialog.set_title (_("Wrong authentication data has been provided"));
+                    dialog.run ();
+                    dialog.destroy ();
+                }
+                else {
+                    resource_manager.select_data_provider (resource_manager.networked_data_provider);
+                    host_entry.set_sensitive (false);
+                    port_entry.set_sensitive (false);
+                }
+            }
+            
+            update_connect_button_label ();
         }
-    }
-    
-    public class SettingsSwitch : HBox {
-    
-        public Switch switcher;
         
-        public SettingsSwitch (string label) {
-            GLib.Object (homogeneous: false, spacing: 6);
+        private void server_frame_init () {
+            // Bind the Switch to select if the DataServer is active
+            var data_server_switch = builder.get_object ("data_server_switch") as Switch;
+            settings.bind ("data-server-activated", data_server_switch, "active", SettingsBindFlags.DEFAULT);
             
-            switcher = new Switch ();
-            var my_label = new Label (label);
-            my_label.set_alignment (0.0F, 0.5F);
+            var username_entry = builder.get_object ("username_entry") as Entry;
+            var password_entry = builder.get_object ("password_entry") as Entry;
             
-            pack_start (my_label,  true,  true);
-            pack_start (switcher, false, true);
+            // Bind username and password, properly hashing the password in the database
+            settings.bind ("data-server-username", username_entry, "text", 
+                SettingsBindFlags.DEFAULT);
+                
+            // Setup password changer
+            password_entry.set_text ("Password");
+            password_entry.focus_in_event.connect ((entry, event) => {
+                password_entry.set_text ("");
+                return true;
+            });
+            password_entry.changed.connect ((editable) => {
+                var entry = editable as Entry;
+                var password = entry.get_text ();
+                if (password != "")
+                    settings.set_string ("data-server-password",
+                        Checksum.compute_for_string (ChecksumType.SHA1, password, -1));
+            }); 
+        }
+        
+        private void select_active_data_provider () {
+            var dp_combobox = builder.get_object ("data_sources_combobox") as ComboBox;
+            Gtk.TreeIter iter;
+            if (dp_model.get_iter_first (out iter)) {
+                do {
+                    Value data_provider_value;
+                    dp_model.get_value (iter, 1, out data_provider_value);
+                    
+                    if ((data_provider_value as DataProvider) == resource_manager.data_provider) {
+                        dp_combobox.set_active_iter (iter);
+                    }
+                } while (dp_model.iter_next (ref iter));
+            }
         }
+    
     }
     
-    public class MedicineSearchEngineSelector : HBox {
+    private class MedicineSearchEngineModel : Gtk.ListStore {
         
-        private ResourceManager resource_manager { get; set; }
-        private ComboBoxText    medicine_se_selector;
+        private ResourceManager resource_manager;
         
-        public MedicineSearchEngineSelector (ResourceManager resources) {
-            GLib.Object (homogeneous: false, spacing: 6);
+        public MedicineSearchEngineModel (ResourceManager resources) {
+            Type [] column_headers = { typeof (bool), typeof (string) , typeof (MedicineSearchEngine) };
+            set_column_types (column_headers);
+            
             resource_manager = resources;
-            var label = new Label (_("Select the search engine\nused to find medicines"));
-            label.set_alignment (0.0F, 0.5F);
-            pack_start (label);
-            
-            /* Create the combobox and keep a track of its position in the array. */
-            medicine_se_selector = new ComboBoxText ();
-            refresh_engines_list ();
-            resource_manager.medicine_search_engines_added.connect ((engine) => refresh_engines_list ());
-            resource_manager.medicine_search_engines_removed.connect ((engine) => refresh_engines_list ());
-            pack_start (medicine_se_selector, false, true);
-            medicine_se_selector.changed.connect (on_medicine_se_selector_changed);
-        }
         
-        private void on_medicine_se_selector_changed () {
-            string? active_id = medicine_se_selector.get_active_id ();
-            if (active_id == null)
-                return;
-            var index = int.parse (active_id);
-            resource_manager.settings.selected_search_engine = 
-                resource_manager.medicine_search_engines.nth_data (index);
-            resource_manager.settings.set_string ("medicine-search-engine", 
-                resource_manager.settings.selected_search_engine.get_name ());
+            foreach (var search_engine in resource_manager.medicine_search_engines) {
+                Gtk.TreeIter iter;
+                append (out iter);
+                set_value (iter, 0, resource_manager.settings.get_medicine_search_engines ().index (search_engine) != -1);
+                set_value (iter, 1, search_engine.get_name ());
+                set_value (iter, 2, search_engine);
+            }
         }
         
-        private void refresh_engines_list () {
-            int i = 0;
-            medicine_se_selector.remove_all ();
-            
-            /* If no preference is set set the first engine as selected */
-            if (resource_manager.settings.get_string ("medicine-search-engine") == "") {
-                if (resource_manager.medicine_search_engines.length () != 0) {
-                    resource_manager.settings.selected_search_engine = 
-                        resource_manager.medicine_search_engines.nth_data (0);
-                    resource_manager.settings.set_string ("medicine-search-engine", 
-                        resource_manager.settings.selected_search_engine.get_name ());
-                }
-            }
+    }
+    
+    private class DataProviderModel : Gtk.ListStore {
+        
+        private ResourceManager resource_manager;
+    
+        public DataProviderModel (ResourceManager resources) {
+            resource_manager = resources;
+            set_column_types ({ typeof (string), typeof (DataProvider) });
             
-            /* Load engines in the liststore */
-            foreach (var engine in resource_manager.medicine_search_engines) {
-                medicine_se_selector.append ("%d".printf (i++), engine.get_name ());
-                if (resource_manager.settings.get_string ("medicine-search-engine") == engine.get_name ()) {
-                    debug ("Loading search engine: %s", engine.get_name ());
-                    resource_manager.settings.selected_search_engine = engine;
-                }
-                if (engine == resource_manager.settings.selected_search_engine) {
-                    medicine_se_selector.set_active (i - 1);
-                }
+            foreach (var data_provider in resource_manager.data_providers) {
+                Gtk.TreeIter iter;
+                append (out iter);
+                set_value (iter, 0, data_provider.get_name ());
+                set_value (iter, 1, data_provider);
             }
         }
     }
diff --git a/libclinica/Sidebar.vala b/libclinica/Sidebar.vala
new file mode 100644
index 0000000..a6dfb51
--- /dev/null
+++ b/libclinica/Sidebar.vala
@@ -0,0 +1,155 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+
+namespace Clinica {
+
+    public class Sidebar : Gtk.Box {
+    
+        /**
+         * @brief Size of the Icon that shall be used when
+         * creating a SidebarEntry. 
+         *
+         * SidebarEntry's pixbuf will be used directly if it 
+         * has this size, otherwise it will be scaled down or
+         * up to match it. 
+         */
+        public static const int ICON_SIZE = 24;
+        
+        /**
+         * @brief Store containing the list of pages that can
+         * be opened from the menu.
+         */
+        private Gtk.TreeStore pages_store;
+        
+        /**
+         * @brief TreeView displaying the data of the pages_store
+         */
+        private Gtk.TreeView pages_view;
+
+        /**
+         * @brief ResourceManager associated with this Clinica instance.
+         */
+        private ResourceManager resource_manager;
+        
+        public Sidebar (ResourceManager resources) {
+            Object (orientation: Gtk.Orientation.VERTICAL);
+            resource_manager = resources;
+            
+            // Create the new store that will store the names of the pages being 
+            // loaded, and a pointer to the pages.
+            pages_store = new Gtk.TreeStore (3, typeof (Gdk.Pixbuf), typeof (string), typeof (SidebarEntry));
+            
+            // Create a TreeView to display the Pages loaded in the current
+            // UserInterface instance. 
+            pages_view = new Gtk.TreeView.with_model (pages_store);
+            pages_view.insert_column_with_attributes (-1, "", new Gtk.CellRendererPixbuf (), "pixbuf", 0);
+            
+            // Set the ellipsize mode on the renderer in a way that prevent long names
+            // to break the UI. 
+            var pages_renderer = new Gtk.CellRendererText ();
+            pages_renderer.ellipsize = Pango.EllipsizeMode.END;
+            
+            pages_view.insert_column_with_attributes (-1, _("Pages"), pages_renderer, "text", 1);
+            pages_view.set_headers_visible (false);
+            
+            // Create the scrolledwindow for the TreeView in case we get short
+            // on vertical space. 
+            var scrolled_window = new Gtk.ScrolledWindow (null, null);
+            scrolled_window.add (pages_view);
+            scrolled_window.set_shadow_type (Gtk.ShadowType.ETCHED_IN);
+            scrolled_window.set_policy (Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
+            pack_start (scrolled_window, true, true, resource_manager.PADDING);
+            
+            // Connect callbacks
+            pages_view.get_selection ().changed.connect (on_pages_view_selection_changed);
+        }
+        
+        public void expand_all () {
+            pages_view.expand_all ();
+        }
+        
+        private void on_pages_view_selection_changed (Gtk.TreeSelection selection) {
+            Gtk.TreeIter iter;
+            if (selection.get_selected (null, out iter)) {
+                Value entry;
+                pages_store.get_value (iter, 2, out entry);
+                (entry as SidebarEntry).activated ();
+            }
+        }
+        
+        public void add_entry (SidebarEntry entry, SidebarEntry? parent = null) {
+            Gtk.TreeIter iter;
+            Gtk.TreeIter? parent_iter = null;
+            
+            if (parent != null)
+                parent_iter = search_entry (parent);
+                
+            pages_store.append (out iter, parent_iter);
+            
+            var pixbuf = entry.pixbuf ();
+            if ((pixbuf.width != ICON_SIZE || pixbuf.height != ICON_SIZE)) {
+                debug ("Scaling down icon for the sidebar since does not match ICON_SIZE property");
+                pixbuf = pixbuf.scale_simple (ICON_SIZE, ICON_SIZE, Gdk.InterpType.BILINEAR);
+            }
+            
+            pages_store.set_value (iter, 0, pixbuf);
+            pages_store.set_value (iter, 1, entry.title ());
+            pages_store.set_value (iter, 2, entry);
+            
+            var path = pages_store.get_path (iter);
+            pages_view.expand_to_path (path);
+        }
+        
+        public Gtk.TreeIter search_entry (SidebarEntry entry) {
+            Gtk.TreeIter found_iter = Gtk.TreeIter ();
+            pages_store.foreach ((model, path, iter) => {
+                Value _entry;
+                model.get_value (iter, 2, out _entry);
+                if ((_entry as SidebarEntry) == entry) {
+                    found_iter = iter;
+                    return true;
+                }
+                return false;
+            });
+            return found_iter;
+        }
+        
+        public void select_entry (SidebarEntry entry) {
+            Gtk.TreeIter iter = search_entry (entry);
+            if (pages_store.iter_is_valid (iter)) {
+                    var path = pages_store.get_path (iter);
+                    var selection = pages_view.get_selection ();
+                    selection.select_path (path);
+            }
+        }
+        
+        public void remove_entry (SidebarEntry entry) {
+            var iter = search_entry (entry);
+            if (pages_store.iter_is_valid (iter)) {
+#if VALA_0_18            
+                pages_store.remove (ref iter);
+#else
+                pages_store.remove (iter);
+#endif                
+            }
+        }
+    
+    }
+
+}
diff --git a/libclinica/PatientDetail.vala b/libclinica/SidebarCalendarEntry.vala
similarity index 53%
copy from libclinica/PatientDetail.vala
copy to libclinica/SidebarCalendarEntry.vala
index 3139b0f..6a181a4 100644
--- a/libclinica/PatientDetail.vala
+++ b/libclinica/SidebarCalendarEntry.vala
@@ -15,24 +15,27 @@
  *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
  *
  *   Authors: Leonardo Robol <leo at robol.it>
- *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
  */
-
-using Gtk;
-
+ 
 namespace Clinica {
 
-	public class PatientDetail : VBox {
-	
-		private Patient patient;
-	
-		public PatientDetail(Patient p) {
-			/* Initial setup */
-			GLib.Object(homogeneous: false);
-			patient = p;
-			
-			pack_start (new Label("boh"));
-		}
-	}
+    public class SidebarCalendarEntry : Object, SidebarEntry {
+    
+        private Gdk.Pixbuf _pixbuf;
+        private string _title;
+    
+        public SidebarCalendarEntry (ResourceManager resources) {
+            _pixbuf = Utils.pixbuf_from_svg_resource (Config.RESOURCE_BASE + "ui/icons/calendar.svg", 
+            Sidebar.ICON_SIZE, Sidebar.ICON_SIZE);
+            _title = _("Calendar");
+            activated.connect ((entry) => 
+                resources.user_interface.show_calendar_window ());
+        }
+        
+        public string title () { return _title; }
+        
+        public Gdk.Pixbuf? pixbuf () { return _pixbuf; }
+    
+    }
 
 }
diff --git a/libclinica/PatientDetail.vala b/libclinica/SidebarEntry.vala
similarity index 53%
copy from libclinica/PatientDetail.vala
copy to libclinica/SidebarEntry.vala
index 3139b0f..bd1337c 100644
--- a/libclinica/PatientDetail.vala
+++ b/libclinica/SidebarEntry.vala
@@ -15,24 +15,34 @@
  *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
  *
  *   Authors: Leonardo Robol <leo at robol.it>
- *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
  */
 
-using Gtk;
-
 namespace Clinica {
 
-	public class PatientDetail : VBox {
-	
-		private Patient patient;
-	
-		public PatientDetail(Patient p) {
-			/* Initial setup */
-			GLib.Object(homogeneous: false);
-			patient = p;
-			
-			pack_start (new Label("boh"));
-		}
-	}
+    /**
+     * @brief This interface represent a generic entry in the Sidebar
+     * of Clinica. 
+     */
+    public interface SidebarEntry : Object {
+    
+        /**
+         * @brief The name to be displayed in the Sidebar for this
+         * element.
+         */
+        public abstract string title ();
+        
+        /**
+         * @brief The Pixmap element to be drawn in the sidebar, or 
+         * null if no icon is needed.
+         */
+        public abstract Gdk.Pixbuf? pixbuf ();
+        
+        /**
+         * @brief This signal is fired when the sidebar entry gets
+         * activated by the user.
+         */
+        public signal void activated ();
+    
+    }
 
 }
diff --git a/libclinica/SidebarPageEntry.vala b/libclinica/SidebarPageEntry.vala
new file mode 100644
index 0000000..d21971c
--- /dev/null
+++ b/libclinica/SidebarPageEntry.vala
@@ -0,0 +1,58 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+
+namespace Clinica {
+
+    /**
+     * @brief A SidebarEntry that loads the given page when
+     * activated.
+     */
+    public class SidebarPageEntry : Object, SidebarEntry {
+    
+        /**
+         * @brief The Page linked to this sidebar entry.
+         */
+        private Page page;
+        
+        private Gdk.Pixbuf _pixbuf;
+        
+        private string _name;
+    
+        public SidebarPageEntry (ResourceManager resources, Page page, string name, Gdk.Pixbuf pixbuf) {
+            this.page = page;
+            _name = name;
+            _pixbuf = pixbuf;
+            
+            // Connet the activated signal to the loading of the
+            // page. 
+            activated.connect ((entry) => 
+                resources.user_interface.load_page (page));
+        }
+        
+        public string title () {
+            return _name;
+        }
+        
+        public Gdk.Pixbuf? pixbuf () {
+            return _pixbuf;
+        }
+    
+    }
+
+}
diff --git a/libclinica/SqlDataType.vala b/libclinica/SqlDataType.vala
deleted file mode 100644
index 3e62f3f..0000000
--- a/libclinica/SqlDataType.vala
+++ /dev/null
@@ -1,397 +0,0 @@
-/*
- *   This file is part of Clinica.
- *
- *   Clinica is free software: you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation, either version 3 of the License, or
- *   (at your option) any later version.
- *
- *   Clinica is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
- *
- *   Authors: Leonardo Robol <leo at robol.it>
- *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
- */
-
-using Sqlite;
-using Gee;
-
-namespace Clinica {
-
-    /**
-     * @brief Struct representing a column in the database.
-     */
-    public class SqlColumn {
-        public string  type;
-        public string  v;
-        
-        public SqlColumn (string type) {
-            this.type = type;
-        }
-    }
-    
-    public class SqlDataIterator : GLib.Object {
-
-        protected unowned Database db;
-        protected Statement stmt;
-
-        public SqlDataIterator (Database db, string table_name, string? order_by = null, bool desc = false) {
-            this.db = db;
-            if (order_by == null)
-                db.prepare (@"SELECT ID FROM $(table_name);", -1, out stmt, null);
-            else {
-                if (desc)
-                    db.prepare (@"SELECT ID FROM $(table_name) ORDER by $(order_by) DESC;", -1, out stmt, null);
-                else
-                    db.prepare (@"SELECT ID FROM $(table_name) ORDER by $(order_by);", -1, out stmt, null);
-            }
-        }
-        
-        public SqlDataIterator.with_like (Database db, string table_name, string? order_by = null, 
-            bool desc = false, string where_stmt) {
-            this.db = db;
-            
-            if (order_by == null)
-                db.prepare (@"SELECT ID FROM $(table_name) WHERE $(where_stmt);", -1, out stmt, null);
-            else {
-                if (desc)
-                    db.prepare (@"SELECT ID FROM $(table_name) WHERE $(where_stmt) ORDER by $(order_by) DESC;", -1, out stmt, null);
-                else
-                    db.prepare (@"SELECT ID FROM $(table_name) WHERE $(where_stmt) ORDER by $(order_by);", -1, out stmt, null);
-            }
-        }
-        
-        public SqlDataIterator iterator () {
-            return this;
-        }
-        
-        public bool next () {
-            return (stmt.step () == ROW);
-        }
-            
-        public new int get () {
-            return stmt.column_int (0);
-        }
-    }
-
-    /**
-     * @brief Interface representing an abstract data
-     * type interfaced to a SQLite database. 
-     */
-    public class SqlDataType : GLib.Object {
-    
-        /**
-         * @brief Signal emitted when an error eris
-         * encountered
-         */
-        public signal void error (string message);
-        
-        /**
-         * @brief The table name in the database. Must be set
-         * by the class implementing this interface.
-         */
-        public string table_name;
-        
-        /**
-         * @brief The database object used to interact with
-         * the sqlite database. It must be opened by the
-         * class implementing this interface. 
-         */
-        public unowned Database db;
-        
-        /**
-         * @brief Hash mapping column_name -> type, value.
-         */
-        public HashMap<string, SqlColumn?> columns;
-        
-        public SqlDataType (Database db) {
-            this.db = db;
-            columns = new HashMap<string, SqlColumn> ();
-            this.columns.set ("ID", new SqlColumn ("INTEGER PRIMARY KEY"));
-            set_integer ("ID", 0);
-        }
-        
-        public SqlDataType.with_id (Database db, int ID) {
-            this (db);
-            load (ID);
-        }
-        
-        protected void add_text_field (string name) {
-            this.columns.set (name, new SqlColumn ("TEXT"));
-        }
-        
-        protected void add_integer_field (string name) {
-            this.columns.set (name, new SqlColumn ("INTEGER"));
-        }
-        
-        protected void add_date_field (string name) {
-        	this.columns.set (name, new SqlColumn ("TEXT"));
-        }
-        
-        /**
-         * @brief Escape a string and surround it with
-         * double quotes ready to be inserted in the 
-         * database.
-         */
-        protected string quote (string str) {
-            return "\"" + str.escape ("") + "\"";
-        }
-        
-        /**
-         * @brief Initialize resource, i.e. open the database
-         * and check for missing tables.
-         */
-        protected void init_resources () {
-	        lock (db) {
-			    Statement stmt;
-			    
-			    /* Check if the table is present in the database and if it's
-			     * not, create it */
-			    db.prepare (@"SELECT * from sqlite_master WHERE name='$(table_name)';",
-			                -1, out stmt, null);
-			                
-			    if (stmt.step () == DONE) {
-			        init_database ();
-			    }
-		    }
-        }
-        
-        /**
-         * @brief Create table structure in the database.
-         */
-        protected void init_database () {
-            Statement stmt;
-            string sql = @"CREATE TABLE $(table_name) (";
-            foreach (Map.Entry<string, SqlColumn> e in columns.entries) {
-                sql += @"$(e.key) $(e.value.type), ";
-            }
-            
-            /* Remove last 2 characters ", " and add ); */
-            sql = sql[0:-2];
-            sql += ");";
-            
-            /* Execute query */
-            db.prepare (sql, -1, out stmt, null);
-            
-            if (stmt.step () != DONE) {
-                error (@"Error creating $(table_name) table in the database.");
-            }
-        }
-        
-        public string get_db_table_name () {
-            return this.table_name;
-        }
-        
-        public void set_text (string field, string val) {
-        	if (!columns.has_key (field)) {
-        		error (@"Error saving to field $(field) from table $(table_name)\n" + 
-        				"Selected field is not present in database");
-        		return;
-        	}
-            SqlColumn col = columns.get (field);
-            col.v = val;
-            columns.set (field, col);
-        }
-        
-        public unowned string get_text (string field) {
-        	if (!columns.has_key (field)) {
-        		error (@"Error loading from field $(field) from table $(table_name)\n" + 
-        				"Selected field is not present in database");
-        		return "";
-        	}
-            SqlColumn col = columns.get (field);
-            if (col.v != null)
-                return col.v;
-            else
-                return "";
-        }
-        
-        public unowned int get_integer (string field) {
-        	if (!columns.has_key (field)) {
-        		error (@"Error loading from field $(field) from table $(table_name)\n" + 
-        				"Selected field is not present in database");
-        		return 0;
-        	}
-            SqlColumn col = columns.get (field);
-            return int.parse (col.v);
-        }
-        
-        public DateTime get_date (string field) {
-        	if (!columns.has_key (field)) {
-        		error (@"Error loading from field $(field) from table $(table_name)\n" + 
-        				"Selected field is not present in database");
-        		return new DateTime.now_utc ();
-        	}
-        	SqlColumn col = columns.get (field);
-        	string [] fields = col.v.split(" ");
-        	
-        	int year = int.parse (fields[0]);
-        	int month = int.parse (fields[1]);
-        	int day = int.parse (fields[2]);
-        	int hour = int.parse (fields[3]);
-        	int minute = int.parse (fields[4]);
-        	int seconds = int.parse (fields[5]);
-        	
-        	if (year < 1 || year > 9999 || 
-        		month < 1 || month > 12 ||
-        		day < 1 || day > 31 ||
-        		minute < 0 || minute > 59 ||
-        		seconds < 0 || seconds > 59)
-        		return new DateTime.now_local ();
-        	
-        	return new DateTime.local (year, month, day, hour, minute, seconds);
-        }
-        
-        public void set_date (string field, DateTime date) {
-        	if (!columns.has_key (field)) {
-        		error (@"Error saving tofield $(field) from table $(table_name)\n" + 
-        				"Selected field is not present in database");
-        		return;
-        	}
-        	SqlColumn col = columns.get (field);
-        	col.v = datetime_to_string (date);
-        }
-        
-        public static string datetime_to_string (DateTime date) {
-            return string.join(" ", 
-        		date.get_year ().to_string (), 
-        		"%.2d".printf (date.get_month ()), 
-        		"%.2d".printf (date.get_day_of_month()), 
-        		"%.2d".printf (date.get_hour ()), 
-        		"%.2d".printf (date.get_minute ()), 
-        		"%.2d".printf (date.get_second ()));
-        }
-        
-        public int get_id () {
-            return get_integer ("ID");
-        }
-        
-        public void set_integer (string field, int64 val) {
-        	if (!columns.has_key (field)) {
-        		error (@"Error saving tofield $(field) from table $(table_name)\n" + 
-        				"Selected field is not present in database");
-        		return;
-        	}
-            SqlColumn col = columns.get (field);
-            if (field == "ID" && val == 0)
-                col.v = "NULL";
-            else
-                col.v = val.to_string ();
-            columns.set (field, col);
-        }
-        
-        public new string get (string field) {
-            return get_text (field);
-        }
-        
-        public new void set (string field, string value) {
-            set_text (field, value);
-        }
-        
-        /**
-         * @brief Save changes permanently in the database
-         */
-        public void save () {
-            Statement stmt;
-            string sql = @"INSERT OR REPLACE INTO $(table_name) (";
-            foreach (Map.Entry<string, SqlColumn> e in columns.entries) {
-                sql += @"$(e.key), ";
-            }
-            
-            sql = sql[0:-2];
-            sql += ") VALUES (";
-
-            foreach (Map.Entry<string, SqlColumn> e in columns.entries) {
-                if (e.value.v != null) {
-                    if (e.value.type == "TEXT")
-                        sql += @"$(quote(e.value.v)), ";
-                    else
-                        sql += @"$(e.value.v), ";
-                }
-                else {
-                    sql += ", ";
-                }
-            }
-            
-            sql = sql[0:-2]; sql += ");";
-            db.prepare (sql, -1, out stmt, null);
-            if (stmt.step () != DONE) {
-                error (@"Error inserting values in the database $(table_name)\n Error $(db.errcode()): $(db.errmsg ())");
-            }
-            
-            /* If we save with ID set to 0 then the ID will be autodetermined
-             * by sqlite so we should get it back */
-            if (get_id () == 0) {
-            	set_integer("ID", db.last_insert_rowid());
-            }
-        }
-        
-        /**
-         * @brief Load data from database, overwriting local
-         * variables.
-         */
-        public void load (int ID = 0) {
-            if (ID == 0)
-                ID = get_integer ("ID");
-                
-            Statement stmt;
-            string sql = "SELECT ";
-            foreach (Map.Entry<string, SqlColumn> e in columns.entries) {
-                sql += @"$(e.key), ";
-            }
-            
-            sql = sql[0:-2];
-            sql += @" FROM $(table_name) WHERE ID=$(ID);";
-            
-            db.prepare (sql, -1, out stmt, null);
-            if (stmt.step () !=ROW) {
-                error (@"Error loading data from table $(table_name).");
-                return;
-            }
-            
-            int i = 0;
-            foreach (Map.Entry<string, SqlColumn> e in columns.entries) {
-            	if (e.value.type == "TEXT")
-            		e.value.v = stmt.column_text (i).compress ();
-            	else
-	                e.value.v = stmt.column_text (i);
-                i++;
-            }
-        }
-        
-        /**
-         * @brief Delete this item permanently from the database.
-         */
-        public void remove () {
-        	Statement stmt;
-        	string sql = @"DELETE from $(table_name) WHERE ID=$(get_id ());";
-        	
-        	db.prepare (sql, -1, out stmt, null);
-        	if (stmt.step () != DONE) {
-        		error (@"Error deleting item from the database $(table_name)");
-        	}
-        }
-        
-        /**
-         * @brief Find IDs of elements in ex_table (that is assumed to be a table
-         * associateed to another SqlDataType object and return a vector
-         * containing their IDs. 
-         */ 
-        public GLib.List<int> associated_ids (string ex_table, string foreign_key) {
-        	var ids = new GLib.List<int> ();
-        	Statement stmt;
-        	string sql = @"SELECT ID from $(ex_table) WHERE $(foreign_key)=$(get_id());";
-        	
-        	db.prepare (sql, -1, out stmt, null);
-        	while (stmt.step () == ROW) {
-        		ids.append (stmt.column_int (0));
-        	}
-        	return ids;
-        }
-    }
-}
diff --git a/libclinica/SqliteDataProvider.vala b/libclinica/SqliteDataProvider.vala
new file mode 100644
index 0000000..cf3b81a
--- /dev/null
+++ b/libclinica/SqliteDataProvider.vala
@@ -0,0 +1,773 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+
+using Sqlite;
+using Gtk;
+
+namespace Clinica {
+
+    public class SqliteDataProvider : Object, DataProvider {
+    
+        public signal void error (string message);
+    
+        /**
+         * @brief Name of the table in the database where the visits
+         * will be stored. Please note that changing this will require
+         * a database upgrade, so should be handled correctly.
+         */
+        internal string visit_table = "visits";
+        
+        /**
+         * @brief Name of the table in the database where the patients
+         * will be stored. Please note that changing this will require
+         * a database upgrade, so should be handled correctly.
+         */
+        internal string patient_table = "patients";
+        
+        /**
+         * @brief Name of the table in the database where the doctors
+         * will be stored. Please note that changing this will require
+         * a database upgrade, so should be handled correctly.
+         */
+        internal string doctor_table = "doctors";
+        
+        /**
+         * @brief Name of the table in the database where the events
+         * will be stored. Please note that changing this will require
+         * a database upgrade, so should be handled correctly.
+         */
+        internal string event_table = "events";
+        
+        /**
+         * @brief The absolute path of the database (typically on Linux systems
+         * will be ~/.local/share/clinica/clinica.db.
+         */
+        private string database_path;
+        
+        /**
+         * @brief The ResourceManager of this instance of the Clinica Application.
+         */
+        private ResourceManager resource_manager { get; set; }
+        
+        /**
+         * @brief The Sqlite.Database object - this is used to interact with the database
+         * by the SqliteDataProvider and all the Sqlite*Iterator classes that are generated
+         * from here.
+         */
+        internal Database db;
+        
+        /**
+         * @brief The FileStore object associated to this DataProvider.
+         *
+         * In our case the implementation provided in LocalFileStore is
+         * used.*/
+        private FileStore file_store;
+        
+        /**
+         * @brief An array containing the supported versione of the db. This should
+         * contain the value db_version and means that this SqliteProvider is capable
+         * of Database migration from any of these old version to the most recent one.
+         */
+        private const string [] supported_db_versions = { "0.1", "0.2" };
+        
+        /**
+         * @brief The version of the database that is in use now, or that should
+         * be used to compatbile with this SqliteDataProvider.
+         *
+         * Please note that Database version are not the same of Clinica versions.
+         * Typically the same clinica versions will use the same Database version,
+         * but the other way is not always true.
+         */
+        private const string db_version = "0.2";
+    
+        public SqliteDataProvider (ResourceManager resources) {
+            resource_manager = resources;
+            error.connect ((t,l) => warning (l));
+            
+            file_store = new LocalFileStore (resource_manager);
+            
+            /* Find the database in all the possible paths for the various
+             * versions of Clinica, and then possibly do un upgrade, querying
+             * the user if necessary. */
+            check_database_path ();
+            check_updates ();
+            
+            /* This is used to create the tables if they do not exists */
+            init_resources ();
+        }
+        
+        public FileStore? get_file_store () {
+            return file_store;
+        }
+        
+        /**
+         * @brief Get the identifier for this DataProvider to be displayed
+         * to the user.
+         *
+         * It has not to be translated since it will be used to detect which
+         * will be used on startup.
+         */
+        public string get_name () { return "Local database"; }
+        
+        /**
+         * @brief Check if there is the need to upgrade the database from on of
+         * the supported version to the most recent one.
+         */
+        private void check_updates () {                    
+            /* Read database version if existant, saved actual version otherwise.
+             * This may be used in future to perform one-time upgrade of the database */
+            var version_db_file = Path.build_filename (resource_manager.local_config_directory, 
+            										   ".clinica_db_version");
+            										   
+        	if (!FileUtils.test (version_db_file, FileTest.IS_REGULAR)) {
+        		/* Create the file with the version of the database */
+        		try {
+	        		FileUtils.set_contents(version_db_file, db_version);
+	        	} catch (Error e) {
+	        		error (_("Error creating some configuration files, check permission on %s").printf (version_db_file));
+	        	}
+        	}
+        	else {
+        		string content;
+        		try {
+        			FileUtils.get_contents(version_db_file, out content);
+        		} catch (Error e) {
+        			error (_("Error reading some configuration files, check permission on %s".printf(version_db_file)));
+        		}
+        		
+        		bool upgraded_correcty = true;
+        		if (db_version != content) {
+        		    /* Ask the user if he really wants to upgrade */
+        		    if (!ask_for_upgrade()) {
+        		        debug ("The user doesn't want to upgrade, exiting.");
+        		        Posix.exit (0);
+        		    }
+        		
+        		    upgraded_correcty = false;
+        		    /* Try to determine if the version of the local database is supported */
+        		    if (content in supported_db_versions) {
+        		        if (upgrade_database (content)) {
+        		            upgraded_correcty = true;
+        		            try {
+            		            FileUtils.set_contents (version_db_file, db_version);
+            		        } catch (GLib.Error e) {
+            		            error (_("Failure while settings new database version to %s").printf (db_version));
+                            }
+        		        } else {
+        		            error (_("Failure while upgrading database"));
+        		        }
+        		    }
+        		    else
+        			    error (_("Version of the database is not compatible"));
+        		}
+        		
+        		if (!upgraded_correcty) {
+      		        debug ("Upgrade failed, exiting.");
+        		    Posix.exit (1);
+        		}
+        	}
+        }
+        
+        /**
+         * @brief This routine is used to ask confirmation to the user for the database
+         * upgrade. Since the upgrade will make the older version of clinica unusable, we
+         * should always ask before performing one.
+         */
+        private bool ask_for_upgrade () {
+            var mb = new MessageDialog (null,
+                DialogFlags.DESTROY_WITH_PARENT |
+                DialogFlags.MODAL,
+                MessageType.QUESTION,
+                ButtonsType.YES_NO,
+                "%s", "Database upgrade");
+            mb.format_secondary_markup (_("This is a version of Clinica newer than the one that created the\npatients database installed on the system.\nUsing this version requires upgrading the database, and\n<b>the old version will not be able to use it anymore</b>.\nDo you wish to perform this one-time upgrade?\n"));
+            mb.set_title (_("Upgrade database"));
+            if (mb.run () == ResponseType.YES) {
+                mb.destroy ();
+                return true;
+            }
+            else {
+                mb.destroy ();
+                return false;
+           }
+        }
+        
+        /**
+         * @brief Check if the database is in the right path. If it is not there
+         * move it and the set database_path.
+         */
+        private void check_database_path () {
+            database_path = Path.build_filename (resource_manager.local_data_directory,
+                                                 "clinica.db");
+            File db_file = File.new_for_path (database_path);
+            if (!db_file.query_exists ()) {
+                File old_db_file = File.new_for_path (Path.build_filename (resource_manager.local_config_directory, 
+                        "clinica.db"));
+                if (old_db_file.query_exists ()) {
+                
+                    var mb = new MessageDialog (null, DialogFlags.DESTROY_WITH_PARENT | DialogFlags.MODAL,
+                        MessageType.QUESTION, ButtonsType.YES_NO, "%s", _("Database needs to be moved"));
+                    mb.format_secondary_markup (_("An older version of clinica has been detected and the old database has to be moved\nto a new location to continue.\n<b>The older version of clinica won't work anymore with this setup</b>.\nDo you still want to continue?"));
+                    if (mb.run () != Gtk.ResponseType.YES) {
+                        mb.destroy ();
+                        Posix.exit (1);
+                    }
+                    
+                    mb.destroy ();
+                
+                    debug ("Moving old database to its new location (starting from clinica 0.2.9)");
+                    try {
+                        old_db_file.copy (db_file, FileCopyFlags.ALL_METADATA);
+                        FileUtils.remove (old_db_file.get_path ());
+                    } catch (GLib.Error e) {
+                        error (_("Error while transferring the database to the new default location for clinica >= 0.2.9"));
+                    }
+                }
+            }
+        }
+
+        /**
+         * @brief Do upgrade the database starting from db_version.
+         */
+        private bool upgrade_database (string db_version) {
+            /* Try to open the database first */
+            if (!(Database.open (database_path, out db) == OK)) {
+                error (_("Error upgrading database, please check your installation"));
+            }
+            
+            string sql;
+            Statement stmt;
+            int64 rc;
+            
+            /* Performing upgrade from 0.1 */
+            if (db_version == "0.1") {
+                /* We need to create the new table for the events */
+               sql = "CREATE TABLE IF NOT EXISTS events (id INTEGER PRIMARY KEY, title TEXT, description TEXT, venue TEXT, patient INTEGER, visit INTEGER, date TEXT);";
+               db.prepare (sql, -1, out stmt, null);
+               rc = stmt.step ();
+               
+               if (rc != DONE) {
+                   error (_("Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %s".printf (rc.to_string ())));
+                   return false;
+               } else {
+                   db_version = "0.2";
+               }
+            }
+            
+            return true;
+        }
+        
+        /**
+         * @brief Check that all the resources needed by Clinica
+         * are actually available, and if they are not create them.
+         */
+        public void init_resources () {
+            /* Open database and, if it does not exists, create it */
+            if (!(Database.open (database_path, out db) == OK)) {
+                error ("Error opening database.");
+            };
+            
+            /* Check if the required tables exists, and create them
+             * if necessary. */
+            init_database ();
+        }
+        
+        
+        /**
+         * @brief Init the database with the required tables
+         */
+        private void init_database () {
+            
+            if (db.exec ("CREATE TABLE IF NOT EXISTS doctors (surname TEXT, ID INTEGER PRIMARY KEY, phone TEXT, mobile TEXT, given_name TEXT)") != 0)
+                error ("Error creating the doctors table");
+            if (db.exec ("CREATE TABLE IF NOT EXISTS patients (gender TEXT, doctor INTEGER, surname TEXT, ID INTEGER PRIMARY KEY, identification_code TEXT, phone TEXT, given_name TEXT, birth_date TEXT, residence_address TEXT)") != 0)
+                error ("Error creating the patients table");
+            if (db.exec ("CREATE TABLE IF NOT EXISTS visits (subsequent_checks TEXT, systemic_therapy TEXT, ID INTEGER PRIMARY KEY, laboratory_exam TEXT, diagnosis TEXT, histopathology TEXT, anamnesis TEXT, date TEXT, patient INTEGER, physical_examination TEXT, topical_therapy TEXT)") != 0)
+                error ("Error creating the visits table");
+            if (db.exec ("CREATE TABLE IF NOT EXISTS events (id INTEGER PRIMARY KEY, title TEXT, description TEXT, venue TEXT, patient INTEGER, visit INTEGER, date TEXT)") != 0)
+                error ("Error creating the events table");
+                
+        }
+            
+        /**
+         * @brief Internal routine used to convert DateTime objects
+         * to strings that are to be saved in the database.
+         */
+        internal static string datetime_to_string (DateTime date) {
+            return string.join(" ", 
+        		date.get_year ().to_string (), 
+        		"%.2d".printf (date.get_month ()), 
+        		"%.2d".printf (date.get_day_of_month()), 
+        		"%.2d".printf (date.get_hour ()), 
+        		"%.2d".printf (date.get_minute ()), 
+        		"%.2d".printf (date.get_second ()));
+        }
+        
+       /**
+        * @brief Convert strings encoded with datetime_to_string () back
+        * to DateTime objects.
+        */
+       internal static DateTime? string_to_datetime (string input) {
+       
+            if (input == "") {
+                return null;
+            }
+       
+        	string [] fields = input.split(" ");
+        	
+        	int year = int.parse (fields[0]);
+        	int month = int.parse (fields[1]);
+        	int day = int.parse (fields[2]);
+        	int hour = int.parse (fields[3]);
+        	int minute = int.parse (fields[4]);
+        	int seconds = int.parse (fields[5]);
+        	
+        	if (year < 1 || year > 9999 || 
+        		month < 1 || month > 12 ||
+        		day < 1 || day > 31 ||
+        		minute < 0 || minute > 59 ||
+        		seconds < 0 || seconds > 59)
+        		return new DateTime.now_local ();
+        	
+        	return new DateTime.local (year, month, day, hour, minute, seconds);
+        }
+        
+        /* IMPLEMENTATION OF THE ABSTRACT INTERFACES OF DataProvider */
+        
+        public Doctor? get_doctor (int64 id) {
+            var doc = new Doctor ();
+            Statement stmt;
+            db.prepare (@"SELECT given_name, surname, phone, mobile FROM $(doctor_table) WHERE id=$(id);", -1, 
+                out stmt, null);
+            if (!(stmt.step () == ROW)) {
+                error (_("Error while retrieving the doctor with id = %s").printf (id.to_string (), db.errmsg ()));
+                return null;
+            }
+            
+            /* Load data from the database into the fields */
+            doc.id = id;
+            doc.given_name = stmt.column_text (0).compress ();
+            doc.surname = stmt.column_text (1).compress ();
+            doc.phone = stmt.column_text (2).compress ();
+            doc.mobile = stmt.column_text (3).compress ();
+            
+            doc.provider = this;
+            
+            return doc;
+        }
+        
+        public int64 save_doctor (Doctor doctor) {
+            Statement stmt;
+            
+            if (doctor.id != 0)
+                db.prepare ("""INSERT OR REPLACE INTO %s (id, given_name, surname, phone, mobile)
+                    VALUES (:id, :given_name, :surname, :phone, :mobile);""".printf (doctor_table),
+                    -1, out stmt);
+            else
+                db.prepare ("""INSERT OR REPLACE INTO %s (given_name, surname, phone, mobile)
+                    VALUES (:given_name, :surname, :phone, :mobile);""".printf (doctor_table),
+                    -1, out stmt);
+            
+                
+            
+            /* Bind values present in doctor in the SQL statement */
+            int i = 1;
+            if (doctor.id != 0)
+                stmt.bind_int64  (i++, doctor.id);
+            stmt.bind_text (i++, doctor.given_name);
+            stmt.bind_text (i++, doctor.surname);
+            stmt.bind_text (i++, doctor.phone);
+            stmt.bind_text (i++, doctor.mobile);
+            
+            if (stmt.step () != DONE) {
+                error (_("An error occurred while saving the doctor with id %d: %s").printf (doctor.id, db.errmsg ()));
+                return -1;
+            }
+            
+            if (doctor.id == 0) {
+                doctor.id = db.last_insert_rowid ();
+                doctor_added (doctor.id);
+            }
+            else
+                doctor_changed (doctor.id);
+
+            return doctor.id;
+        }
+        
+        public int64 remove_doctor (Doctor doctor) {
+            Statement stmt;
+            
+        	/* Keep a list of the patient ID we need to notify */
+        	var patients = new List<int64?> ();
+        	foreach (var patient in doctor.patients ()) {
+        	    patients.append (patient.id);
+        	}
+            
+            /* Wrap all this in a transaction so the DB doesn't change until
+             * we commit */
+            db.exec ("BEGIN TRANSACTION");
+            
+        	string sql = @"DELETE from $(doctor_table) WHERE ID=$(doctor.id);";
+        	
+        	db.prepare (sql, -1, out stmt, null);
+        	if (stmt.step () != DONE) {
+        		error (@"Error deleting doctor with id $(doctor.id)");
+        		db.exec ("ROLLBACK TRANSACTION");
+        		return -1;
+        	}
+        	
+        	/* Now we need to deassociate its patients from him/her */
+            if (db.exec (@"UPDATE $(patient_table) SET doctor = 0 WHERE doctor = $(doctor.id);") != 0) {
+                error (@"Error deassociating the patients from the doctor with ID = $(doctor.id)");
+                db.exec ("ROLLBACK TRANSACTION");
+                return -1;
+            }
+            
+        	db.exec ("COMMIT TRANSACTION");
+        	
+        	doctor_removed (doctor.id);
+        	
+        	/* Notify changes on the patients */
+        	foreach (var patient_id in patients) {
+        	    patient_changed (patient_id);
+        	}
+        	return 0;
+        }
+        
+        public PatientIterator patients (Doctor? doctor = null) {
+            return new SqlitePatientIterator (this, (doctor == null) ? "" : @"WHERE doctor = $(doctor.id)");
+        }
+        
+        public DoctorIterator doctors () {
+            return new SqliteDoctorIterator (this);
+        }
+        
+        public Patient? get_patient (int64 id) {
+            var patient = new Patient ();
+            Statement stmt;
+            db.prepare ("""SELECT given_name, surname, birth_date, gender, phone, residence_address,
+                    identification_code, doctor FROM %s WHERE id=%s;""".printf (patient_table, id.to_string ()), 
+                    -1, out stmt, null);
+            if (!(stmt.step () == ROW)) {
+                error (_("Error while retrieving the patient with id = %s").printf (id.to_string (), db.errmsg ()));
+                return null;
+            }
+            
+            /* Load data from the database into the fields */
+            patient.id = id;
+            patient.given_name = stmt.column_text (0).compress ();
+            patient.surname = stmt.column_text (1).compress ();
+            patient.birth_date = string_to_datetime (stmt.column_text (2).compress ());
+            patient.gender = (stmt.column_text (3) == "MALE") ? Gender.MALE : Gender.FEMALE;
+            patient.phone = stmt.column_text (4).compress ();
+            patient.residence_address = stmt.column_text (5).compress ();
+            patient.identification_code = stmt.column_text (6).compress ();
+            patient.doctor = (stmt.column_int64 (7) == 0) ? null : get_doctor (stmt.column_int64 (7));
+            
+            patient.provider = this;
+            
+            return patient;
+        }
+        
+        public int64 save_patient (Patient patient) {
+            Statement stmt;
+            
+            if (patient.id != 0)
+                db.prepare ("""INSERT OR REPLACE INTO %s
+                    (ID, given_name, surname, birth_date, gender, phone, residence_address, identification_code, doctor)
+                    VALUES (:id, :given_name, :surname, :birth_date, :gender, :phone, :residence_address, :identification_code, :doctor);""".printf (patient_table),
+                    -1, out stmt);
+            else
+                db.prepare ("""INSERT OR REPLACE INTO %s
+                            (given_name, surname, birth_date, gender, phone, residence_address, identification_code, doctor)
+                            VALUES (:given_name, :surname, :birth_date, :gender, :phone, :residence_address, :identification_code, :doctor);""".printf (patient_table),
+                    -1, out stmt);
+            
+            
+            /* Bind values present in doctor in the SQL statement */
+            int i = 1;
+            if (patient.id != 0)
+                stmt.bind_int64  (i++, patient.id);
+            stmt.bind_text   (i++, patient.given_name);
+            stmt.bind_text   (i++, patient.surname);
+            stmt.bind_text   (i++, datetime_to_string (patient.birth_date));
+            stmt.bind_text   (i++, (patient.gender == Gender.MALE) ? "MALE" : "FEMALE");
+            stmt.bind_text   (i++, patient.phone);
+            stmt.bind_text   (i++, patient.residence_address);
+            stmt.bind_text   (i++, patient.identification_code);
+            stmt.bind_int64  (i++, (patient.doctor == null) ? 0 : patient.doctor.id);
+            
+            if (stmt.step () != DONE) {
+                error (_("An error occurred while saving the doctor with id %s: %s").printf (patient.id.to_string (), db.errmsg ()));
+                return -1;
+            }
+            
+            if (patient.id == 0) {
+                patient.id = db.last_insert_rowid ();
+                patient_added (patient.id);
+            }
+            else
+                patient_changed (patient.id);
+                
+            return patient.id;
+        }
+        
+        public int64 remove_patient (Patient patient) {
+        	
+        	db.exec ("BEGIN TRANSACTION");
+        	
+        	if (db.exec (@"DELETE from $(patient_table) WHERE ID=$(patient.id)") != 0) {
+        		error (@"Error deleting patient with id $(patient.id)");
+        		db.exec ("ROLLBACK TRANSACTION");
+        		return -1;
+        	}
+        	
+        	/* Try to remove all the visits of the patient */
+        	if (db.exec (@"DELETE FROM $(visit_table) WHERE patient=$(patient.id)") != 0) {
+        	    error (@"Error deleting the visits associated to the patient");
+        	    db.exec ("ROLLBACK TRANSACTION");
+        	    return -1;
+        	}
+        	
+        	/* Deassoociate all the events associated with this patient */
+        	if (db.exec (@"UPDATE $(event_table) SET patient=0 WHERE patient=$(patient.id)") != 0) {
+        	    error (@"Error deassociating the events from the deleted patient");
+        	    db.exec ("ROLLBACK TRANSACTION");
+        	    return -1;
+            }
+            
+            db.exec ("COMMIT TRANSACTION");
+        	
+        	patient_removed (patient.id);
+        	return 0;
+        }
+        
+        public VisitIterator visits (Patient? patient, DateTime? start = null, DateTime? end = null, 
+            DataProvider.SortOrder order = DataProvider.SortOrder.DESCENDING) {
+            string sql_clause = (patient == null && start == null && end == null) ? "" : "WHERE";
+            
+            if (patient != null) {
+                sql_clause += @" patient = $(patient.id)";
+                if (start != null || end != null)
+                    sql_clause += " AND ";
+            }
+            
+            
+            string sort = " ORDER BY date ";
+            if (order == DataProvider.SortOrder.DESCENDING)
+                sort += "DESC";
+            else
+                sort += "ASC";
+             
+            if (start == null && end == null)
+                return new SqliteVisitIterator (this, sql_clause + sort);    
+            else if (start != null && end == null)
+                return new SqliteVisitIterator (this, sql_clause + @" date >= '$(datetime_to_string (start))'" + sort);
+            else if (start == null && end != null)
+                return new SqliteVisitIterator (this, sql_clause + @" date < '$(datetime_to_string (end))'" + sort);
+            else
+                return new SqliteVisitIterator (this, sql_clause + @" date BETWEEN " +
+                                                      @"'$(datetime_to_string (start))' AND '$(datetime_to_string (end))'" + sort);
+        }
+        
+        public Visit? get_visit (int64 id) {
+            var visit = new Visit ();
+            Statement stmt;
+            db.prepare ("""SELECT anamnesis, physical_examination, laboratory_exam, histopathology, diagnosis,
+                        topical_therapy, systemic_therapy, subsequent_checks, date, patient
+                        FROM %s WHERE id=%s;""".printf (visit_table, id.to_string ()), -1,
+                        out stmt, null);
+            if (!(stmt.step () == ROW)) {
+                error (_("Error while retrieving the visit with id = %s").printf (id.to_string (), db.errmsg ()));
+                return null;
+            }
+            
+            /* Load data from the database into the fields */
+            visit.id = id;
+            visit.anamnesis = stmt.column_text (0).compress ();
+            visit.physical_examination = stmt.column_text (1).compress ();
+            visit.laboratory_exam = stmt.column_text (2).compress ();
+            visit.histopathology = stmt.column_text (3).compress ();
+            visit.diagnosis = stmt.column_text (4).compress ();
+            visit.topical_therapy = stmt.column_text (5).compress ();
+            visit.systemic_therapy = stmt.column_text (6).compress ();
+            visit.subsequent_checks = stmt.column_text (7).compress ();
+            visit.date = string_to_datetime (stmt.column_text (8).compress ());
+            visit.patient = get_patient (stmt.column_int64 (9));
+            
+            visit.provider = this;
+            
+            return visit;
+        }
+        
+        public int64 save_visit (Visit visit) {
+            Statement stmt;
+            if (visit.id != 0)
+                db.prepare ("""INSERT OR REPLACE INTO %s 
+                    (id, anamnesis, physical_examination, laboratory_exam, histopathology, diagnosis,
+                    topical_therapy, systemic_therapy, subsequent_checks, date, patient)
+                    VALUES (:id, :anamnesis, :physical_examination, :laboratory_exam, :histopathology, :diagnosis,
+                    :topical_therapy, :systemic_therapy, :subsequent_checks, :date, :patient);""".printf (visit_table),
+                    -1, out stmt);
+            else
+                db.prepare ("""INSERT OR REPLACE INTO %s 
+                    (anamnesis, physical_examination, laboratory_exam, histopathology, diagnosis,
+                    topical_therapy, systemic_therapy, subsequent_checks, date, patient)
+                    VALUES (:anamnesis, :physical_examination, :laboratory_exam, :histopathology, :diagnosis,
+                    :topical_therapy, :systemic_therapy, :subsequent_checks, :date, :patient);""".printf (visit_table),
+                    -1, out stmt);            
+            
+            /* Bind values present in doctor in the SQL statement */
+            int i = 1;
+            if (visit.id != 0)
+                stmt.bind_int64  (i++, visit.id);
+            stmt.bind_text (i++, visit.anamnesis);
+            stmt.bind_text (i++, visit.physical_examination);
+            stmt.bind_text (i++, visit.laboratory_exam);
+            stmt.bind_text (i++, visit.histopathology);
+            stmt.bind_text (i++, visit.diagnosis);
+            stmt.bind_text (i++, visit.topical_therapy);
+            stmt.bind_text (i++, visit.systemic_therapy);
+            stmt.bind_text (i++, visit.subsequent_checks);
+            stmt.bind_text (i++, datetime_to_string (visit.date));
+            stmt.bind_int64  (i++, visit.patient.id);
+            
+            if (stmt.step () != DONE) {
+                error (_("An error occurred while saving the doctor with id %s: %s").printf (visit.id.to_string (), db.errmsg ()));
+                return -1;
+            }
+            
+            if (visit.id == 0) {
+                visit.id = db.last_insert_rowid ();
+                visit_added (visit.id);
+            }
+            else
+                visit_changed (visit.id);
+            
+            return visit.id;
+        }
+        
+        public int64 remove_visit (Visit visit) {
+            Statement stmt;
+        	string sql = @"DELETE from $(visit_table) WHERE ID=$(visit.id);";
+        	
+        	db.prepare (sql, -1, out stmt, null);
+        	if (stmt.step () != DONE) {
+        		error (@"Error deleting visit with id $(visit.id)");
+        		return -1;
+        	}
+        	
+        	visit_removed (visit.id);
+        	return 0;
+        }
+        
+        public Event? get_event (int64 id) {
+            var event = new Event ();
+            Statement stmt;
+            db.prepare (@"SELECT title, description, venue, patient, visit, date FROM $(event_table) WHERE id=$(id);", -1, 
+                        out stmt, null);
+            if (!(stmt.step () == ROW)) {
+                error (_("Error while retrieving the event with id = %d").printf (id, db.errmsg ()));
+                return null;
+            }
+            
+            /* Load data from the database into the fields */
+            event.id = id;
+            event.title = stmt.column_text (0).compress ();
+            event.description = stmt.column_text (1).compress ();
+            event.venue = stmt.column_text (2).compress ();
+            event.patient = (stmt.column_int64 (3) != 0) ? get_patient (stmt.column_int64 (3)) : null;
+            event.visit = (stmt.column_int64 (4) != 0) ? get_visit (stmt.column_int64 (4)) : null;
+            event.date = string_to_datetime (stmt.column_text (5).compress ());
+            
+            event.provider = this;
+            
+            return event;
+        }
+        
+        public int64 save_event (Event event) {
+            Statement stmt;
+            
+            if (event.id != 0)
+                db.prepare ("""INSERT OR REPLACE INTO %s (id, title, description, venue, patient, visit, date)
+                    VALUES (:id, :title, :description, :venue, :patient, :visit, :date);""".printf (event_table),
+                    -1, out stmt);
+            else
+                db.prepare ("""INSERT OR REPLACE INTO %s (title, description, venue, patient, visit, date)
+                    VALUES (:title, :description, :venue, :patient, :visit, :date);""".printf (event_table),
+                    -1, out stmt);            
+            
+            /* Bind values present in doctor in the SQL statement */
+            int i = 1;
+            if (event.id != 0)
+                stmt.bind_int64  (i++, event.id);
+            stmt.bind_text (i++, event.title);
+            stmt.bind_text (i++, event.description);
+            stmt.bind_text (i++, event.venue);
+            stmt.bind_int64  (i++, (event.patient == null) ? 0 : event.patient.id);
+            stmt.bind_int64  (i++, (event.visit == null) ? 0 : event.visit.id);
+            stmt.bind_text (i++, datetime_to_string (event.date));
+            
+            if (stmt.step () != DONE) {
+                error (_("An error occurred while saving the event with id %s: %s").printf (event.id.to_string (), db.errmsg ()));
+                return -1;
+            }
+            
+            if (event.id == 0) {
+                event.id = db.last_insert_rowid ();
+                event_added (event.id);
+            }
+            else
+                event_changed (event.id);
+            
+            return event.id;
+        }
+        
+                
+        public int64 remove_event (Event event) {
+            Statement stmt;
+        	string sql = @"DELETE from $(event_table) WHERE ID=$(event.id);";
+        	
+        	db.prepare (sql, -1, out stmt, null);
+        	if (stmt.step () != DONE) {
+        		error (@"Error deleting event with id $(event.id)");
+        		return -1;
+        	}
+        	
+        	event_removed (event.id);
+        	return 0;
+        }
+        
+        public EventIterator events (DateTime? start = null, DateTime? end = null) {
+            string sql_clause = "";
+        
+            if (start == null && end == null)
+                return new SqliteEventIterator (this, sql_clause);
+            else if (start != null && end == null)
+                return new SqliteEventIterator (this, sql_clause + @" WHERE date >= '$(datetime_to_string (start))'");
+            else if (start == null && end != null)
+                return new SqliteEventIterator (this, sql_clause + @" WHERE date < '$(datetime_to_string (end))'");
+            else
+                return new SqliteEventIterator (this, sql_clause + @" WHERE date BETWEEN " +
+                                                      @"'$(datetime_to_string (start))' AND '$(datetime_to_string (end))'");
+        }
+    
+    }
+
+}
diff --git a/libclinica/PatientDetail.vala b/libclinica/SqliteDoctorIterator.vala
similarity index 53%
copy from libclinica/PatientDetail.vala
copy to libclinica/SqliteDoctorIterator.vala
index 3139b0f..a36e3f7 100644
--- a/libclinica/PatientDetail.vala
+++ b/libclinica/SqliteDoctorIterator.vala
@@ -15,24 +15,31 @@
  *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
  *
  *   Authors: Leonardo Robol <leo at robol.it>
- *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
  */
 
-using Gtk;
+using Sqlite;
 
 namespace Clinica {
+   
+    public class SqliteDoctorIterator : Object, DoctorIterator {
 
-	public class PatientDetail : VBox {
-	
-		private Patient patient;
-	
-		public PatientDetail(Patient p) {
-			/* Initial setup */
-			GLib.Object(homogeneous: false);
-			patient = p;
-			
-			pack_start (new Label("boh"));
-		}
-	}
+		private SqliteDataProvider provider;
+		private Statement stmt;
+
+        public SqliteDoctorIterator (SqliteDataProvider provider, string clause = "") {
+            this.provider = provider;
+            provider.db.prepare ("SELECT id from %s %s;".printf (provider.doctor_table, clause), 
+                                 -1, out stmt);
+        }
+        
+        public bool next () {
+            return (stmt.step () == ROW);
+        }
+        
+        public new Doctor get () {
+            int id = stmt.column_int (0);
+            return provider.get_doctor (id); 
+        }
+    }
 
 }
diff --git a/libclinica/PatientDetail.vala b/libclinica/SqlitePatientIterator.vala
similarity index 52%
copy from libclinica/PatientDetail.vala
copy to libclinica/SqlitePatientIterator.vala
index 3139b0f..25b3a5b 100644
--- a/libclinica/PatientDetail.vala
+++ b/libclinica/SqlitePatientIterator.vala
@@ -15,24 +15,31 @@
  *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
  *
  *   Authors: Leonardo Robol <leo at robol.it>
- *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
  */
 
-using Gtk;
+using Sqlite;
 
 namespace Clinica {
+   
+    public class SqlitePatientIterator : Object, PatientIterator {
+        
+		private SqliteDataProvider provider;
+		private Statement stmt;
 
-	public class PatientDetail : VBox {
-	
-		private Patient patient;
-	
-		public PatientDetail(Patient p) {
-			/* Initial setup */
-			GLib.Object(homogeneous: false);
-			patient = p;
-			
-			pack_start (new Label("boh"));
-		}
-	}
-
+        public SqlitePatientIterator (SqliteDataProvider provider, string clause = "") {
+            this.provider = provider;
+            provider.db.prepare ("SELECT id from %s %s;".printf (provider.patient_table, clause), 
+                                 -1, out stmt);
+        }
+        
+        public bool next () {
+            return (stmt.step () == ROW);
+        }
+        
+        public new Patient get () {
+            int id = stmt.column_int (0);
+            return provider.get_patient (id); 
+        }
+    }
+    
 }
diff --git a/libclinica/PatientDetail.vala b/libclinica/SqliteVisitIterator.vala
similarity index 53%
copy from libclinica/PatientDetail.vala
copy to libclinica/SqliteVisitIterator.vala
index 3139b0f..713184c 100644
--- a/libclinica/PatientDetail.vala
+++ b/libclinica/SqliteVisitIterator.vala
@@ -15,24 +15,30 @@
  *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
  *
  *   Authors: Leonardo Robol <leo at robol.it>
- *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
  */
 
-using Gtk;
+using Sqlite;
 
 namespace Clinica {
+   
+    public class SqliteVisitIterator : GLib.Object, VisitIterator {
+        
+		private SqliteDataProvider provider;
+		private Statement stmt;
 
-	public class PatientDetail : VBox {
-	
-		private Patient patient;
-	
-		public PatientDetail(Patient p) {
-			/* Initial setup */
-			GLib.Object(homogeneous: false);
-			patient = p;
-			
-			pack_start (new Label("boh"));
-		}
-	}
-
+        public SqliteVisitIterator (SqliteDataProvider provider, string clause = "") {
+            this.provider = provider;
+            provider.db.prepare ("SELECT id from %s %s;".printf (provider.visit_table, clause), 
+                                 -1, out stmt);
+        }
+        
+        public bool next () {
+            return (stmt.step () == ROW);
+        }
+        
+        public new Visit get () {
+            int id = stmt.column_int (0);
+            return provider.get_visit (id); 
+        }
+    }
 }
diff --git a/libclinica/StartPage.vala b/libclinica/StartPage.vala
index fe325ac..2b5ec5f 100644
--- a/libclinica/StartPage.vala
+++ b/libclinica/StartPage.vala
@@ -36,16 +36,15 @@ namespace Clinica {
         
         public ResourceManager resource_manager { get; set; }
         
+        private SidebarEntry sidebar_entry;
+        
         public StartPage (ResourceManager resources) {
             resource_manager = resources;
-
-            /* Connect callback */
-            connect_signal ();
             
             /* Create builder */
-            builder = new Builder ();
+            builder = new Builder (resources);
             try {
-                builder.add_from_file (resource_manager.get_ui_file ("new_button.glade"));
+                builder.add_from_resource ("start_page.glade");
             } catch (Error e) {
                 error ("Error loading new-button.glade, aborting StartPage creation.");
             } 
@@ -79,17 +78,21 @@ namespace Clinica {
             
             /* Load and connect the browse_patient_list_button */
 	        browse_patient_list_button = builder.get_object ("browse_patient_list_button") as Button;
-	        browse_patient_list_button.clicked.connect ((t) => patient_list_requested ());
+	        browse_patient_list_button.clicked.connect ((t) => resource_manager.user_interface.set_page ("patients"));
 	        
 	        /* Load and connect the browse_doctor_list_button */
 	        browse_doctor_list_button = builder.get_object ("browse_doctor_list_button") as Button;
-	        browse_doctor_list_button.clicked.connect ((t) => doctor_list_requested ());
+	        browse_doctor_list_button.clicked.connect ((t) => resource_manager.user_interface.set_page ("doctors"));
 	        
 	        /* Connect XML-defined signals */
 	        builder.connect_signals (this);
 	       
 	        /* Hide the hint "Browse the patient to start a visit" in ten seconds */ 
 	        GLib.Timeout.add (10000, hide_hint);
+	        
+	        sidebar_entry = new SidebarPageEntry (resource_manager, this, _("Dashboard"),
+	            Utils.pixbuf_from_svg_resource (Config.RESOURCE_BASE + "ui/icons/clinica.svg", 
+	            Sidebar.ICON_SIZE, Sidebar.ICON_SIZE));
         }
         
         /**
@@ -174,8 +177,12 @@ namespace Clinica {
         	return true;
         }
         
-        public void setup () {
-            new_title ("Clinica");
+        public string get_title () {
+            return "Clinica";
+        }
+        
+        public SidebarEntry? get_sidebar_entry () {
+            return sidebar_entry;
         }
         
         public void on_find_entry_changed (Editable e) {
@@ -208,12 +215,12 @@ namespace Clinica {
         
         [CCode (instance_pos = -1)]
         public void on_medicines_search_page_button_clicked (Button button) {
-            medicines_search_page_requested (); 
+            resource_manager.user_interface.set_page ("medicines");
         }
         
         [CCode (instance_pos = -1)]
         public void on_calendar_window_button_clicked (Button button) {
-            calendar_window_requested ();
+            resource_manager.user_interface.show_calendar_window ();
         }
         
         /**
@@ -222,7 +229,7 @@ namespace Clinica {
         [CCode (instance_pos = -1)]
         public void on_new_button_clicked (Button button) {
         	var dialog = new PatientEditor.with_name (resource_manager, Utils.capitalize (find_entry.get_text ()));
-		dialog.dialog.set_transient_for (resource_manager.user_interface.window);
+		dialog.set_transient_for (resource_manager.user_interface.window);
         	if (dialog.run () == PatientEditor.Response.SAVE) {
         		/* Reset find entry */
         		find_entry.set_text ("");
diff --git a/libclinica/PatientDetail.vala b/libclinica/Toolbar.vala
similarity index 54%
copy from libclinica/PatientDetail.vala
copy to libclinica/Toolbar.vala
index 3139b0f..3d29754 100644
--- a/libclinica/PatientDetail.vala
+++ b/libclinica/Toolbar.vala
@@ -15,24 +15,29 @@
  *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
  *
  *   Authors: Leonardo Robol <leo at robol.it>
- *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
  */
-
-using Gtk;
-
+ 
 namespace Clinica {
 
-	public class PatientDetail : VBox {
-	
-		private Patient patient;
-	
-		public PatientDetail(Patient p) {
-			/* Initial setup */
-			GLib.Object(homogeneous: false);
-			patient = p;
-			
-			pack_start (new Label("boh"));
-		}
-	}
+    public class Toolbar : Gtk.Alignment {
+    
+        protected ResourceManager resource_manager;
+        
+        protected Gtk.Box toolbar;
+    
+        public Toolbar (ResourceManager resources) {
+			GLib.Object (xalign: 1.0F, yalign: 0.0F, xscale: 1F, yscale: 0F);
+			set_padding (0, 0, resources.PADDING, 0);
+            resource_manager = resources;
+            
+            toolbar = new Gtk.Box (Gtk.Orientation.HORIZONTAL, resource_manager.PADDING);
+            add (toolbar);
+        }
+        
+        public void insert (Gtk.ToolItem item, int pos) {
+            toolbar.pack_start (item, false, true, 0);
+        }
+    
+    }
 
 }
diff --git a/libclinica/PatientDetail.vala b/libclinica/ToolbarItem.vala
similarity index 52%
copy from libclinica/PatientDetail.vala
copy to libclinica/ToolbarItem.vala
index 3139b0f..d941a9b 100644
--- a/libclinica/PatientDetail.vala
+++ b/libclinica/ToolbarItem.vala
@@ -15,24 +15,34 @@
  *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
  *
  *   Authors: Leonardo Robol <leo at robol.it>
- *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
  */
-
-using Gtk;
-
+ 
 namespace Clinica {
 
-	public class PatientDetail : VBox {
-	
-		private Patient patient;
-	
-		public PatientDetail(Patient p) {
-			/* Initial setup */
-			GLib.Object(homogeneous: false);
-			patient = p;
-			
-			pack_start (new Label("boh"));
-		}
-	}
+    public class ToolbarItem : Gtk.ToolItem {
+    
+        public signal void activated ();
+        
+        private Gtk.Button button;
+    
+        public ToolbarItem (ResourceManager resources, string resource_path) {
+            Object ();
+            
+            button = new Gtk.Button ();
+            button.add (new Gtk.Image.from_resource (resource_path));
+            button.set_relief (Gtk.ReliefStyle.NONE);
+            
+            button.clicked.connect ((button) => activated ());
+            
+            add (button);
+        }
+        
+        public void set_active (bool sensitive) {
+            button.set_sensitive (sensitive);
+        }
+        
+        
+    
+    }
 
 }
diff --git a/libclinica/UIManager.vala b/libclinica/UIManager.vala
new file mode 100644
index 0000000..f3cc54e
--- /dev/null
+++ b/libclinica/UIManager.vala
@@ -0,0 +1,90 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+
+namespace Clinica {
+
+    public class UIManager : Gtk.UIManager {
+    
+        private Gtk.ActionGroup action_group;
+        
+        private ResourceManager resource_manager;
+        
+        public UIManager (ResourceManager resources) {
+            resource_manager = resources;
+        
+            // Load the XML definining the UI from XML in the GResource bundle
+            try {
+                add_ui_from_resource (Config.RESOURCE_BASE + "ui.xml");
+                action_group = new Gtk.ActionGroup ("MainMenu");
+            } catch (GLib.Error e) {
+                error ("Error loading UI files: %s".printf (e.message));
+            }
+            
+            populate ();
+        }
+        
+        private void populate () {
+            // File menu
+            action_group.add_action (new Gtk.Action ("FileAction", _("_File"), null, null));
+            action_group.add_action_with_accel (new Gtk.Action ("NewPatientAction", _("New _patient"), 
+                _("Create a new patient"), null), "<control>N");
+            action_group.add_action_with_accel (new Gtk.Action ("NewDoctorAction", _("New _doctor"),
+                _("Create a new doctor"), null), "<control>D");
+            action_group.add_action_with_accel (new Gtk.Action ("QuitAction", _("_Quit"), 
+                _("Quit clinica"), null), "<control>Q");
+                
+            // View menu
+            action_group.add_action (new Gtk.Action ("ViewAction", _("_View"), null, null));
+            action_group.add_action_with_accel (new Gtk.Action ("StartPageAction", _("_Start page"),
+                _("Go to the start page of clinica"), null), "Home");
+            action_group.add_action_with_accel (new Gtk.Action ("PatientsAction", _("_Patients"), 
+                _("Go to the list of patients"), null), "<control><alt>P");
+            action_group.add_action_with_accel (new Gtk.Action ("DoctorsAction", _("_Doctors"), 
+                _("Go to the list of doctors"), null), "<control><alt>D");
+            action_group.add_action_with_accel (new Gtk.Action ("SearchMedicinesAction", _("_Search medicines"), 
+                _("Search medicines online"), null), "<control><alt>M");
+                
+            // Tools menu
+            action_group.add_action (new Gtk.Action ("ToolsAction", _("_Tools"), null, null));
+            action_group.add_action_with_accel (new Gtk.Action ("SettingsAction", _("_Settings"), 
+                _("Customize clinica behaviour"), null), "<control>S");
+            action_group.add_action (new Gtk.Action ("BackupAction", _("Backup"),
+                _("Backup clinica data to file"), null));
+            action_group.add_action (new Gtk.Action ("ImportDataAction", _("Import"),
+                _("Import data from backup files"), null));
+            action_group.add_action (new Gtk.Action ("AddMedicinesAction", _("Add medicine"), 
+                _("Add a new medicine to the local database"), null));
+            action_group.add_action (new Gtk.Action ("BrowseMedicinesAction", _("Browse local medicines"), 
+                _("Browse the medicine saved locally"), null));
+                
+            // Help menu
+            action_group.add_action (new Gtk.Action ("HelpAction", _("_Help"), null, null));
+            action_group.add_action_with_accel (new Gtk.Action ("ContentsAction", _("_Contents"), 
+                _("Open the help system"), null), "F1");
+            action_group.add_action (new Gtk.Action ("ReportABugAction", _("_Report a bug"), 
+                _("Report a bug online"), null));
+            action_group.add_action (new Gtk.Action ("AboutAction", _("_About"), 
+                _("Get to know the development team of Clinica"), null));
+                
+            insert_action_group (action_group, 0);
+        }
+    
+    }
+
+}
diff --git a/libclinica/UserInterface.vala b/libclinica/UserInterface.vala
index 14ad289..95f86e9 100644
--- a/libclinica/UserInterface.vala
+++ b/libclinica/UserInterface.vala
@@ -15,7 +15,6 @@
  *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
  *
  *   Authors: Leonardo Robol <leo at robol.it>
- *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
  */
  
 using Gtk;
@@ -24,6 +23,8 @@ namespace Clinica {
 
 	public class UserInterface : GLib.Object {
 	
+	    private Gtk.ActionGroup entries;
+	
 	    /* Error signal and associated callback passed by main () */
 	    public signal void error (string message);
 	    
@@ -31,91 +32,163 @@ namespace Clinica {
 	    public bool started { get; private set; default = false; }
 	
 	    /* Various objects needed for coordination */
-		internal Builder builder;	
 		internal Window window;
+		internal Clinica.UIManager manager;
 
         /* Gtk Objects */
 		private Alignment main;
 		
-		/* Pages to be loaded */
-		private StartPage start_page;
-		private PatientListPage patient_list_page;
-		private DoctorListPage  doctor_list_page;
-		private MedicineSearchPage medicine_search_page;
-		
 		/* Windows */
 		internal SettingsManager? settings_manager = null;
 		internal CalendarWindow?  calendar_window  = null;
-		internal GLib.HashTable<int, VisitWindow> visit_windows;
 		
+#if HAVE_PLUGINS
 		private extern Peas.ExtensionSet setup_extension_set (ResourceManager resources, Peas.Engine engine);
 		internal Peas.ExtensionSet extension_set;
+#endif
 		
 		/* ResourceManager */
 		public ResourceManager resource_manager;
+		
+		internal HashTable<string, Page?> pages;
+		
+		private Sidebar sidebar;
 			
 		public UserInterface (ResourceManager rm) {
 		    resource_manager = rm;
 		    resource_manager.user_interface = this;
+		    
+		    pages = new HashTable<string, Page?> (GLib.str_hash, GLib.str_equal);
 			
 		    /* Keep resource_manager and connect callback signal */
 		    error.connect ((t,l) => resource_manager.error_callback(t,l));
-		    	    
-		    /* Start building the interface */
-			builder = new Builder ();
-			
-			try {
-			    /* Load window-related objects and the button for the main
-			     * window shown at startup */
-    			builder.add_from_file (resource_manager.get_ui_file ("window.glade"));			
-    			
-    			/* Connect callback for destroy events */
-	    		window = builder.get_object ("window") as Gtk.Window;
+		    
+		    /* Create a new Window and setup the menubar in it */
+            window = new Gtk.Window ();
+            window.destroy.connect (stop);
+            window.delete_event.connect ((window) => { stop() ; return true; });
+            
+            sidebar = new Sidebar (resource_manager);
+            
+            var box = new Gtk.Paned (Gtk.Orientation.HORIZONTAL);
+            var top_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
+            
+            /* Load the UI manager and connect callbacks */
+            manager = new UIManager (resource_manager);
+            top_box.pack_start (manager.get_widget ("/MainMenu"), false, true);
+            window.add_accel_group (manager.get_accel_group ());
+            load_action_entries ();
+            connect_menu_actions ();
+            
+            /* Create an Alignment to hold the pages */
+            main = new Alignment (0.5f, 0.5f, 1.0f, 1.0f);
+            main.set_padding (resource_manager.PADDING, resource_manager.PADDING, 
+                    0U, 0U);
+                    
+            sidebar.set_margin_left (resource_manager.PADDING);
+            main.set_margin_right (resource_manager.PADDING);
 
-                /* Load the main alignement where all the pages will be put */
-	            main = builder.get_object ("main") as Alignment;
-	        } catch (Error e) {
-	            error ("Error opening UI files, check your installation.");
-	        }
-	        
-	        /* Create an empty HashTable to store the Visit windows */
-	        visit_windows = new HashTable<int, VisitWindow> (null, null);
+            box.pack1 (sidebar, false, false);
+            box.pack2 (main, true, false);
+            
+            top_box.pack_start (box, true, true);
+            
+            box.set_position (220);
+            sidebar.set_size_request (200, -1);
+
+            window.add (top_box);
 	        
 	        /* Load pages and connect callbacks with errors */
-            start_page = new StartPage (resource_manager);
+            add_page ("start", new StartPage (resource_manager), true);
 	        
 	        /* Show starting page */
 	        show_start_page ();
 	        
+#if HAVE_PLUGINS
 	        /* Load plugins */
 	        load_plugins.begin ();
+#endif
 	        
 	        /* Load other pages and then connect signals so the user can
 	         * visit them */
 	        load_pages.begin ();
+	        
+	        /* Request a decent size for the StartPage otherwise it will be quite compressed
+	         * and not so clear. */
+	        window.realize.connect (() => (main.get_child ()).set_size_request (950, 550));
+		}
+		
+		public void add_page (string key, Page page, bool show_in_sidebar = false) {
+		    if (pages[key] == null) {
+                pages[key] = page;
+                if (show_in_sidebar)
+                    sidebar.add_entry (page.get_sidebar_entry ());
+            } else {
+                warning ("Trying to overwrite a page instance, ignoring the request");
+            }
+        }
+		
+		private void connect_menu_actions () {
+            manager.get_action ("/MainMenu/FileMenu/New Patient").activate.connect (on_new_patient_action_activate);
+            manager.get_action ("/MainMenu/FileMenu/New Doctor").activate.connect (on_new_doctor_action_activate);
+            manager.get_action ("/MainMenu/FileMenu/Quit").activate.connect ((item) => stop ());
+            manager.get_action ("/MainMenu/ViewMenu/Start page").activate.connect ((item) => show_start_page ());
+            manager.get_action ("/MainMenu/ViewMenu/Patients").activate.connect ((item) => show_patient_list_page ());
+            manager.get_action ("/MainMenu/ViewMenu/Doctors").activate.connect ((item) => show_doctor_list_page ());
+            manager.get_action ("/MainMenu/ViewMenu/Search medicines").activate.connect ((item) => show_medicines_search_page ());
+            manager.get_action ("/MainMenu/ToolsMenu/Settings").activate.connect (on_settings_action_activate);
+            manager.get_action ("/MainMenu/ToolsMenu/Backup").activate.connect (on_backup_action_activate);
+            manager.get_action ("/MainMenu/ToolsMenu/ImportData").activate.connect (on_import_data_action_activate);
+            manager.get_action ("/MainMenu/ToolsMenu/AddMedicines").activate.connect (on_add_medicines_action_activate);
+            manager.get_action ("/MainMenu/ToolsMenu/BrowseMedicines").activate.connect (on_browse_medicines_action_activate);
+            manager.get_action ("/MainMenu/HelpMenu/Contents").activate.connect (on_help_action_activate);
+            manager.get_action ("/MainMenu/HelpMenu/Report a bug").activate.connect (on_report_a_bug_action_activate);
+            manager.get_action ("/MainMenu/HelpMenu/About").activate.connect (on_about_action_activate);
+		}
+		
+		/**
+		 * @brief Populate the entries from GtkUIManager.
+		 */
+		internal void load_action_entries () {
+		    entries = new Gtk.ActionGroup ("MainMenu");
 		}
 		
+		/**
+		 * @brief Hide user interface if it is not desired anymore.
+		 */
+		private void stop () {
+		    window.hide ();
+ 		    resource_manager.application.release ();
+        }
+		
 		internal async void load_pages () {
-            patient_list_page = new PatientListPage (resource_manager);
-            doctor_list_page = new DoctorListPage (resource_manager);
-            medicine_search_page = new MedicineSearchPage (resource_manager);
-	        builder.connect_signals (this);
+		    add_page ("patients", new PatientListPage (resource_manager), true);
+		    add_page ("doctors", new DoctorListPage (resource_manager), true);
+		    add_page ("medicines", new MedicineSearchPage (resource_manager), true);
+		    sidebar.add_entry (new SidebarCalendarEntry (resource_manager));
+		    sidebar.expand_all ();
 		}
 		
+#if HAVE_PLUGINS
 		internal async void load_plugins () {
 		    extension_set = setup_extension_set (resource_manager,
 		                                         resource_manager.plugin_engine);
 		}
+#endif
 			
 		public void error_callback (Page page, string message) {
 			resource_manager.error_callback (page, message);
 		}
 		
 		/**
-		 * @brief Set active page in the main window.
-		 * @param page the page to be set as active.
+		 * @brief Return the UI manager associated with the Clinica
+		 * instance, that will be used to add menu items in plugins.
 		 */
-		private void set_page (Page page) {
+		public Clinica.UIManager get_ui_manager () {
+		    return manager;
+		}
+		
+		public void load_page (Page page) {
 		    if (main.get_child () != null) {
 		        if (main.get_child () == (page as Widget))
 		            return;
@@ -124,9 +197,28 @@ namespace Clinica {
 		            main.remove (main.get_child ());
 		        }
 		    } 
+		    
 	        main.add (page);
             page.show ();
-            page.setup ();
+            window.set_title (page.get_title ());
+
+            sidebar.select_entry (page.get_sidebar_entry ());
+		}
+		
+		/**
+		 * @brief Set active page in the main window.
+		 * @param page the page to be set as active.
+		 */
+		public Page? set_page (string key) {
+		    var page = pages[key];
+		    if (page == null) {
+		        warning ("Requested page with key %s, but was not loaded. Ignoring the request", key);
+		        return null;
+		    }
+		    
+		    load_page (page);
+		    
+            return page;
 		}
 		
 		/**
@@ -134,22 +226,22 @@ namespace Clinica {
 		 * and nothing more on the main window. 
 		 */
 		public void show_start_page (string patient_name = "") {
-		    set_page (start_page);
-		    start_page.set_name (patient_name);
+		    set_page ("start");
+		    pages["start"].set_name (patient_name);
 		}
 		
 		/**
 		 * @brief Show patient list in the main page.
 		 */
 		public void show_patient_list_page () {
-		    set_page (patient_list_page);
+		    set_page ("patients");
 		}
 		
 		/**
 		 * @brief Show doctor list in the main page.
 		 */
 		public void show_doctor_list_page (GLib.Object? source = null) {
-		    set_page (doctor_list_page);
+		    set_page ("doctors");
 		}
 		
 		/**
@@ -157,7 +249,7 @@ namespace Clinica {
 		 */
 		[CCode (instance_pos = -1)]
 		public void show_medicines_search_page (GLib.Object? source = null) {
-		    set_page (medicine_search_page);
+		    set_page ("medicines");
 		}
 		
 		/**
@@ -169,98 +261,83 @@ namespace Clinica {
     		    calendar_window = new CalendarWindow (resource_manager);
     		    calendar_window.destroy.connect ((cw) => calendar_window = null);
     		}
-		else {
+            else {
                 /* Bring the window to front if it's not there */		    
                 calendar_window.present ();
-            	}
+            }
             
 		    calendar_window.show_all ();
 		}
 		
-		/**
-		 * @brief Show the VisitiWindow for the given page. If it
-		 * is already open than bring it on top.
-		 */
-		public VisitWindow show_visit_window (Patient p) {
-		    int p_id = p.get_id ();
-
-            VisitWindow? win = visit_windows.lookup (p_id);
-            if (win == null) {
-                win = new VisitWindow (resource_manager, p);
-                visit_windows.insert (p_id, win);
-            }
-            else {
-                win.present ();
-            }
-            
-            win.show_all ();
-            return win;
+		public void register_page (string identifier, Page page) {
+		    pages[identifier] = page;
+		    
+		    var sidebar_entry = page.get_sidebar_entry ();
+		    
+		    if (sidebar_entry != null) {
+		        sidebar.add_entry (page.get_sidebar_entry (), 
+		            page.get_parent_entry ());
+		    }
 		}
 		
-		/* CALLBACKS */
-	    [CCode (instance_pos = -1)]
-		public void on_window_destroy (GLib.Object w) {
-			Gtk.main_quit ();
+		public void unregister_page (string identifier) {
+		    var page = pages[identifier];
+		    sidebar.remove_entry (page.get_sidebar_entry ());
+		    pages[identifier] = null;
 		}
 		
-		[CCode (instance_pos = -1)]
-		public void on_browse_patient_list_requested (StartPage page) {
-		    show_patient_list_page ();
+		/**
+		 * @brief Show the VisitiWindow for the given page. If it
+		 * is already open than bring it on top.
+		 */
+		public VisitPage show_visit_window (Patient p) {
+		    string identifier = "patients/%s".printf (p.id.to_string ());
+		    var page = pages[identifier];
+		    if (page == null) {
+		        page = new VisitPage (resource_manager, p);
+		        register_page (identifier, page);
+		    }
+		    
+		    // Load the page and display the mainwindow, if it is not
+		    // displayed in front of the user yet. 
+		    load_page (page);
+		    window.show_all ();
+		    window.present ();
+		    
+		    return page as VisitPage;
 		}
 		
-		[CCode (instance_pos = -1)]
-		public void on_browse_doctor_list_requested (StartPage page) {
-		    show_doctor_list_page ();
+		public void close_visit_window (Patient p) {
+		    string identifier = "patients/%s".printf (p.id.to_string ());
+		    var page = pages[identifier];
+		    if (page != null) {
+		        
+		    }
 		}
 		
-		/* Menu item */
-		
-		[CCode (instance_pos = -1)]
-		public void on_new_patient_menu_item_activate (MenuItem item) {
+		/* CALLBACKS */
+		private void on_new_patient_action_activate (Gtk.Action action) {
 			var new_patient_dialog = new PatientEditor (resource_manager);
-			new_patient_dialog.dialog.set_transient_for (window);
+			new_patient_dialog.set_transient_for (window);
 			new_patient_dialog.run ();
 			new_patient_dialog.destroy ();
 		}
 		
-		[CCode (instance_pos = -1)]
-        	public void on_new_doctor_menu_item_activate (MenuItem item) {
-        		var new_doc_dialog = new DoctorEditor (resource_manager);
-        		new_doc_dialog.dialog.set_transient_for (window);
-	        	new_doc_dialog.run ();
+        private void on_new_doctor_action_activate (Gtk.Action item) {
+        	var new_doc_dialog = new DoctorEditor (resource_manager);
+        	new_doc_dialog.set_transient_for (window);
+	       	new_doc_dialog.run ();
 			new_doc_dialog.destroy ();
-        	}
-		
-		[CCode (instance_pos = -1)]
-		public void on_patient_menu_item_activate (MenuItem item) {
-		    show_patient_list_page ();
-		}
-		
-		[CCode (instance_pos = -1)]
-		public void on_doctor_menu_item_activate (MenuItem item) {
-		    show_doctor_list_page ();
-		}
-		
-		[CCode (instance_pos = -1)]
-		public void on_home_menu_item_activate (MenuItem item) {
-		    show_start_page();
-		}
-		
-		[CCode (instance_pos = -1)]
-		public void on_search_medicines_menu_item_activate (MenuItem item) {
-		    set_page (medicine_search_page);
         }
-		
-		[CCode (instance_pos = -1)]
-		public void on_about_menu_item_activate (GLib.Object? source) {
+
+		private void on_about_action_activate (Gtk.Action action) {
 		    var about_dialog = new AboutDialog (resource_manager);
 		    about_dialog.set_transient_for (window);
 		    about_dialog.run (); 
 		    about_dialog.destroy ();
 		}
 		
-		[CCode (instance_pos = -1)]
-		public void on_settings_menu_item_activate (MenuItem item) {
+		private void on_settings_action_activate (Gtk.Action action) {
 		    if (settings_manager == null){
     		    settings_manager = new SettingsManager (resource_manager);
     		    /* Dereference the window on release to make it be freed and
@@ -274,8 +351,77 @@ namespace Clinica {
 		    settings_manager.show_all ();
 		}
 		
-		[CCode (instance_pos = -1)]
-		public void on_help_menu_item_activate (MenuItem item) {
+		private void on_backup_action_activate (Gtk.Action action) {
+		    var backup_engine = new BackupEngine (resource_manager);
+		    
+		    // Ask the user where he would like to backup its files. 
+		    var chooser = new FileChooserDialog (_("Select the folder where the data should be saved"), 
+		        this.window, FileChooserAction.SELECT_FOLDER, Gtk.Stock.CANCEL, ResponseType.CANCEL,
+		        Gtk.Stock.SAVE, ResponseType.ACCEPT);
+		    
+		    // Set a reasonable default file name
+		    chooser.set_filename ("Backup");
+		    
+		    if (chooser.run () == ResponseType.ACCEPT) {
+		        debug ("Backing up user data");
+		        var filename = chooser.get_filename ();
+    	    	chooser.destroy ();
+    	    	
+    	    	string destination = Path.build_filename (filename, 
+    	    	    "Clinica_Backup_%s".printf (new DateTime.now_local ().to_string ()));
+    	    	debug ("Creating an empty folder in %s", destination);
+    	    	
+    	    	DirUtils.create (destination, -1);
+    	    	
+    		    backup_engine.backup (resource_manager.data_provider, 
+	    	        destination);
+	    	        
+	    	    var dialog = new MessageDialog (window, DialogFlags.MODAL, 
+	    	        MessageType.INFO,
+	    	        ButtonsType.OK,
+	    	        "%s", 
+	    	        /* In this string %s refers to the path where the backup has been performed. */
+	    	        _("Backup completed successfully in the folder %s").printf (filename));
+	    	    dialog.set_title (_("Backup completed"));
+	    	    dialog.format_secondary_markup (
+	    	        _("Please take care of copying the folder in a safe place for future restore of the data."));
+	    	    dialog.run ();
+	    	    dialog.destroy ();
+	    	}
+	    	else {
+	    	    chooser.destroy ();
+	    	}
+		}
+		
+		private void on_import_data_action_activate (Gtk.Action action) {
+		    var import_dialog = new ImportDialog (resource_manager);
+		    if (import_dialog.run () == ResponseType.ACCEPT) {
+		        var filename = import_dialog.get_filename ();
+		        import_dialog.destroy ();
+		        
+		        // Import the data using the BackupEngine. 
+		        var engine = new BackupEngine (resource_manager);
+		        engine.import.begin (filename);
+            }
+            else        
+                import_dialog.destroy ();
+		}
+		
+		private void on_add_medicines_action_activate (Gtk.Action action) {
+		    var medicine_editor = new MedicineEditor (resource_manager);
+		    medicine_editor.set_transient_for (this.window);
+		    medicine_editor.run ();
+		    medicine_editor.destroy ();
+		}
+		
+		private void on_browse_medicines_action_activate (Gtk.Action action) {
+		    var medicine_browser = new MedicineBrowserDialog (resource_manager);
+		    medicine_browser.set_transient_for (this.window);
+		    medicine_browser.run ();
+		    medicine_browser.destroy ();
+		}
+		
+		private void on_help_action_activate (Gtk.Action action) {
 		    try {
     		    Gtk.show_uri (this.window.get_screen (), "ghelp:clinica", Gdk.CURRENT_TIME);
     		} catch (GLib.Error e) {
@@ -284,12 +430,42 @@ namespace Clinica {
 		}
 		
 		/**
+		 * @brief Report a bug to launchpad.
+		 *
+		 * Tries launchpad-integration first, if that fails try the browser and if even that
+		 * fails than give an error message to the user.
+		 */
+		private void on_report_a_bug_action_activate (Gtk.Action action) {
+		    try {
+		        Pid pid;
+		        if (FileUtils.test ("/usr/bin/clinica", FileTest.EXISTS)) {
+    		        Process.spawn_async (null, { "/usr/bin/launchpad-integration", "-b", "-Pclinica" }, null, 0, null, out pid);
+    		    }
+    		    else {
+    		        throw new GLib.Error (Quark.from_string ("DEBUG"), 
+    		            1, "Could not find /usr/bin/clinica, maybe clinica is not installed?");
+    		    }
+		    } catch (GLib.Error e) {
+		        print ("Error: %s\n".printf (e.message));
+		        try {
+		            Gtk.show_uri (null, "https://bugs.launchpad.net/clinica-project/+filebug", Gdk.CURRENT_TIME);
+		        } catch (GLib.Error e) {
+		            error (_("An error occurred while opening the bug system. Please go to\nhttp://launchpad.net/clinica-project/ to file a bug"));
+		        }
+		    }
+		}
+		
+		public void show_main_window () {
+		    window.show_all ();
+		    show_start_page ();
+		    window.present ();
+		}
+		
+		/**
 		 * @brief start application
 		 */
 		public void start () {
-			window.show_all ();
 			started = true;
-			Gtk.main ();
 		}
 	}
 }
diff --git a/libclinica/UserInterfaceActivatable.vala b/libclinica/UserInterfaceActivatable.vala
index 9671fe8..a9732df 100644
--- a/libclinica/UserInterfaceActivatable.vala
+++ b/libclinica/UserInterfaceActivatable.vala
@@ -1,3 +1,22 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+
 namespace Clinica {
 
     /**
diff --git a/libclinica/Utils.vala b/libclinica/Utils.vala
index 1f4943a..6bcb1b9 100644
--- a/libclinica/Utils.vala
+++ b/libclinica/Utils.vala
@@ -105,5 +105,22 @@ namespace Clinica.Utils {
 	    	return false;
 	    }
     }
+    
+    public Gdk.Pixbuf pixbuf_from_svg_resource (string resource, int width, int height) {
+        try {
+            var stream = GLib.resources_open_stream (resource, ResourceLookupFlags.NONE);
+            uint32 flags;
+            size_t count;
+            GLib.resources_get_info (resource, ResourceLookupFlags.NONE, out count, out flags);
+            uint8[] buffer = new uint8[count];
+            stream.read_all (buffer, out count);
+            stream.close ();
+            var handle = new Rsvg.Handle.from_data (buffer);
+            var pixbuf = handle.get_pixbuf ();
+            return pixbuf.scale_simple (width, height, Gdk.InterpType.BILINEAR);
+        } catch (GLib.Error e) {
+            return new Gdk.Pixbuf (Gdk.Colorspace.RGB, false, 16, 0, 0);
+        }
+    }
 
 }
diff --git a/libclinica/Visit.vala b/libclinica/Visit.vala
index 54421b8..06b6e99 100644
--- a/libclinica/Visit.vala
+++ b/libclinica/Visit.vala
@@ -15,161 +15,88 @@
  *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
  *
  *   Authors: Leonardo Robol <leo at robol.it>
- *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
+ *            Tommaso Bianucci <churli at gmail.com>
  */
  
- using Gee;
- using Sqlite;
  
- namespace Clinica {
+using Jansson;
  
-    public class VisitIterator : SqlDataIterator {
-    
-        
-		private ResourceManager resource_manager;
+namespace Clinica {
 
-        public VisitIterator (ResourceManager resources) {
-            base (resources.db, resources.visits_table, "date", true);
-            resource_manager = resources;
-        }
-        
-        public VisitIterator.with_day (ResourceManager resources, DateTime day, bool descending = true) {
-            DateTime day_after = day.add_days (1).add_minutes (-1);
-            base.with_like (resources.db, resources.visits_table, "date", descending, 
-                "date BETWEEN '%s' AND '%s'".printf (SqlDataType.datetime_to_string (day),
-                                                     SqlDataType.datetime_to_string (day_after)));
-            resource_manager = resources;
-        }
-        
-        public VisitIterator.with_patient (ResourceManager resources, Patient p, bool descending = true) {
-            base.with_like (resources.db, resources.visits_table, "date", descending,
-                "patient = %d".printf (p.get_id ()));
-            resource_manager = resources;
-        }
-        
-        public new VisitIterator iterator () { return this; }
-        
-        public new Visit get () { 
-            return new Visit.with_id (resource_manager, base.get ()); 
-        }
-    }
- 
-    public class Visit : SqlDataType {
-        
-        /* FIELDS */
-        public string anamnesis {
-        	get { return get_text ("anamnesis"); }
-        	set { set_text ("anamnesis", value); }
-        }
+    public class Visit : Object {
+   
+        public DataProvider? provider = null;
         
-        public string physical_examination {
-        	get { return get_text ("physical_examination"); }
-        	set { set_text ("physical_examination", value); }
-        }
-        
-        public string laboratory_exam {
-        	get { return get_text ("laboratory_exam"); }
-        	set { set_text ("laboratory_exam", value); }
-        }
-        
-        public string histopathology {
-        	get { return get_text ("histopathology"); }
-        	set { set_text ("histopathology", value); }
-        }
-        
-        public string diagnosis {
-        	get { return get_text ("diagnosis"); }
-        	set { set_text ("diagnosis", value); }
-        }
-        
-        public string topical_therapy {
-        	get { return get_text ("topical_therapy"); }
-        	set { set_text ("topical_therapy", value); }
-        }
-        
-        public string systemic_therapy {
-        	get { return get_text ("systemic_therapy"); }
-        	set { set_text ("systemic_therapy", value); }
-        }
-        
-        public string subsequent_checks {
-        	get { return get_text ("subsequent_checks"); }
-        	set { set_text ("subsequent_checks", value); }
-        }
-        
-        private DateTime _date;
-        public DateTime date {
-        	get { 
-        		_date = get_date ("date");
-        		return _date;
-        	}
-        	set {
-        		_date = value;
-        		set_date ("date", _date);
-        	}
-        }
-        
-        private Patient _patient;
-        public  Patient patient {
-        	get {
-        		_patient = new Patient.with_id (resource_manager, get_integer ("patient"));
-        		return _patient;
-        	}
-        	set {
-        		this._patient = value;
-        		set_integer("patient", value.get_id ());
-        	}
-        }
-        
-		private ResourceManager resource_manager;
+        public int64 id { get; set; default = 0; }
+    
+        public string anamnesis { get; set; default = ""; }
+            
+        public string physical_examination { get; set; default = ""; }
+            
+        public string laboratory_exam { get; set; default = ""; }
+            
+        public string histopathology { get; set; default = ""; }
+            
+        public string diagnosis { get; set; default = ""; }
+            
+        public string topical_therapy { get; set; default = ""; }
+            
+        public string systemic_therapy { get; set; default = ""; }
+            
+        public string subsequent_checks { get; set; default = ""; }
+            
+        public DateTime date { get; set; }
+            
+        public Patient patient { get; set; default = null; }
         
         /**
-         * @brief Create a new visit to 
-         * the passed patient.
-         * @param patient The patient that has been
-         * visited
+         * @brief Get a Visit from a JSON coded object.
          */
-        public Visit (ResourceManager resources, Patient? patient) {
-            base (resources.db);
-            resource_manager = resources;
-            table_name = resources.visits_table;
-            error.connect ((t,l) => resources.error_callback(t,l));
-            table_name = "visits";
+        internal Visit.from_json (Json o, DataProvider? source_provider = null) {
             
-            add_text_field ("anamnesis");
-            add_text_field ("physical_examination");
-            add_text_field ("laboratory_exam");
-            add_text_field ("histopathology");
-            add_text_field ("diagnosis");
-            add_text_field ("topical_therapy");
-            add_text_field ("systemic_therapy");
-            add_text_field ("subsequent_checks");
-            add_date_field ("date");
+            provider = source_provider;
+            id = o.object_get ("id").integer_value ();
+            anamnesis = o.object_get("anamnesis").string_value ();
+            physical_examination = o.object_get ("physical_examination").string_value ();
+            laboratory_exam = o.object_get ("laboratory_exam").string_value ();
+            histopathology = o.object_get ("histopathology").string_value ();
+            diagnosis = o.object_get ("diagnosis").string_value ();
+            topical_therapy = o.object_get ("topical_therapy").string_value ();
+            systemic_therapy = o.object_get ("systemic_therapy").string_value ();
+            subsequent_checks = o.object_get ("subsequent_checks").string_value ();
+            date = SqliteDataProvider.string_to_datetime (
+                o.object_get ("date").string_value ());
             
-            add_integer_field ("patient");
-            
-            if (patient != null) {
-                this.patient = patient;
+            if (provider != null) {
+                var patient_id = o.object_get ("patient").integer_value ();
+                if (patient_id != 0) {
+                    patient = provider.get_patient (patient_id);
+                }
             }
-            
-            init_resources ();
         }
         
-        public Visit.with_id (ResourceManager resources, int ID) {
-            this (resources, null);
-            load (ID);
-            this.patient = new Patient.with_id (resources, get_integer ("patient"));
-        }
-        
-        public static new VisitIterator all (ResourceManager resources) {
-            return new VisitIterator (resources);
-        }
-        
-        public static new VisitIterator for_day (ResourceManager resources, DateTime date, bool descending = false) {
-            return new VisitIterator.with_day (resources, date, descending);
+        internal Json to_json () {
+            var object = Json.object ();
+            
+            object.object_set ("id", Json.integer (id));
+            object.object_set ("anamnesis", Json.string (anamnesis));
+            object.object_set ("physical_examination", Json.string (physical_examination));
+            object.object_set ("laboratory_exam", Json.string (laboratory_exam));
+            object.object_set ("histopathology", Json.string (histopathology));
+            object.object_set ("diagnosis", Json.string (diagnosis));
+            object.object_set ("topical_therapy", Json.string (topical_therapy));
+            object.object_set ("systemic_therapy", Json.string (systemic_therapy));
+            object.object_set ("subsequent_checks", Json.string (subsequent_checks));
+            object.object_set ("date", Json.string (
+                SqliteDataProvider.datetime_to_string (date)));
+            if (patient != null)
+                object.object_set ("patient", Json.integer (patient.id));
+            else
+                object.object_set ("patient", Json.integer (0));
+                
+            return object;
         }
-       
+    
     }
- 
- 
- }
+
+}
diff --git a/libclinica/VisitActions.vala b/libclinica/VisitActions.vala
index e1e82df..fb53e38 100644
--- a/libclinica/VisitActions.vala
+++ b/libclinica/VisitActions.vala
@@ -22,23 +22,23 @@ using Gtk;
 
 namespace Clinica {
 
-	public class VisitActions : Alignment {
+	public class VisitActions : Clinica.Toolbar {
 	
 		/* Buttons */
-		private Button show_details_button;
-		private Button save_button;
-		private Button pdf_button;
-		private Button delete_button;
+		private ToolbarItem show_details_item;
+		private ToolbarItem save_item;
+		private ToolbarItem pdf_item;
+		private ToolbarItem print_item;
+		private ToolbarItem delete_item;
+		private ToolbarItem close_item;
 	
 		/* Signals */
 		public signal void save_visit ();
 		public signal void save_as_pdf ();
+		public signal void print_visit ();
 		public signal void show_details ();
 		public signal void delete_visit ();
-		
-		/* Resource Manager */
-		private ResourceManager resource_manager { get; set; }
-		
+
 		/**
 		 * @brief Id of the connection to the saved signal of the
 		 * Visit
@@ -51,37 +51,57 @@ namespace Clinica {
         private VisitTab visit_tab;
 	
 		public VisitActions (ResourceManager resources) {
-			GLib.Object (xalign: 0.5F, yalign: 0F, xscale: 1F, yscale: 0F);
-			resource_manager = resources;
-			
-			/* Create an HBox to hold the buttons */
-			var hbox = new HBox (false, resource_manager.PADDING);
+			base (resources);
 			
 			/* Show more details on this patient */
-			show_details_button = new Button.with_label (_("Edit patient details"));
-			show_details_button.clicked.connect ((button) => show_details ());
-			hbox.pack_start (show_details_button);
+			show_details_item = new ToolbarItem (resource_manager, 
+			    Config.RESOURCE_BASE + "ui/icons/small_pencil.png");
+			show_details_item.activated.connect ((button) => show_details ());
+			show_details_item.set_tooltip_text (_("Edit details of patient"));
+			insert (show_details_item, -1);
 			
 			/* Delete Visit button */
-			delete_button = new Button.from_stock (Gtk.Stock.DELETE);
-			delete_button.clicked.connect ((button) => delete_visit ());
-			hbox.pack_start (delete_button);
+			delete_item = new ToolbarItem (resource_manager, 
+			    Config.RESOURCE_BASE + "ui/icons/small_remove_2.png");
+			delete_item.activated.connect ((button) => delete_visit ());
+			delete_item.set_tooltip_text (_("Remove this visit"));
+			insert (delete_item, -1);
 			
 			/* Save the visit as a PDF file */
-			pdf_button = new Button.with_label (_("Save as PDF"));
-			pdf_button.clicked.connect ((button) => save_as_pdf ());
-			hbox.pack_start (pdf_button);
+			pdf_item = new ToolbarItem (resource_manager, 
+			    Config.RESOURCE_BASE + "ui/icons/small_pdf.png");
+			pdf_item.activated.connect ((button) => save_as_pdf ());
+			pdf_item.set_tooltip_text (_("Export this visit as PDF"));
+			insert (pdf_item, -1);
+			
+			/* Directly print the visit */
+			print_item = new ToolbarItem (resource_manager,
+			    Config.RESOURCE_BASE + "ui/icons/small_print.png");
+			print_item.activated.connect ((button) => print_visit ());
+			print_item.set_tooltip_text (_("Print a report of this visit"));
+			insert (print_item, -1);
 		
 			/* The save button */
-			save_button = new Button.from_stock (Gtk.Stock.SAVE);
-			save_button.clicked.connect ((button) => save_visit ());
-			hbox.pack_start (save_button);
+			save_item = new ToolbarItem (resource_manager, 
+			    Config.RESOURCE_BASE + "ui/icons/small_ok_2.png");
+			save_item.activated.connect ((button) => save_visit ());
+			save_item.set_tooltip_text (_("Save this visit"));
+			insert (save_item, -1);
+			
+			/* The close button */
+			close_item = new ToolbarItem (resource_manager,
+			    Config.RESOURCE_BASE + "ui/icons/small_close.png");
+			close_item.activated.connect ((button) => { 
+			    resource_manager.user_interface.unregister_page (
+    			    "patients/%s".printf (visit_tab.visit.patient.id.to_string ()));
+    			resource_manager.user_interface.set_page ("patients");
+    	    }); 
+    	    close_item.set_tooltip_text (_("Close the visits of this patient"));
+			insert (close_item, -1);
 			
-			add (hbox);
+			show_all ();
 		}
 		
-		
-		
 		/**
 		 * @brief Set active visit of which the actions refers. This is used mainly
 		 * to set the status of the delete buttons.
@@ -94,11 +114,11 @@ namespace Clinica {
             /* Set the sensitivity of the button according to the changed
              * visit. */
             this.visit_tab = visittab;
-            visit_connection_id = visit_tab.saved.connect ((visit) => delete_button.set_sensitive (true));
-            if (visit_tab.visit.get_id () != 0)
-                delete_button.set_sensitive (true);
+            visit_connection_id = visit_tab.saved.connect ((visit) => delete_item.set_active (true));
+            if (visit_tab.visit.id != 0)
+                delete_item.set_active (true);
             else
-                delete_button.set_sensitive (false);
+                delete_item.set_active (false);
 		}
 	}
 	
diff --git a/libclinica/VisitBrowser.vala b/libclinica/VisitBrowser.vala
index 44ba178..3ac5f1d 100644
--- a/libclinica/VisitBrowser.vala
+++ b/libclinica/VisitBrowser.vala
@@ -15,7 +15,6 @@
  *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
  *
  *   Authors: Leonardo Robol <leo at robol.it>
- *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
  */
 
 using Gtk;
@@ -39,39 +38,51 @@ namespace Clinica {
 		/**
 		 * @brief Window parent of this object.
 		 */
-	    private VisitWindow visit_window;
+	    private VisitPage visit_page;
+	    
+	    private int old_pages = 0;
+	    
+	    construct {
+	        tab_pos = PositionType.LEFT;
+	    }
 		
 		/**
 		 * @brief Browser for the Visits of a Patient
 		 */
-		public VisitBrowser (ResourceManager resources, VisitWindow vw, Patient p) {
+		public VisitBrowser (ResourceManager resources, VisitPage page, Patient p) {
 		
 		    resource_manager = resources;
-		    visit_window = vw;
-			
-			/* Set Tab on the left */
-			set_tab_pos (PositionType.LEFT);
+		    visit_page = page;
 			
 			/* Get the visit store */
 			store = resource_manager.visit_list_store;
 			
 			patient = p;
 			
-			/*  First add a new visit and keep a reference to new_page
+			Label l;
+			
+			/* Put in future visits */
+			foreach (Visit v in p.visits (new DateTime.now_local ())) {
+				l = new Label(v.date.format ("%F"));
+				append_page (new VisitTab (resource_manager, visit_page, v, l), l);
+				old_pages++;
+			}
+			
+			/*  Then add add a new visit and keep a reference to new_page
 			 *  to focus it on page loading. */
-			var l = new Label(_("New visit"));
-			new_page = new VisitTab.with_patient (resource_manager, patient, l);
+			l = new Label(_("New visit"));
+			new_page = new VisitTab.with_patient (resource_manager, visit_page, patient, l);
 			append_page (new_page, l);
-			
+
 			new_tab_saved_connection_id = new_page.saved.connect (on_new_page_saved);
 				
 			/* And then load all visits for the patient */
-			foreach (Visit v in new VisitIterator.with_patient (resource_manager, p)) {
+			foreach (Visit v in p.visits (null, new DateTime.now_local ())) {
 				l = new Label(v.date.format ("%F"));
-				append_page (new VisitTab (resource_manager, v, l), l);
+				append_page (new VisitTab (resource_manager, visit_page, v, l), l);
 			}
 			
-			store.visit_added.connect (on_visit_list_store_visit_added);
+			resource_manager.data_provider.visit_added.connect (on_visit_added);
 		}
 		
 		public void save_focused_visit () {
@@ -90,9 +101,9 @@ namespace Clinica {
 		 * @brief This callback gets called when a visit is added, probably
 		 * in another VisitBrowser. 
 		 */
-		private void on_visit_list_store_visit_added (int visit_id) {
+		private void on_visit_added (int64 visit_id) {
 		    /* Get the new visit */
-		    Visit new_visit = new Visit.with_id (resource_manager, visit_id);       
+		    Visit new_visit = resource_manager.data_provider.get_visit (visit_id);
             		
 		    /* We may be the VisitBrowser that added the visit, or not.
 		     * Let's find out traversing the tabs */
@@ -101,7 +112,7 @@ namespace Clinica {
 		    
 		    for (i = 0; i < n_pages; i++) {
 		        VisitTab tab = get_nth_page (i) as VisitTab;
-		        int visit_tab_id = tab.visit.get_id ();
+		        int64 visit_tab_id = tab.visit.id;
 		        
 		        if (visit_tab_id == visit_id) {
 		            return;
@@ -116,7 +127,7 @@ namespace Clinica {
 		         * the visit */   
 		        if (new_visit.date.compare (tab.visit.date) > 0) {
 		            Label l = new Label(new_visit.date.format ("%F"));
-		            insert_page (new VisitTab (resource_manager, new_visit, l), l, i);
+		            insert_page (new VisitTab (resource_manager, visit_page, new_visit, l), l, i);
 		            show_all ();
 		            return;
 		        }
@@ -124,22 +135,79 @@ namespace Clinica {
 		    
 		    /* If we got there we haven't found it, so let's add it to the bottom */
 		    Label l = new Label(new_visit.date.format ("%F"));
-		    append_page (new VisitTab (resource_manager, new_visit, l), l);
+		    append_page (new VisitTab (resource_manager, visit_page, new_visit, l), l);
 		    
 		    show_all ();
 		}
 		
+		public void print_focused_visit () {
+		    int page_id = get_current_page();
+			VisitTab tab = get_nth_page (page_id) as VisitTab;
+			
+			/* Check if the visit is already in db. If it is, save it, otherwise
+			 * ask the user to do it, since it may not be what he desires */
+			if (tab.visit.id <= 0) {
+			    Gtk.MessageDialog dialog = new MessageDialog.with_markup (null,
+			        DialogFlags.MODAL, MessageType.QUESTION, ButtonsType.YES_NO, "%s", 
+			        _("A visit need to be saved in order to be exported as PDF.\nDo you want to save the visit now?"));
+			    dialog.set_transient_for (resource_manager.user_interface.window);
+			    dialog.set_title ("Save is required");
+			    if (dialog.run () == ResponseType.YES)
+                    dialog.destroy ();
+                else {
+                    dialog.destroy ();
+			        return;
+			    }
+			}
+			
+			/* If we got here we should save the visit */
+			save_focused_visit ();
+			
+			/* Create the visit printer and ask the user where the
+			 * PDF should be saved. */
+			var printer = new VisitPrinter (resource_manager, tab.visit);
+			
+			/* Create a GtkPrintOperation to handle the printing */
+			var operation = new Gtk.PrintOperation ();
+			
+			/* Connect the callbacks that will actually handle the printing work */
+			operation.begin_print.connect ((operation, context) => {
+			    // Make a test print to a ImageSurface to understand how many pages do we need
+			    var surface = new Cairo.ImageSurface (Cairo.Format.ARGB32, (int) context.get_width (), 
+			       (int) context.get_height ());
+			    var test_printer = new VisitPrinter (resource_manager, tab.visit);
+			    int pages = test_printer.print_report (new Cairo.Context (surface));
+			    
+			    debug ("%d pages are needed for the print operation", pages);
+			    printer.width = context.get_width ();
+			    printer.height = context.get_height ();
+			    operation.set_n_pages (pages);
+			});
+			
+			operation.draw_page.connect ((operation, context, page_number) => {
+			    var ctx = context.get_cairo_context ();
+			    printer.handle_pagination = false;
+			    printer.print_report (ctx, 1);
+            });
+			
+			try {
+    			operation.run (PrintOperationAction.PRINT_DIALOG, resource_manager.user_interface.window);
+    	    } catch (GLib.Error e) {
+    	        warning (_("Error while delivering the print operation"));
+    	    }
+		}
+		
 		public void save_focused_visit_as_pdf () {
 		    int page_id = get_current_page();
 			VisitTab tab = get_nth_page (page_id) as VisitTab;
 			
 			/* Check if the visit is already in db. If it is, save it, otherwise
 			 * ask the user to do it, since it may not be what he desires */
-			if (tab.visit.get_id () <= 0) {
+			if (tab.visit.id <= 0) {
 			    Gtk.MessageDialog dialog = new MessageDialog.with_markup (null,
-			        DialogFlags.MODAL, MessageType.QUESTION, ButtonsType.YES_NO,
+			        DialogFlags.MODAL, MessageType.QUESTION, ButtonsType.YES_NO, "%s", 
 			        _("A visit need to be saved in order to be exported as PDF.\nDo you want to save the visit now?"));
-			    dialog.set_transient_for (visit_window);
+			    dialog.set_transient_for (resource_manager.user_interface.window);
 			    dialog.set_title ("Save is required");
 			    if (dialog.run () == ResponseType.YES)
                     dialog.destroy ();
@@ -154,11 +222,11 @@ namespace Clinica {
 			
 			/* Create the visit printer and ask the user where the
 			 * PDF should be saved. */
-			var printer = new VisitPrinter (tab.visit);
+			var printer = new VisitPrinter (resource_manager, tab.visit);
 			var fc_dialog = new FileChooserDialog ("Save visit as PDF", null, 
 			    FileChooserAction.SAVE, Gtk.Stock.CANCEL, Gtk.ResponseType.CANCEL,
 			    Gtk.Stock.SAVE, Gtk.ResponseType.ACCEPT);
-			fc_dialog.set_transient_for (visit_window);
+			fc_dialog.set_transient_for (resource_manager.user_interface.window);
 			fc_dialog.set_current_name ("%s on %s.pdf".printf (tab.visit.patient.get_complete_name (),
 			                                                   tab.visit.date.format ("%F")));
 			if (fc_dialog.run () != ResponseType.ACCEPT) {
@@ -168,7 +236,7 @@ namespace Clinica {
 			
 			var filename = fc_dialog.get_filename ();
 			fc_dialog.destroy ();
-			printer.print_report (filename);
+			printer.print_report_to_pdf (filename);
 		}
 		
 		/**
@@ -182,7 +250,7 @@ namespace Clinica {
 			
 			/* Create a new one and connect it */
 			var l = new Label(_("New visit"));
-			new_page = new VisitTab.with_patient (resource_manager, patient, l);
+			new_page = new VisitTab.with_patient (resource_manager, visit_page, patient, l);
 			prepend_page (new_page, l);
 			new_page.show_all();
 			
@@ -194,6 +262,7 @@ namespace Clinica {
 		 * can start editing. 
 		 */
 		public void focus_new_page () {
+		    set_current_page (old_pages);
 			new_page.grab_focus ();
 		}
 	}
diff --git a/libclinica/VisitDetail.vala b/libclinica/VisitDetail.vala
index 0d58421..8613f39 100644
--- a/libclinica/VisitDetail.vala
+++ b/libclinica/VisitDetail.vala
@@ -41,11 +41,11 @@ namespace Clinica {
             resource_manager = resources;
             associated_visit = visit;
             
-            var main_box = new VBox (false, resources.PADDING);
+            var main_box = new Box (Orientation.VERTICAL, resources.PADDING);
 			events |= EventMask.BUTTON_PRESS_MASK;
             
             /* First adding hour and title in a row, followed by action buttons */
-            var box = new HBox (false, resources.PADDING);
+            var box = new Box (Orientation.HORIZONTAL, resources.PADDING);
             
             /* Hour, aligned on top. */
             var hour_label = new Label("%.2d:%.2d".printf (visit.date.get_hour(), 
@@ -58,18 +58,29 @@ namespace Clinica {
             title_label.set_markup ("Visit of <b>%s</b>".printf (visit.patient.get_complete_name ()));
             title_label.set_alignment (0.0f, 0.5f);
             title_label.set_line_wrap (true);
-            title_label.set_size_request (181, -1);
+            title_label.set_size_request (161, -1);
             title_label.set_valign (Align.START);
             box.pack_start (title_label);
             
-            /* Action show visit details */
+            /* Action delete this visit */
             var edit_button = new Button ();
-            edit_button.add (new Image.from_file (resource_manager.get_image_file ("calendar_edit.png")));
+            edit_button.add (new Image.from_resource (Config.RESOURCE_BASE + "ui/icons/calendar_edit.png"));
             edit_button.activate.connect ((button) => on_open_visit_menu_item_activate ());
             edit_button.clicked.connect ((button) => on_open_visit_menu_item_activate ());
 			edit_button.set_tooltip_text (_("Edit visit"));            
             edit_button.set_relief (ReliefStyle.NONE);            
             box.pack_start (edit_button, false, true);
+            edit_button.set_valign (Align.START);
+            
+            /* Action show visit details */            
+            var remove_button = new Button ();
+            remove_button.add (new Image.from_resource (Config.RESOURCE_BASE + "ui/icons/calendar_delete.png"));
+            remove_button.activate.connect ((button) => on_remove_menu_item_activate ());
+            remove_button.clicked.connect ((button) => on_remove_menu_item_activate ());
+            remove_button.set_tooltip_text (_("Delete event"));            
+            remove_button.set_relief (ReliefStyle.NONE);
+            remove_button.set_valign (Align.START);
+            box.pack_start (remove_button, false, false);
             
             /* Packing it up */
             main_box.pack_start (box, false, true);
@@ -87,10 +98,10 @@ namespace Clinica {
          */
         private bool on_button_press_event (Widget widget, EventButton event) {
             if (event.button == 3 && event.type == EventType.BUTTON_PRESS) {
-                var popup_menu = new Menu ();
+                var popup_menu = new Gtk.Menu ();
                 popup_menu.attach_to_widget (this, null);
                 
-                var open_visit_menu_item = new MenuItem.with_label (_("Show details"));
+                var open_visit_menu_item = new Gtk.MenuItem.with_label (_("Show details"));
                 open_visit_menu_item.activate.connect (on_open_visit_menu_item_activate);
                 popup_menu.append (open_visit_menu_item);
                 
@@ -102,9 +113,21 @@ namespace Clinica {
             return false;
         }
         
-        private void on_open_visit_menu_item_activate (MenuItem? item = null) {
-            var visit_window = resource_manager.user_interface.show_visit_window (associated_visit.patient);
-            visit_window.select_visit (associated_visit);
+        private void on_open_visit_menu_item_activate (Gtk.MenuItem? item = null) {
+            var page = resource_manager.user_interface.show_visit_window (associated_visit.patient);
+            page.select_visit (associated_visit);
+        }
+        
+        private void on_remove_menu_item_activate (Gtk.MenuItem? item = null) {
+            /* Ask before deleting a visit */
+		    var dialog = new MessageDialog (null, DialogFlags.DESTROY_WITH_PARENT | DialogFlags.MODAL, 
+		                                    MessageType.QUESTION, ButtonsType.YES_NO, "%s", 
+		                                    _("Deleting a visit will cause all its data to be lost.\nDo you really want to continue?"));
+		    if (dialog.run () == ResponseType.YES) {
+		        resource_manager.data_provider.remove_visit (associated_visit);
+            }
+            
+            dialog.destroy ();
         }
     }
  }
diff --git a/libclinica/VisitFileManager.vala b/libclinica/VisitFileManager.vala
new file mode 100644
index 0000000..b91a935
--- /dev/null
+++ b/libclinica/VisitFileManager.vala
@@ -0,0 +1,188 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+ 
+ using Gtk;
+ 
+ namespace Clinica {
+ 
+    public class VisitFileManager : Gtk.VBox {
+    
+        /**
+         * @brief The resource manager of the Clinica application, used to retrieve
+         * information and data.
+         */
+        private ResourceManager resource_manager;
+        
+        /**
+         * @brief The Visit whose files we are displaying.
+         */
+        private Visit visit;
+        
+        /**
+         * @brief The button used to attach a new file.
+         */
+        private Button attach_button;
+        
+        /** 
+         * @brief Button that triggers the opening
+         * of a file manager window of the location
+         * where the file are stored.
+         */
+        private Button browser_button;
+        
+        /**
+         * @brief The maximum width of this column. This is enforced with
+         * set_size_request() on the VBox widget.
+         */
+        private int width = 140;
+        
+        /**
+         * @brief A list of all the files displayed.
+         */
+        GLib.List<FileDetail> files;
+        
+        /**
+         * @brief The VisitWindow in which we are, that will be the parent of all
+         * Dialogs.
+         */
+        private VisitPage visit_page;
+        
+        /**
+         * @brief The FileStore associated with the current DataProvider. 
+         */
+        private FileStore? file_store;
+    
+        public VisitFileManager (ResourceManager resources, VisitPage visit_page, Visit? visit) {
+            GLib.Object (homogeneous: false, spacing: resources.PADDING);
+            resource_manager = resources;
+            this.visit = visit;
+            this.visit_page = visit_page;
+            
+            setup_widget ();
+        }
+            
+        private void setup_widget () {
+            
+            file_store = resource_manager.data_provider.get_file_store ();
+            
+            if (file_store == null) {
+                return;
+            }
+            
+            /* Add a Attach button */
+            attach_button = new Button.with_label (_("Attach file"));
+            attach_button.clicked.connect (on_attach_button_clicked);
+            attach_button.set_size_request (-1, 45);
+            pack_start (attach_button, false, true);
+            
+            /* Add a browser folder button */
+            if (resource_manager.settings.get_boolean ("show-visit-file-manager") &&
+               (file_store != null)) {
+                browser_button = new Button.with_label (_("Browse files"));
+                browser_button.clicked.connect (on_browse_button_clicked);
+                pack_start (browser_button, false, true);
+            }
+            
+            files = new GLib.List<FileDetail> ();
+            
+            reload_file_list ();
+            set_size_request (width, -1);
+            
+            file_store.changed.connect (on_file_store_changed);
+            
+            show_all ();
+        }
+        
+        public void on_attach_button_clicked (Button button) {
+            var fd = new FileChooserDialog (_("Select a file to attach"), resource_manager.user_interface.window, 
+                    FileChooserAction.OPEN, Gtk.Stock.CANCEL, Gtk.ResponseType.CANCEL,
+                    Gtk.Stock.SAVE, Gtk.ResponseType.ACCEPT);
+            fd.set_transient_for (resource_manager.user_interface.window);
+            if (fd.run () == Gtk.ResponseType.ACCEPT) {
+                file_store.store_file (visit.id, fd.get_filename ());
+            }
+            
+            fd.destroy ();
+            reload_file_list ();
+        }
+        
+        /**
+         * @brief Open a file manager to show the files associated with the visit.
+         */
+        private void on_browse_button_clicked (Button button) {
+            try {
+                string path = file_store.get_id_path (visit.id);
+                Gtk.show_uri (null, "file://" + path, Gdk.CURRENT_TIME);
+            } catch (GLib.Error e) {
+                warning (_("Unable to open the browser on the filestore position"));
+            }
+        }
+        
+        /**
+         * @brief Callback for the FileStore changed() event, that
+         * reload the files if the file changed were the ones that 
+         * belong to this visit.
+         */
+        private void on_file_store_changed (int64 id) {
+            if (visit != null && id == visit.id)
+                reload_file_list ();
+        }
+        
+        public void reload_file_list () {
+        
+            if (file_store == null)
+                return;
+            
+            foreach (FileDetail detail in files) {
+                remove (detail);
+            }
+            
+            /* Reset the list */
+            files = new GLib.List<FileDetail> ();
+        
+            if (visit == null) {
+                attach_button.set_sensitive (false);
+                if (browser_button != null)
+                    browser_button.set_sensitive (false);
+                (attach_button.get_child () as Label).set_text (_("Save the visit\n to attach files"));
+                return;
+            }
+            else {
+                attach_button.set_sensitive (true);
+                if (browser_button != null)
+                    browser_button.set_sensitive (true);
+                (attach_button.get_child () as Label).set_text (_("Attach files"));
+            }
+
+            foreach (FileObject obj in file_store.get_files (visit.id)) {
+                var file_detail = new FileDetail (resource_manager, visit_page, obj);
+                pack_start (file_detail, false, true);
+                file_detail.show_all ();
+                files.append (file_detail);
+            }
+        }
+        
+        public void update_visit (Visit visit) {
+            this.visit = visit;
+            reload_file_list ();
+        }
+    
+    }
+ 
+ }
diff --git a/libclinica/VisitListStore.vala b/libclinica/VisitListStore.vala
index b3a9427..33b74a3 100644
--- a/libclinica/VisitListStore.vala
+++ b/libclinica/VisitListStore.vala
@@ -24,10 +24,6 @@ namespace Clinica {
 
 	public class VisitListStore : ListStore {
 	
-	    public signal void visit_added   (int visit_id);
-	    public signal void visit_removed (int visit_id);
-	    
-	
 		enum Field {
 			VISIT,
 			DATE,
@@ -36,6 +32,8 @@ namespace Clinica {
 		public signal void error (string message);
 		
 		private ResourceManager resource_manager;
+		
+		private DataProvider provider;
 	
 		public VisitListStore (ResourceManager resources) {
 		    resource_manager = resources;
@@ -46,67 +44,64 @@ namespace Clinica {
 			 * Visit, Date */
 			Type [] column_headers = { typeof(Visit), typeof(string) };
 			set_column_types (column_headers);
-			
+			load_data ();
+		}
+		
+		public void load_data () {
 			/* Fill liststore asynchronously */
 			Idle.add(() => {
-				foreach (Visit v in Visit.all (resource_manager)) {
-					add_visit (v);
+				foreach (Visit v in resource_manager.data_provider.visits ()) {
+					add_visit (v.id);
 				}
 				
+    	        /* Setup callbacks to add or remove doctors */
+    	        provider = resource_manager.data_provider;
+		        update_signals ();
+		        
+		        resource_manager.notify["data_provider"].connect ((provider) => update_signals ());
+				
 				/* We don't need to execute any more */
 				return false;
-			});
+			});		
 		}
 		
-		public void add_visit (Visit v) {
+		private void update_signals () {
+		    resource_manager.data_provider.visit_added.connect (
+                    (id) => add_visit (id));		        
+            resource_manager.data_provider.visit_changed.connect (
+                    (id) => reload_visit (id));
+            resource_manager.data_provider.visit_removed.connect (
+		            (id) => remove_visit (id));
+		            
+		    provider = resource_manager.data_provider;
+		}
+		
+		private void add_visit (int64 id) {
+		    Visit v = resource_manager.data_provider.get_visit (id);
 			TreeIter iter;
 			append (out iter);
 			set_value (iter, Field.VISIT, v);
 			set_value (iter, Field.DATE, "");
-			
-			visit_added (v.get_id ());
 		}
 		
-		public void reload_visit (Visit v) {
+		private void reload_visit (int64 id) {
+		    Visit v = resource_manager.data_provider.get_visit (id);
 			TreeIter iter = visit_to_iter (v);
 			set_value (iter, Field.VISIT, v);
 			set_value (iter, Field.DATE, "");
 		}
 		
-		/** @brief Get visits of the given patient */
-		public List<TreeIter?> get_visits_of (Patient p) {
-			Value value;
-			var iters = new List<TreeIter?> ();
-			
-			TreeIter it;
-			Visit v;
-			
-			if (!get_iter_first (out it)) {
-				return iters;
-			}
-			do {
-				get_value (it, Field.VISIT, out value);
-				v = value as Visit;
-				if (p.get_id () == v.patient.get_id ()) {
-					iters.append (it);
-				}
-			} while (iter_next (ref it));
-			return iters;
-		}
-		
-		public void remove_visit (Visit v) {
+		private void remove_visit (int64 id) {
 			TreeIter it;
 			Value visit;
-			int this_id = v.get_id ();
 			
 			if (!get_iter_first (out it)) {
 				error(_("Visit database seems corrupted. This is likely to be a bug in the application"));
 			}
 			do {
 				get_value (it, Field.VISIT, out visit);
-				if ((visit as Visit).get_id () == this_id) {
+				if ((visit as Visit).id == id) {
 					remove (it);
-				    visit_removed (this_id);
 					return;
 				}
 			} while (iter_next (ref it));
@@ -114,15 +109,6 @@ namespace Clinica {
 			assert_not_reached ();
 		}
 		
-		public void remove_visit_from_iter (TreeIter it) {
-			Value visit;
-			get_value (it, Field.VISIT, out visit);
-			int this_id = (visit as Visit).get_id ();
-			(visit as Visit).remove ();
-			remove (it);
-			visit_removed (this_id);
-		}
-		
 		public Visit iter_to_visit (TreeIter it) {
 			Value visit;
 			get_value (it, Field.VISIT, out visit);
@@ -136,7 +122,7 @@ namespace Clinica {
 				assert_not_reached ();
 			do {
 				get_value (iter, Field.VISIT, out visit);
-				if ((visit as Visit).get_id () == v.get_id ()) {
+				if ((visit as Visit).id == v.id) {
 					return iter;
 				}
 			} while (iter_next (ref iter));
diff --git a/libclinica/VisitWindow.vala b/libclinica/VisitPage.vala
similarity index 61%
rename from libclinica/VisitWindow.vala
rename to libclinica/VisitPage.vala
index 1a7b09a..d8e5820 100644
--- a/libclinica/VisitWindow.vala
+++ b/libclinica/VisitPage.vala
@@ -22,18 +22,21 @@ using Gtk;
 
 namespace Clinica {
 	
-	public class VisitWindow : Gtk.Window {
+	public class VisitPage : Alignment, Page {
 	
-		private Patient patient;
+		internal Patient patient;
 		private VisitBrowser visit_browser;
 		private VisitToolbar  visit_toolbar;
 
 		public signal void error (string message);
 		
-		private ResourceManager resource_manager;
+		public ResourceManager resource_manager { get; set; }
 		
-		public VisitWindow (ResourceManager resources, Patient p) {
-			GLib.Object (type: WindowType.TOPLEVEL);
+		private string title;
+		
+		private SidebarEntry sidebar_entry;
+		
+		public VisitPage (ResourceManager resources, Patient p) {
 		  	resource_manager = resources;
 			error.connect ((t,l) => resource_manager.error_callback (t,l));
 		
@@ -41,37 +44,49 @@ namespace Clinica {
 			visit_browser = new VisitBrowser (resource_manager, this, patient);
 			visit_toolbar = new VisitToolbar (resource_manager, this, patient);
 			
-			var vbox = new VBox (false, 6);
+			var vbox = new Box (Orientation.VERTICAL, resource_manager.PADDING);
 			
 			/* Packing widgets */
-			vbox.pack_start (visit_toolbar, false, true, 6);
-			vbox.pack_start (visit_browser, true, true, 6);
+			vbox.pack_start (visit_toolbar, false, true, 0);
+			vbox.pack_start (visit_browser, true, true, 0);
 			
 			/* Final setup for the window, with an alignment to make padding */
 			var alignment = new Alignment (0.5F, 0.5F, 1, 1);
 			alignment.add (vbox);
-			alignment.set_padding (0, 0, 6, 6);
+			alignment.set_padding (0, 0, 6, 0);
 			add (alignment);
 			
-			/* Request a decent size for this widget */
-			Utils.set_widget_size (this, 740, 500);
 			connect_signals ();
 			
 			/* Set title according to the patient that we have loaded and connect
 			 * show startup signal to the focusing of the first field in the visit */
-			set_title (_("Visits of the patient %s").printf(patient.get_complete_name ()));
-			this.show.connect ((window) => visit_browser.focus_new_page ());
+			title = _("Visit of the patient %s").printf (patient.get_complete_name ());
+			show_all ();
+			this.realize.connect ((widget) => visit_browser.focus_new_page ());
 			
-			this.destroy.connect (on_visit_window_destroy);
+			/* Create the SidebarEntry to be showed in the Sidebar */
+            sidebar_entry = new SidebarPageEntry (resource_manager, this,
+                patient.get_complete_name (), 
+                Utils.pixbuf_from_svg_resource (Config.RESOURCE_BASE + "ui/icons/patient.svg", 
+                Sidebar.ICON_SIZE, Sidebar.ICON_SIZE));
 		}
 		
-		/**
-		 * @brief Called when the VisitWindow is closed, manages
-		 * to deattach it from the user_interface visit_window hashtable.
-		 */
-		public void on_visit_window_destroy (Widget me) {
-		    resource_manager.user_interface.visit_windows.remove (patient.get_id ());
-		}
+		public string get_title () {
+		    return title;
+        }
+        
+        public SidebarEntry? get_sidebar_entry () {
+            return sidebar_entry;
+        }
+        
+        /**
+         * @brief Return the parent page of this Visit, that will
+         * be the PatientListPage, so all Visits will be visible
+         * in the sidebar as childs of it. 
+         */
+        public SidebarEntry? get_parent_entry () {
+            return resource_manager.user_interface.pages["patients"].get_sidebar_entry ();
+        }
 		
 		/**
 		 * @brief Select the active visit.
@@ -80,7 +95,7 @@ namespace Clinica {
 		    int i;
 		    for (i = 0; i < visit_browser.get_n_pages (); i++) {
 		        VisitTab nth_visit_tab = visit_browser.get_nth_page (i) as VisitTab;
-		        if (nth_visit_tab.get_visit_id () == visit.get_id ()) {
+		        if (nth_visit_tab.get_visit_id () == visit.id) {
 		            visit_browser.set_current_page (i);
 		            return;
 		        }
@@ -90,6 +105,7 @@ namespace Clinica {
 		private void connect_signals () {
 			visit_toolbar.save_visit.connect ((toolbar) => visit_browser.save_focused_visit ());
 			visit_toolbar.save_visit_as_pdf.connect ((toolbar) => visit_browser.save_focused_visit_as_pdf ());
+			visit_toolbar.print_visit.connect ((toolbar) => visit_browser.print_focused_visit ());
 			visit_toolbar.delete_visit.connect ((toolbar) => visit_browser.delete_focused_visit ());
 			
 			/* Connect the callback of the visit selection to update the visit
diff --git a/libclinica/VisitPrinter.vala b/libclinica/VisitPrinter.vala
index 4b58d98..3ad0ad3 100644
--- a/libclinica/VisitPrinter.vala
+++ b/libclinica/VisitPrinter.vala
@@ -23,6 +23,21 @@
  namespace Clinica {
  
     public class VisitPrinter : GLib.Object {
+    
+        private enum State {
+            HEADER,
+            ANAMNESIS,
+            PHYSICAL_EXAMINATION,
+            LABORATORY_EXAM,
+            HISTOPATHOLOGY,
+            DIAGNOSIS,
+            TOPICAL_THERAPY,
+            SYSTEMIC_THERAPY,
+            SUBSEQUENT_CHECKS,
+            DONE
+        }
+        
+        private State current_state;
 
         public Visit visit;
         
@@ -37,19 +52,37 @@
         
         private double y_level;
         
-        public VisitPrinter (Visit v) {
+        public bool handle_pagination { get; set; default = true; }
+        
+        private ResourceManager resource_manager;
+        
+        public VisitPrinter (ResourceManager resources, Visit v) {
+            resource_manager = resources;
             visit = v;
+            current_state = State.HEADER;
         }
         
-        public void print_report (string destination) {
-            /* Start from the top of the sheet */
-            y_level = 0;
-            
+        public void print_report_to_pdf (string destination) {
             /* Create surface and context so we can draw anything we want on
              * the pdf */
             var surface = new PdfSurface (destination, width, height);
             var ctx = new Context (surface);
             
+            print_report (ctx);
+        }
+        
+        /**
+         * @brief Print the report to surface.
+         * @params ctx The context that must be used for printing.
+         * @returns The total number of pages printed or -1 if there are still pages
+         * to be printed. 
+         */
+        public int print_report (Context ctx, int max_pages = 65536) {
+            int starting_page = page_number;
+        
+            /* Start from the top of the sheet */
+            y_level = 0;
+            
             /* Create a font description for the content text */
             font_description = new Pango.FontDescription ();
             font_description.set_family ("Helvetica");
@@ -61,34 +94,64 @@
             field_empty_font.set_size (9 * Pango.SCALE);
             field_empty_font.set_style (Pango.Style.ITALIC);
             
-            /* The main header */
-            write_header (ctx);
-            
-            /* Anamnesis */
-            write_block (ctx, _("Anamnesis"), visit.anamnesis);
-            
-            /* Physical examination */
-            write_block (ctx, _("Physical examination"), visit.physical_examination);
-            
-            /* Laboratory Exam */
-            write_block (ctx, _("Laboratory exam"), visit.laboratory_exam);
-            
-            /* Histopathology */
-            write_block (ctx, _("Histopathology"), visit.histopathology);
-            
-            /* Diagnosis */
-            write_block (ctx, _("Diagnosis"), visit.diagnosis);
-            
-            /* Topical therapy */
-            write_block (ctx, _("Topical therapy"), visit.topical_therapy);
-            
-            /* Systemic therapy */
-            write_block (ctx, _("Systemic therapy"), visit.systemic_therapy);
-            
-            /* Subsequent checks */
-            write_block (ctx, _("Subsequent checks"), visit.subsequent_checks);
+            while (page_number - starting_page < max_pages) {
+                
+                switch (current_state) {
+                    case State.HEADER:
+                        /* The main header */
+                        write_header (ctx);
+                        current_state = State.ANAMNESIS;
+                        break;
+                    case State.ANAMNESIS:
+                        /* Anamnesis */
+                        write_block (ctx, _("Anamnesis"), visit.anamnesis);
+                        current_state = State.PHYSICAL_EXAMINATION;
+                        break;
+                    case State.PHYSICAL_EXAMINATION:
+                        /* Physical examination */
+                        write_block (ctx, _("Physical examination"), visit.physical_examination);                
+                        current_state = State.LABORATORY_EXAM;
+                        break;
+                    case State.LABORATORY_EXAM:
+                        /* Laboratory Exam */
+                        write_block (ctx, _("Laboratory exam"), visit.laboratory_exam);                    
+                        current_state = State.HISTOPATHOLOGY;
+                        break;
+                    case State.HISTOPATHOLOGY:
+                        /* Histopathology */
+                        write_block (ctx, _("Histopathology"), visit.histopathology);
+                        current_state = State.DIAGNOSIS;              
+                        break;
+                    case State.DIAGNOSIS:
+                        /* Diagnosis */
+                        write_block (ctx, _("Diagnosis"), visit.diagnosis);
+                        current_state = State.TOPICAL_THERAPY;
+                        break;
+                    case State.TOPICAL_THERAPY:
+                        /* Topical therapy */
+                        write_block (ctx, _("Topical therapy"), visit.topical_therapy);                
+                        current_state = State.SYSTEMIC_THERAPY;
+                        break;
+                    case State.SYSTEMIC_THERAPY:            
+                        /* Systemic therapy */
+                        write_block (ctx, _("Systemic therapy"), visit.systemic_therapy);                
+                        current_state = State.SUBSEQUENT_CHECKS;
+                        break;
+                    case State.SUBSEQUENT_CHECKS:
+                        /* Subsequent checks */
+                        write_block (ctx, _("Subsequent checks"), visit.subsequent_checks);                    
+                        current_state = State.DONE;
+                        break;
+                    case State.DONE:
+                        finalize_page (ctx);
+                        return page_number - 1;
+                    default:
+                        warning ("Visit printer is in an unrecognized state. Aborting print");
+                        return -1;
+                }
+            }
             
-            finalize_page (ctx);
+            return -1;
         }
         
         /**
@@ -113,7 +176,8 @@
             page_number++;
             
             /* Create next page */
-            ctx.show_page ();
+            if (handle_pagination)
+                ctx.show_page ();
         }
         
         /**
@@ -122,23 +186,107 @@
         private void write_header (Context ctx) {
             TextExtents extents;
             string text;
-            /* Begin by writing on the top the information about the patient */
-            y_level += margin;
+            
+            var base_level = y_level + margin;
+            
+            /* On the right, write the information about the doctor */
+            var name = resource_manager.settings.get_string ("personal-details-name");
+            var address = resource_manager.settings.get_string ("personal-details-address"); 
+            var institution = resource_manager.settings.get_string ("personal-details-institution"); 
+            var email = resource_manager.settings.get_string ("personal-details-email"); 
+            if (name != "") {
+                ctx.set_font_size (14.0);
+                ctx.select_font_face ("Helvetica", FontSlant.NORMAL, FontWeight.BOLD);
+                text = name;
+                ctx.text_extents (text, out extents);
+                ctx.move_to (width - margin - extents.width - extents.x_bearing,
+                             base_level - extents.y_bearing + extents.height);
+                ctx.show_text (text);
+                base_level += extents.height + 6;
+                
+                ctx.set_font_size (11.0);
+                ctx.select_font_face ("Helvetica", FontSlant.NORMAL, FontWeight.NORMAL);
+                
+                if (institution != "") {
+                    text = institution;
+                    ctx.text_extents (text, out extents);
+                    ctx.move_to (width - margin - extents.width - extents.x_bearing,
+                                 base_level - extents.y_bearing + extents.height);
+                    ctx.show_text (text);
+                    base_level += extents.height + 6;
+                }
+                
+                if (address != "") {
+                    text = address;
+                    ctx.text_extents (text, out extents);
+                    ctx.move_to (width - margin - extents.width - extents.x_bearing,
+                                 base_level - extents.y_bearing + extents.height);
+                    ctx.show_text (text);
+                    base_level += extents.height + 6;
+                }
+                
+                if (email != "") {
+                    text = email;
+                    ctx.text_extents (text, out extents);
+                    ctx.move_to (width - margin - extents.width - extents.x_bearing,
+                                 base_level - extents.y_bearing + extents.height);
+                    ctx.show_text (text);
+                    base_level += extents.height + 6;                
+                }
+                
+                base_level += 20;
+            }
+            
+            /* Create the logo of Clinica on the left. */
+            try {
+                var resource = Config.RESOURCE_BASE + "ui/icons/clinica.png";
+                var stream = GLib.resources_open_stream (resource, ResourceLookupFlags.NONE);
+                
+                // Read the image from the stream obtained by the GResource
+                var image = new Cairo.ImageSurface.from_png_stream ((data) => {
+                    try {
+                        stream.read (data);
+                    } catch (Error e) {
+                        return Cairo.Status.READ_ERROR;
+                    }
+                    return Cairo.Status.SUCCESS;
+                });
+                
+                ctx.move_to (0, margin);
+                ctx.set_source_surface (image, 48, 48);
+                ctx.paint ();
+                y_level += 48 + margin + 30;
+             } catch (Error e) {
+                warning ("Cannot load clinica icon from resources: %s".printf (e.message));
+             }
+            
+            ctx.set_source_rgb (0.0, 0.0, 0.0);
+            y_level = (y_level > base_level) ? y_level : base_level;
+            
+            /* Create an horizontal line that separates the header with doctor information
+             * from the one with the doctor information */
+            ctx.move_to (margin, y_level);
+            ctx.set_line_width (1.0);
+            ctx.line_to (width - margin, y_level);
+            ctx.stroke ();
+            y_level += 10;
+
+            /* Begin by writing on the top left the information about the patient */
             text = visit.patient.get_complete_name ();
             ctx.select_font_face ("Helvetica", FontSlant.NORMAL, FontWeight.BOLD);
             ctx.set_font_size (14.0);
             ctx.text_extents (text, out extents);
-            ctx.move_to (width - margin - extents.width - extents.x_bearing, 
+            ctx.move_to (margin, 
                          y_level - extents.y_bearing + extents.height);
             ctx.show_text (text);
             y_level += extents.height + 5;
             
             /* Now write the date of the visit after that */
-            text = "Report of the visit of %s".printf (visit.date.format ("%F"));
+            text = _("Report of the visit of %s").printf (visit.date.format ("%F"));
             ctx.select_font_face ("Helvetica", FontSlant.NORMAL, FontWeight.NORMAL);
             ctx.set_font_size (11.0);
             ctx.text_extents (text, out extents);
-            ctx.move_to (width - margin - extents.width - extents.x_bearing,
+            ctx.move_to (margin,
                          y_level - extents.y_bearing + extents.height);
             ctx.show_text (text);
             y_level += extents.height + 50;
diff --git a/libclinica/VisitSchedulerDialog.vala b/libclinica/VisitSchedulerDialog.vala
new file mode 100644
index 0000000..6744770
--- /dev/null
+++ b/libclinica/VisitSchedulerDialog.vala
@@ -0,0 +1,105 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ *            Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>
+ */
+ 
+ using Gtk;
+ 
+ namespace Clinica {
+ 
+    public class VisitSchedulerDialog : Gtk.Dialog {
+    
+        public enum Response {
+            CANCEL,
+            SAVE,
+        }
+    
+        /**
+         * @brief ResourceManager associated with this clinica instance.
+         */
+        private ResourceManager resource_manager;
+        
+        /**
+         * @brief Builder used to get the content area.
+         */
+        private Clinica.Builder builder;
+    
+        public VisitSchedulerDialog (ResourceManager resources, Patient? patient) {
+            /* Setup the data passed as argument */
+            this.resource_manager = resources;
+            
+            /* Add Save and Cancel buttons */
+            add_buttons (Stock.CANCEL, Response.CANCEL, 
+                         Stock.SAVE,   Response.SAVE);
+                         
+            /* Set up the container */
+            builder = new Clinica.Builder.with_filename (resource_manager, "visit_scheduler.glade");
+            builder.load_into_dialog (this);
+            
+            /* Set up a title and connect a callback to change it when the user select another patient */
+            var p_entry = builder.get_object ("patient_entry") as PatientEntry;
+            p_entry.selection_changed.connect (on_patient_entry_changed);
+            if (patient != null)
+                p_entry.select_patient (patient);
+            else {
+                set_title (_("Patient not selected"));
+                set_response_sensitive (Response.SAVE, false);
+            }
+        }
+        
+        public void select_date (DateTime date) {
+            var date_picker = builder.get_object ("date_picker") as DateTimePicker;
+            date_picker.set_date (date);
+        }
+        
+        private void on_patient_entry_changed (PatientEntry entry) {    
+            if (entry.is_valid ()) {
+                set_title (_("Schedule a vist for the patient %s").printf (entry.get_patient ().get_complete_name ()));
+                set_response_sensitive (Response.SAVE, true);
+            }
+            else {
+                set_title (_("Patient not selected"));
+                set_response_sensitive (Response.SAVE, false);
+            }
+        }
+        
+        /**
+         * @brief Callback called when the user clicks SAVE or CANCEL
+         */
+        public new Response run () {
+            /* Get the widgets from the builder */
+            PatientEntry p_entry = builder.get_object ("patient_entry") as PatientEntry;
+            var picker = builder.get_object ("date_picker") as DateTimePicker;
+        
+            if (base.run () == Response.SAVE) {
+                /* Saving the new visit in the database */                
+                Visit visit = new Visit ();
+                visit.patient = p_entry.get_patient ();
+                visit.date = picker.get_datetime ();
+                
+                /* And finally save the visit in the database */
+                resource_manager.data_provider.save_visit (visit);
+            }
+            
+            return Response.CANCEL;
+        }
+    
+    }
+    
+    
+ }
diff --git a/libclinica/VisitTab.vala b/libclinica/VisitTab.vala
index 6b4313c..0c3b9a7 100644
--- a/libclinica/VisitTab.vala
+++ b/libclinica/VisitTab.vala
@@ -27,11 +27,11 @@ namespace Clinica {
 	 */
 	public class VisitTab : Alignment {
 	
-		public class TextMultiLine : VBox {
+		public class TextMultiLine : Box {
 		
 			private TextView view;
 			public TextMultiLine (string name) {
-				GLib.Object (homogeneous: false, spacing: 5);
+				GLib.Object (orientation: Orientation.VERTICAL, spacing: 5);
 				
 				/*  TextView to hold the content inserted by the user */
 				view = new TextView ();
@@ -102,7 +102,7 @@ namespace Clinica {
 		private Label label;
 		
 		/*  VBox holding the structure */
-		private VBox  main_vbox;
+		private Box  main_vbox;
 		
 		/* Entries holding the data of the visit */
 		private TextMultiLine anamnesis;
@@ -117,14 +117,20 @@ namespace Clinica {
 		/* Visit store of the application */
 		private VisitListStore store;
 		
+		/* VisitFileManager */
+		private VisitFileManager file_manager;
+		
 		/* SIGNALS */
 		public signal void saved();
 		public signal void deleted();
 		
 		private ResourceManager resource_manager;
+		
+		private VisitPage visit_page;
 	
-		public VisitTab (ResourceManager resources, Visit? v, Label title) {
+		public VisitTab (ResourceManager resources, VisitPage visit_page, Visit? v, Label title) {
 		    resource_manager = resources;
+		    this.visit_page = visit_page;
 			if (v != null) {
 				new_visit = false;
 				visit = v;
@@ -139,18 +145,28 @@ namespace Clinica {
 			label = title;
 				
 			/*  Add main VBox */
-			main_vbox = new VBox (false, 10);
+			main_vbox = new Box (Orientation.VERTICAL, 10);
+			
+			/* FileStore display */
+   			file_manager = new VisitFileManager (resource_manager, visit_page, visit);    	    
 			
 			/* Pack widgets into the table */
 			pack_widgets ();
 			
 			/*  Add VBox here */
 			var scroller = new ScrolledWindow (null, null);
+			
+			/* We can pack the file displayer on the right side
+			 * of the visit summary */
+			var box = new Box (Orientation.HORIZONTAL, resource_manager.PADDING);
+			box.pack_start (main_vbox, true, true);
+			
+			box.pack_start (file_manager, false, true);
 							
 			/*  Create an align to make the fields look good */					
 			var align = new Alignment (0.5F, 0.5F, 1, 1);
 			align.set_padding (5,5,5,5);
-			align.add (main_vbox);
+			align.add (box);
 			scroller.add_with_viewport (align);
 			add (scroller);
 			
@@ -160,27 +176,36 @@ namespace Clinica {
 				fill_data ();
 				
 		    /* Connect callbacks */
-		    store.visit_removed.connect (on_visit_list_store_visit_removed);
+		    resource_manager.data_provider.visit_removed.connect (on_visit_removed);
+		    
+		    if (resource_manager.data_provider.get_file_store () == null)
+		        file_manager.hide ();
+		        
+		    resource_manager.notify["data-provider"].connect (() => {
+		        debug ("Closing VisitTab since the provider has changed");
+		        resource_manager.user_interface.close_visit_window (visit.patient);
+		    });
 		}
 		
-		public VisitTab.with_patient (ResourceManager resources, Patient p, Label title) {
-			this (resources, null, title);
-			visit = new Visit (resource_manager, p);
+		public VisitTab.with_patient (ResourceManager resources, VisitPage page, Patient p, Label title) {
+			this (resources, page, null, title);
+			visit = new Visit ();
+			visit.patient = p;
 		}
 		
 		/**
 		 * @brief Get the visit id.
 		 */
-		public int get_visit_id () {
-		    return visit.get_id ();
+		public int64 get_visit_id () {
+		    return visit.id;
 		}
 		
 		/**
 		 * @brief Callback to the visit_removed event in the liststore.
 		 */
-		private void on_visit_list_store_visit_removed (int visit_id) {
+		private void on_visit_removed (int64 visit_id) {
 		    VisitBrowser parent = this.parent as VisitBrowser;
-		    if (visit_id == visit.get_id ())
+		    if (visit_id == visit.id)
 		        parent.remove_page (parent.page_num (this));
 		}
 		
@@ -225,13 +250,9 @@ namespace Clinica {
 			/* ..and then actually store that data in the database, changing
 			 * the label of the tab to reflect the change...              */
 			label.set_text (visit.date.format ("%F"));
-			visit.save ();
-			
-			if (new_visit)
-				store.add_visit (visit);
-			else
-				store.reload_visit (visit);
+			resource_manager.data_provider.save_visit (visit);
 			
+		    file_manager.update_visit (visit);
 			
 			/* Emit saved() signal */
 			saved();
@@ -242,11 +263,18 @@ namespace Clinica {
 		 * "Delete" in the tab
 		 */
 		public void delete_visit () {
-			store.remove_visit (visit);
-			visit.remove ();
+		    /* Ask before deleting a visit */
+		    var dialog = new MessageDialog (resource_manager.user_interface.window, DialogFlags.DESTROY_WITH_PARENT | DialogFlags.MODAL, 
+		                                    MessageType.QUESTION, ButtonsType.YES_NO, "%s", 
+		                                    _("Deleting a visit will cause all its data to be lost.\nDo you really want to continue?"));
+		    if (dialog.run () == ResponseType.YES) {
+			    resource_manager.data_provider.remove_visit (visit);
+			
+			    /* Emit deleted() signal */
+			    deleted();
+			}
 			
-			/* Emit deleted() signal */
-			deleted();
+			dialog.destroy ();
 		}
 		
 		/**
diff --git a/libclinica/VisitToolbar.vala b/libclinica/VisitToolbar.vala
index c48ad24..55304fc 100644
--- a/libclinica/VisitToolbar.vala
+++ b/libclinica/VisitToolbar.vala
@@ -25,7 +25,7 @@ namespace Clinica {
 	/**
 	 * @brief A toolbar for the VisitWindow window
 	 */
-	public class VisitToolbar : HBox {
+	public class VisitToolbar : Box {
 	
 		/* References to useful objects */
 		private Patient patient;
@@ -38,49 +38,52 @@ namespace Clinica {
 		/* Signals */
 		public signal void save_visit ();
 		public signal void save_visit_as_pdf ();
+		public signal void print_visit ();
 		public signal void delete_visit (); // set sensitive
 		
 		private ResourceManager resource_manager;
-		private VisitWindow	visit_window;
+		private VisitPage       visit_page;
 	
-		public VisitToolbar (ResourceManager resources, VisitWindow parent, Patient patient) {
+		public VisitToolbar (ResourceManager resources, VisitPage parent, Patient patient) {
 			/* Set default properties */
-			GLib.Object (homogeneous: false, spacing: 6);
+			GLib.Object (orientation: Orientation.HORIZONTAL, spacing: 6);
 		    	resource_manager = resources;
 			this.patient = patient;
-			visit_window = parent;
+			visit_page = parent;
 			
 			/* Get image of the patient */
-			var patient_image = new Gtk.Image.from_file (resource_manager.get_image_file ("patient.svg"));
+			var patient_image = new Gtk.Image.from_pixbuf (
+			    Utils.pixbuf_from_svg_resource (Config.RESOURCE_BASE + "ui/icons/patient.svg", 48, 48));
 			append (patient_image);
 						
 			/* A label to identify the patient, aligned to the left */
 			patient_label = new Label (null);
 			patient_label.set_alignment (0, 0.5F);
-			pack_start (patient_label, true, true, 0);
+			pack_start (patient_label, true, true, resource_manager.PADDING);
 			
-			/* Create a new visit action and connect the button for saving
+			/* Create a new visit action and connect the but4ton for saving
 			 * the visit and the one for changing the view mode */
 			visit_actions = new VisitActions (resource_manager);
 			visit_actions.delete_visit.connect ((va) => delete_visit ());
 			visit_actions.save_visit.connect ((va) => save_visit ());
 			visit_actions.save_as_pdf.connect ((va) => save_visit_as_pdf ());
+			visit_actions.print_visit.connect ((va) => print_visit ());
 			visit_actions.show_details.connect ((va) => on_show_details_button_clicked ());
-			append (visit_actions);
+			pack_start (visit_actions, false, true, resource_manager.PADDING);
 			
 			show_patient_details ();
 		}
 		
 		private void on_show_details_button_clicked () {
-		/*  Create the patient browser */
-	        var edit_patient_dialog = new PatientEditor.with_patient (resource_manager, patient);
-		edit_patient_dialog.dialog.set_transient_for (visit_window);
-	      	edit_patient_dialog.run ();
-        	edit_patient_dialog.destroy ();
+            /*  Create the patient browser */
+            var edit_patient_dialog = new PatientEditor.with_patient (resource_manager, patient);
+            edit_patient_dialog.set_transient_for (resource_manager.user_interface.window);
+            edit_patient_dialog.run ();
+            edit_patient_dialog.destroy ();
         	
         	/* Since the patient could have been modified we need to reload its data
         	 * in the labels */
-		show_patient_details ();
+            show_patient_details ();
 		}
 		
 		/**
@@ -90,8 +93,8 @@ namespace Clinica {
 			string doctor_name = _("This patient has not a doctor");
 			if (patient.doctor != null)
 			    doctor_name = patient.doctor.get_complete_name ();
-			patient_label.set_markup (_("Patient: <b>%s</b>\nDoctor: <b>%s</b>".printf(patient.get_complete_name (),
-				doctor_name)));
+			patient_label.set_markup ("%s: <b>%s</b>\n%s: <b>%s</b>".printf(_("Patient"), patient.get_complete_name (),
+				_("Doctor"), doctor_name));
 
 		}
 		
diff --git a/libclinica/WaitDialog.vala b/libclinica/WaitDialog.vala
new file mode 100644
index 0000000..b5a40da
--- /dev/null
+++ b/libclinica/WaitDialog.vala
@@ -0,0 +1,70 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+ 
+using Gtk;
+ 
+namespace Clinica {
+
+    public class WaitDialog : Dialog {
+    
+        private ResourceManager resource_manager;
+        
+        private Label label;
+        
+        private ProgressBar progress_bar;
+    
+        public WaitDialog (ResourceManager resources, string title) {
+            resource_manager = resources;
+            
+            var builder = new Clinica.Builder.with_filename (resources, "wait_dialog.glade");
+            builder.load_into_dialog (this);
+            
+            label = builder.get_object ("label") as Label;
+            progress_bar = builder.get_object ("progressbar") as ProgressBar;
+            
+            // Don't interact with the rest of the app while performing
+            // this operation. 
+            set_modal (true);
+            
+            // Don't allow to close the window
+            delete_event.connect ((event) => true);
+            
+            set_title (title);
+        }
+        
+        private void gtk_flush () {
+            // Flush remaining GTK events to make sure that this dialog 
+            // is shown to the user. 
+            while (Gtk.events_pending ())
+                Gtk.main_iteration_do (false);        
+        }
+        
+        public void set_message (string message) {
+            label.set_markup (message);
+            gtk_flush ();
+        }
+        
+        public void set_progress (double progress) {
+            progress_bar.set_fraction (progress);
+            gtk_flush ();
+        }
+    
+    }
+
+}
diff --git a/libclinica/wscript b/libclinica/wscript
deleted file mode 100644
index 2a182cb..0000000
--- a/libclinica/wscript
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env python
-#
-
-import os
-
-def build(bld):
-	bld.add_group ("libclinica")
-	prog = bld(features = 'c cshlib glib2', valaflags=[ "-g" ])
-	bld.set_group ("libclinica")
-
-	# Symbolic name used to reference this object
-	prog.name = 'clinica.shlib'
-
-	# Name of the resulting program
-	prog.target = 'clinica'
-	prog.vnum = "0.2.1"
-
-	# Load all vala files in the current directory
-	prog.source = filter (lambda source_file : (source_file.endswith(".vala") or source_file.endswith (".c")), 
-			      os.listdir ("libclinica"))
-
-	# prog.vapi_path = '.'
-	prog.gir = 'Clinica-0.2'
-	prog.includes = '.'
-
-	# libraries to link against
-	prog.uselib = 'GOBJECT PEAS GTK+ GEE SQLITE PEASGTK'
-
-	# Vala packages to use
-	prog.packages = 'gtk+-3.0 Peas-1.0 PeasGtk-1.0 sqlite3 gee-1.0 config posix'
-	prog.vapi = 'clinica-0.2'
-
-	# Extra vapi dirs
-	prog.vapi_dirs = '../vapi'
-
-	# Enable threading
-	prog.threading = True
-
-	# Create the typelib once the gir file has been generated
-	bld (rule = '${G_IR_COMPILER} --shared-library=libclinica.so --output=${TGT} ${SRC}',
-	     source = 'Clinica-0.2.gir',
-	     target = 'Clinica-0.2.typelib',
-	     install_path = '${PREFIX}/lib/girepository-1.0')
-
-	# Install the schema file
-	bld.install_files ('${PREFIX}/share/glib-2.0/schemas',
-			   '../org.phcteam.clinica.gschema.xml')
-	bld.add_post_fun (compile_schemas)
-
-def compile_schemas (bld):	
-	# If this is the install compile the schema
-	if bld.options.destdir != '':
-		destdir = bld.options.destdir
-	else:
-		destdir = '/'
-	if bld.is_install:
-		command = '%s %s/glib-2.0/schemas' % (
-				bld.env['GLIB_COMPILE_SCHEMAS'],
-				os.path.join (destdir, bld.env['DATADIR'][1:]))
-		bld.exec_command (command)
-	    
-
-
diff --git a/org.phcteam.clinica.gschema.xml b/org.phcteam.clinica.gschema.xml
deleted file mode 100644
index d30a3b0..0000000
--- a/org.phcteam.clinica.gschema.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schemalist>
-  <schema id="org.phcteam.clinica" path="/org/phcteam/clinica/" gettext-domain="clinica">
-    <key type="b" name="use-plugins">
-      <default>true</default>
-      <summary>Enable plugins loading in Clinica</summary>
-      <description>Setting this to true will load plugins in Clinica on startup. Otherwise they will not be available.</description>
-    </key>
-    <key name="active-plugins" type="as">
-      <default>["CodiceFiscale"]</default>
-      <summary>Active plugins</summary>
-      <description>A list of string with the name of the active plugins in Clinica</description>
-    </key>
-    <key name="medicine-search-engine" type="s">
-      <default>""</default>
-      <summary>Selected medicine search engine</summary>
-      <description>The name of the search engine that the user wants to lookup medicines.</description>
-    </key>
-  </schema>
-</schemalist>
diff --git a/plugins/AgenziaDelFarmaco.plugin b/plugins/AgenziaDelFarmaco.plugin
index 267e9bc..364eab2 100644
--- a/plugins/AgenziaDelFarmaco.plugin
+++ b/plugins/AgenziaDelFarmaco.plugin
@@ -2,8 +2,8 @@
 Loader=python
 Module=AgenziaDelFarmaco
 IAge=3
-Name=Search for medicine on agenziadelfarmaco.it
-Description=Search for medical products on the italian "Agenzia del Farmaco"
+Name=Agenzia del Farmaco
+Description=Search for medical products on the italian database of agenziadelfarmaco.it
 Authors=Leonardo Robol
 Copyright=2011 Leonardo Robol
 Website=
diff --git a/plugins/AgenziaDelFarmaco.py b/plugins/AgenziaDelFarmaco.py
index 4a079fe..b78c8d6 100755
--- a/plugins/AgenziaDelFarmaco.py
+++ b/plugins/AgenziaDelFarmaco.py
@@ -31,12 +31,11 @@ class MedicalSuppliesSearchEngine (GObject.Object, Clinica.UserInterfaceActivata
 
     def do_get_name (self):
         return "Agenzia del Farmaco"
-	
+
     def do_activate(self):
 	# Register as a valid search engine
         self.resource_manager.register_medicine_search_engine (self)
 
-
     def do_deactivate(self):
         # Unregister the engine
         self.resource_manager.unregister_medicine_search_engine (self)
@@ -164,13 +163,13 @@ class AgenziaDelFarmacoSearchEngine ():
             
         # Create other notes property
         other_notes_elements = [
-            u"<b>Forma farmaceutica:</b> %s" % results[7],
-            u"<b>Regime di fornitura:</b> %s" % results[8],
-            u"<b>Classe di rimborsabilità:</b> %s" % results[9],
-            u"<b>Ditta:</b> %s" % results[13]
+            u"<b>" + _("Dosage form") + ":</b> %s" % results[7],
+            u"<b>" + _("System of supply") + ":</b> %s" % results[8],
+            u"<b>" + _("Class of eligibility") + ":</b> %s" % results[9],
+            u"<b>" + _("Firm") + ":</b> %s" % results[13]
         ]
         
-        # Add AIFA not if not empty
+        # Add AIFA note if not empty
         if (results[10].strip() != ""):
             other_notes_elements.append (u"<b>Nota AIFA:</b> %s" % results[10])
             
diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt
new file mode 100644
index 0000000..ca796c4
--- /dev/null
+++ b/plugins/CMakeLists.txt
@@ -0,0 +1,42 @@
+IF(NOT WINDOWS_BUILD)
+
+set (PLUGINS_DIR
+	lib/clinica/plugins
+)
+
+# 
+# Plugins for Codice Fiscale
+#
+vala_precompile (CODICE_FISCALE_C libcodicefiscale-vala
+		CodiceFiscale.vala
+	PACKAGES
+		${CLINICA_USED_PACKAGES} clinica
+	OPTIONS
+		${CLINICA_VALAFLAGS}
+		--vapidir=${CMAKE_BINARY_DIR}/libclinica
+)
+
+add_library (CodiceFiscale SHARED ${CODICE_FISCALE_C})
+add_definitions (${CLINICA_USED_CFLAGS})
+target_link_libraries (CodiceFiscale clinica ${CLINICA_USED_LIBRARIES})
+
+install (TARGETS
+	CodiceFiscale
+	LIBRARY DESTINATION ${PLUGINS_DIR}
+)
+
+install (FILES
+	CodiceFiscale.plugin
+	DESTINATION ${PLUGINS_DIR}
+)
+
+#
+# Plugins for browsing medicines on Agenzia del Farmaco
+#
+
+install (FILES
+	AgenziaDelFarmaco.py AgenziaDelFarmaco.plugin
+	DESTINATION ${PLUGINS_DIR}
+)
+
+ENDIF(NOT WINDOWS_BUILD)
diff --git a/plugins/ClinicaAndroid.plugin b/plugins/ClinicaAndroid.plugin
new file mode 100644
index 0000000..863825c
--- /dev/null
+++ b/plugins/ClinicaAndroid.plugin
@@ -0,0 +1,6 @@
+[Plugin]
+Module = ClinicaAndroid
+Loader = python
+Name = Clinica for Android
+Description = Server to sync Android phones with Clinica
+Author = Leonardo Robol
diff --git a/plugins/ClinicaAndroid.py b/plugins/ClinicaAndroid.py
new file mode 100755
index 0000000..1c9cb31
--- /dev/null
+++ b/plugins/ClinicaAndroid.py
@@ -0,0 +1,130 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import SocketServer, md5, threading, os
+from gi.repository import Clinica, GObject, Gtk, PeasGtk, Gio
+from socket import gethostname
+
+authenticated_clients = []
+
+class ClinicaAndroid (GObject.GObject, Clinica.UserInterfaceActivatable, PeasGtk.Configurable):
+
+    resource_manager = GObject.property (type = Clinica.ResourceManager)
+    user_interface = GObject.property (type = Clinica.UserInterface)
+
+    __gtype_name__ = "ClinicaAndroid"
+
+    server = None
+
+    def __init__(self):
+        GObject.GObject.__init__(self)
+
+    def do_activate (self):
+        self.clinica_db = os.path.join (self.resource_manager.get_data_path (), 
+                                        "clinica.db")
+
+        self.server = ClinicaServer (self.clinica_db)
+        self.server_thread = threading.Thread (target = self.server.serve_forever)
+        self.server_thread.start ()
+
+        self.tcpserver = ClinicaTCPServer (self.clinica_db)
+        self.tcpserver_thread = threading.Thread (target = self.tcpserver.serve_forever)
+        self.tcpserver_thread.start ()
+
+    def do_deactivate (self):
+        self.server.shutdown ()
+        self.server_thread.join ()
+        self.tcpserver.shutdown ()
+        self.tcpserver_thread.join ()
+
+    def do_create_configure_widget (self):
+        settings = Gio.Settings.new ("org.phcteam.clinica")
+        box = Gtk.Box.new (Gtk.Orientation.HORIZONTAL, 6)
+        
+        label = Gtk.Label ("Password")
+        entry = Gtk.Entry ()
+
+        box.pack_start (label, 6, False, True)
+        box.pack_start (entry, 6, True,  True)
+
+        settings.bind ("password", entry, "text", Gio.SettingsBindFlags.DEFAULT)
+
+        return box
+
+    def on_name_entry_changed (self, entry):
+        self.server.set_name (entry.get_text ())
+        
+    def do_update_state (self):
+        pass
+        
+
+class ClinicaRequestHandler (SocketServer.BaseRequestHandler):
+    
+    def handle (self):
+        password = self.server.settings.get_value ("password").get_string ()
+        
+        data = self.request[0].strip ()
+        socket = self.request[1]
+
+        if data == "GetInfo":
+            socket.sendto ("ServerName: %s\n" % self.server.name, self.client_address)
+
+        elif data.startswith ("Authenticate:"):
+            pw = data.split(":")[1].strip ()
+            
+            if self.client_address[0] in authenticated_clients:
+                socket.sendto ("Authentication performed\n", self.client_address)
+            else:
+                if password == pw:
+                    authenticated_clients.append (self.client_address[0])
+                    socket.sendto ("Authentication performed\n", self.client_address)
+                else:
+                    socket.sendto ("Authentication failed\n", self.client_address)
+
+        elif data == "GetDB":
+            if self.client_address[0] in authenticated_clients:
+                try:
+                    with open (self.server.db_path) as h : db_content = h.read ()
+                    socket.sendto (db_content, self.client_address)
+                except Exception, e:
+                    socket.sendto ("Sending DB failed : %s" % e, self.client_address)
+            else:
+                socket.sendto ("Autenticati, scemo\n", self.client_address)
+
+class ClinicaTCPRequestHandler (SocketServer.BaseRequestHandler):
+
+    def handle (self):
+        data = self.request.recv(1024).strip()
+        if data == "GetDB":
+            if self.client_address[0] in authenticated_clients:
+                with open (self.server.db_path) as h : db_content = h.read ()
+                self.request.sendall (db_content)
+        
+
+class ClinicaTCPServer (SocketServer.ThreadingTCPServer):
+
+    allow_reuse_address = True
+
+    def __init__(self, db_path, port = 20802):
+        SocketServer.ThreadingTCPServer.__init__(self, ('', port), ClinicaTCPRequestHandler)
+        
+        self.db_path = db_path
+        self.name = gethostname()
+
+class ClinicaServer (SocketServer.ThreadingUDPServer):
+
+    allow_reuse_address = True
+
+    def __init__ (self, db_path, port = 20801):
+        SocketServer.ThreadingUDPServer.__init__ (self, ('', port), ClinicaRequestHandler)
+        self.db_path = db_path
+        self.name = gethostname()
+        self.settings = Gio.Settings.new ("org.phcteam.clinica")
+
+
+if __name__ == "__main__":
+
+    udp_server = ClinicaServer ("Ciao")
+    tcp_server = ClinicaTCPServer ("Ciao")
+
+    server.serve_forever ()
diff --git a/plugins/CodiceFiscale.vala b/plugins/CodiceFiscale.vala
index 03e8df4..38b1e4d 100644
--- a/plugins/CodiceFiscale.vala
+++ b/plugins/CodiceFiscale.vala
@@ -74,7 +74,7 @@ namespace Clinica {
             
             if (!correct) {
                 Utils.set_alert_state (patient_editor.identification_code_entry, true);
-                patient_editor.save_button.set_sensitive (false);
+                patient_editor.set_response_sensitive (PatientEditor.Response.SAVE, false);
             }
             else {
                 Utils.set_alert_state (patient_editor.identification_code_entry, false);
diff --git a/plugins/wscript b/plugins/wscript
deleted file mode 100644
index c27e603..0000000
--- a/plugins/wscript
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env python
-#
-
-plugins_install_path = "${PREFIX}/lib/clinica/plugins"
-
-def build (ctx):
-    ctx.set_group ("clinica")
-
-    # Plugin CodiceFiscale
-    cf = ctx (features = "c cshlib")
-    cf.name = "codice_fiscale.cshlib"
-    
-    cf.target = 'CodiceFiscale'
-    cf.source = 'CodiceFiscale.vala'
-    cf.use = 'clinica'
-    cf.includes = [ '.', '../libclinica' ]
-
-    cf.uselib = 'PEAS PEASGTK GEE GTK'
-
-    # Vala packages to use
-    cf.packages = 'gtk+-3.0 Peas-1.0 PeasGtk-1.0 sqlite3 gee-1.0 config clinica'
-
-    # Extra vapi dirs
-    cf.vapi_dirs = [ '../vapi', '../libclinica' ]
-    cf.install_path = plugins_install_path
-    ctx.install_files (plugins_install_path, "CodiceFiscale.plugin")
-
-    # Plugin AgenziaDelFarmaco
-    ctx.install_files (plugins_install_path, [ "AgenziaDelFarmaco.py",
-                                               "AgenziaDelFarmaco.plugin" ])
-    
-    # Push plugins on the build directory so we can run
-    # clinica in the local dir
-    for plugin in ['AgenziaDelFarmaco.plugin', 'CodiceFiscale.plugin', 'AgenziaDelFarmaco.py' ]:
-        push_plugin (ctx, plugin)
-    
-    
-def push_plugin (ctx, plugin_file):    
-    # Install plugins file in the _build_ directory so clinica can
-    # run from a local build
-    ctx (rule = 'cp ${SRC} ../_build_/plugins/${SRC[0].name}',
-         source = plugin_file)
-
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
new file mode 100644
index 0000000..0bc6f25
--- /dev/null
+++ b/po/CMakeLists.txt
@@ -0,0 +1,4 @@
+include(Translations)
+add_translations_directory("clinica")
+add_translations_catalog("clinica" ../libclinica ../clinica ../plugins)
+
diff --git a/po/LINGUAS b/po/LINGUAS
index 525d439..b23d1af 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1,7 +1,13 @@
 # please keep this list sorted alphabetically
 #
-
-it
-tr
+cs
+de
+el
 es
+id
+it
+ja
+pl
+pt_BR
 sr
+tr
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 44ec483..e0dd6b5 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,67 +1,114 @@
 [encoding: UTF-8]
-libclinica/FindEntry.vala
-libclinica/Doctor.vala
-libclinica/VisitListStore.vala
-libclinica/UserInterface.vala
-libclinica/PatientEditorExtensionSet.c
-libclinica/PatientListPage.vala
-libclinica/MedicineSearchEngine.vala
-libclinica/DateHandler.vala
-libclinica/PatientListView.vala
-libclinica/Utils.vala
-libclinica/StartPage.vala
-libclinica/MedicineTreeView.vala
-libclinica/Patient.vala
-libclinica/PluginEngine.vala
-libclinica/PatientEditor.vala
-libclinica/CalendarToolbar.vala
-libclinica/VisitWindow.vala
-libclinica/PatientDetail.vala
-libclinica/PatientListStore.vala
-libclinica/PatientEntry.vala
-libclinica/DoctorContextMenu.vala
-libclinica/PatientContextMenu.vala
-libclinica/Event.vala
-libclinica/MedicineDetailDialog.vala
-libclinica/VisitBrowser.vala
-libclinica/SettingsManager.vala
-libclinica/DoctorListStore.vala
-libclinica/CalendarEventList.vala
-libclinica/Medicine.vala
-libclinica/VisitToolbar.vala
-libclinica/UserInterfaceExtensionSet.c
-libclinica/VisitActions.vala
-libclinica/EventEditor.vala
-libclinica/DateSwitcher.vala
-libclinica/DoctorListView.vala
-libclinica/VisitTab.vala
-libclinica/Calendar.vala
-libclinica/PluginManager.vala
-libclinica/DoctorFilteredStore.vala
-libclinica/Day.vala
-libclinica/PatientFilteredStore.vala
-libclinica/Visit.vala
-libclinica/CalendarWindow.vala
-libclinica/VisitPrinter.vala
-libclinica/EventListStore.vala
-libclinica/SqlDataType.vala
-libclinica/PatientEditorActivatable.vala
-libclinica/DoctorEditor.vala
-libclinica/ResourceManager.vala
-libclinica/AboutDialog.vala
-libclinica/CalendarView.vala
-libclinica/DoctorListPage.vala
-libclinica/Settings.vala
-libclinica/MedicineSearchPage.vala
-libclinica/UserInterfaceActivatable.vala
-libclinica/CalendarHeader.vala
-libclinica/Page.vala
-clinica/Clinica.vala
-ui/new_button.glade
-ui/window.glade
-ui/doctor_list_sidebar.glade
-ui/doctor_list_toolbar.glade
-ui/patient_editor.glade
-ui/patient_list_sidebar.glade
-ui/doctor_editor.glade
-ui/patient_list_toolbar.glade
\ No newline at end of file
+./clinica/Clinica.vala
+./plugins/DrugLocalDb.py
+./plugins/ClinicaAndroid.py
+./plugins/CodiceFiscale.vala
+./plugins/AgenziaDelFarmaco.py
+./build-obs/download-mingw-rpm.py
+./libclinica/DoctorEditor.vala
+./libclinica/PatientsScope.vala
+./libclinica/PatientLens.vala
+./libclinica/PatientListView.vala
+./libclinica/VisitPage.vala
+./libclinica/CoreActivatable.vala
+./libclinica/PluginManager.vala
+./libclinica/CalendarToolbar.vala
+./libclinica/VisitSchedulerDialog.vala
+./libclinica/WaitDialog.vala
+./libclinica/AuthDomain.vala
+./libclinica/FileStore.vala
+./libclinica/Application.vala
+./libclinica/PluginEngine.vala
+./libclinica/Medicine.vala
+./libclinica/UserInterfaceActivatable.vala
+./libclinica/VisitBrowser.vala
+./libclinica/Page.vala
+./libclinica/SidebarPageEntry.vala
+./libclinica/VisitDetail.vala
+./libclinica/Settings.vala
+./libclinica/CalendarView.vala
+./libclinica/PatientDetail.vala
+./libclinica/DoctorContextMenu.vala
+./libclinica/CalendarHeader.vala
+./libclinica/MedicineEditor.vala
+./libclinica/CalendarWindow.vala
+./libclinica/VisitTab.vala
+./libclinica/MedicineTreeView.vala
+./libclinica/PatientListPage.vala
+./libclinica/DataServer.vala
+./libclinica/Builder.vala
+./libclinica/LocalFileStore.vala
+./libclinica/NetworkedDataProvider.vala
+./libclinica/Calendar.vala
+./libclinica/PatientEditorActivatable.vala
+./libclinica/PatientEditor.vala
+./libclinica/SqliteDoctorIterator.vala
+./libclinica/SqlitePatientIterator.vala
+./libclinica/AuthenticationDialog.vala
+./libclinica/Doctor.vala
+./libclinica/Toolbar.vala
+./libclinica/EventIterator.vala
+./libclinica/CalendarEventList.vala
+./libclinica/Service.vala
+./libclinica/ImportDialog.vala
+./libclinica/PatientContextMenu.vala
+./libclinica/UIManager.vala
+./libclinica/BackupEngine.vala
+./libclinica/PatientListStore.vala
+./libclinica/FileObject.vala
+./libclinica/Utils.vala
+./libclinica/LocalMedicinesDatabase.vala
+./libclinica/EmptyVisitIterator.vala
+./libclinica/EventEditor.vala
+./libclinica/VisitListStore.vala
+./libclinica/MedicineSearchPage.vala
+./libclinica/SqliteDataProvider.vala
+./libclinica/Buildable.vala
+./libclinica/SettingsManager.vala
+./libclinica/PatientFilteredStore.vala
+./libclinica/VisitActions.vala
+./libclinica/SqliteVisitIterator.vala
+./libclinica/VisitToolbar.vala
+./libclinica/DateTimePicker.vala
+./libclinica/DoctorFilteredStore.vala
+./libclinica/DoctorListStore.vala
+./libclinica/DateHandler.vala
+./libclinica/DateSwitcher.vala
+./libclinica/Day.vala
+./libclinica/DoctorListView.vala
+./libclinica/UserInterface.vala
+./libclinica/EventDetail.vala
+./libclinica/MedicineSearchEngine.vala
+./libclinica/Sidebar.vala
+./libclinica/Event.vala
+./libclinica/SidebarEntry.vala
+./libclinica/StartPage.vala
+./libclinica/EventListStore.vala
+./libclinica/Patient.vala
+./libclinica/Visit.vala
+./libclinica/DoctorListPage.vala
+./libclinica/ResourceManager.vala
+./libclinica/AboutDialog.vala
+./libclinica/ToolbarItem.vala
+./libclinica/VisitPrinter.vala
+./libclinica/VisitFileManager.vala
+./libclinica/SidebarCalendarEntry.vala
+./libclinica/FindEntry.vala
+./libclinica/MedicineDetailDialog.vala
+./libclinica/FileDetail.vala
+./libclinica/DataProvider.vala
+./libclinica/PatientEntry.vala
+./data/download-mingw-rpm.py
+./data/resources/ui/start_page.glade
+./data/resources/ui/authentication_dialog.glade
+./data/resources/ui/medicine_editor.glade
+./data/resources/ui/import_dialog.glade
+./data/resources/ui/doctor_editor.glade
+./data/resources/ui/wait_dialog.glade
+./data/resources/ui/doctor_list_toolbar.glade
+./data/resources/ui/settings_window.glade
+./data/resources/ui/patient_list_sidebar.glade
+./data/resources/ui/doctor_list_sidebar.glade
+./data/resources/ui/patient_list_toolbar.glade
+./data/resources/ui/patient_editor.glade
+./data/resources/ui/visit_scheduler.glade
diff --git a/po/clinica.pot b/po/clinica.pot
index 996fc52..50ff354 100644
--- a/po/clinica.pot
+++ b/po/clinica.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-12-19 07:28+0100\n"
+"POT-Creation-Date: 2013-04-18 10:23+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,634 +17,1300 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: ../libclinica/Doctor.vala:110
+#: .././plugins/AgenziaDelFarmaco.py:166
+msgid "Dosage form"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:167
+msgid "System of supply"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:168
+msgid "Class of eligibility"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:169
+msgid "Firm"
+msgstr ""
+
+#. Title of edit doctor dialog
+#: .././libclinica/DoctorEditor.vala:88
+#, c-format
+msgid "Edit doctor named %s"
+msgstr ""
+
+#: .././libclinica/PatientLens.vala:37
+msgid "Search for patients"
+msgstr ""
+
+#: .././libclinica/PatientLens.vala:43
+msgid "Recently visited patients"
+msgstr ""
+
+#. Create the SidebarEntry
+#: .././libclinica/PatientLens.vala:47 .././libclinica/PatientListPage.vala:64
+#: .././libclinica/PatientListPage.vala:110
+msgid "Patients"
+msgstr ""
+
+#: .././libclinica/PatientListView.vala:76
+#: .././libclinica/DoctorListView.vala:51
+#: .././data/resources/ui/doctor_editor.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:17
+#: .././data/resources/ui/patient_editor.glade.h:2
+msgid "Name"
+msgstr ""
+
+#. ...and then the surname column
+#: .././libclinica/PatientListView.vala:80
+#: .././libclinica/DoctorListView.vala:56
+#: .././data/resources/ui/doctor_editor.glade.h:3
+#: .././data/resources/ui/patient_editor.glade.h:3
+msgid "Surname"
+msgstr ""
+
+#: .././libclinica/PatientListView.vala:165
+msgid "Select a patient to delete it!"
+msgstr ""
+
+#: .././libclinica/PatientListView.vala:172
 msgid ""
-"You cannot delete a doctor with associated patients. Delete his patients "
-"first."
+"Really delete this patient? All information about him/her and the associated "
+"visits will be lost."
 msgstr ""
 
-#: ../libclinica/VisitListStore.vala:103
+#. Set title according to the patient that we have loaded and connect
+#. * show startup signal to the focusing of the first field in the visit
+#: .././libclinica/VisitPage.vala:63
+#, c-format
+msgid "Visit of the patient %s"
+msgstr ""
+
+#: .././libclinica/PluginManager.vala:35
+msgid ""
+"Clinica is extensible via plugins and you can easily enable\n"
+" and disable them using this window."
+msgstr ""
+
+#: .././libclinica/VisitSchedulerDialog.vala:60
+#: .././libclinica/VisitSchedulerDialog.vala:76
+msgid "Patient not selected"
+msgstr ""
+
+#: .././libclinica/VisitSchedulerDialog.vala:72
+#, c-format
+msgid "Schedule a vist for the patient %s"
+msgstr ""
+
+#: .././libclinica/Application.vala:113
+#, c-format
+msgid "Option parsing failed: %s\n"
+msgstr ""
+
+#: .././libclinica/Application.vala:148
+#, c-format
+msgid "Clinica %s\n"
+msgstr ""
+
+#. Then add add a new visit and keep a reference to new_page
+#. *  to focus it on page loading.
+#. Create a new one and connect it
+#: .././libclinica/VisitBrowser.vala:73 .././libclinica/VisitBrowser.vala:252
+msgid "New visit"
+msgstr ""
+
+#: .././libclinica/VisitBrowser.vala:152 .././libclinica/VisitBrowser.vala:209
+msgid ""
+"A visit need to be saved in order to be exported as PDF.\n"
+"Do you want to save the visit now?"
+msgstr ""
+
+#: .././libclinica/VisitBrowser.vala:196
+msgid "Error while delivering the print operation"
+msgstr ""
+
+#: .././libclinica/VisitDetail.vala:70
+msgid "Edit visit"
+msgstr ""
+
+#: .././libclinica/VisitDetail.vala:80 .././libclinica/EventDetail.vala:75
+msgid "Delete event"
+msgstr ""
+
+#: .././libclinica/VisitDetail.vala:104
+msgid "Show details"
+msgstr ""
+
+#: .././libclinica/VisitDetail.vala:125 .././libclinica/VisitTab.vala:269
+msgid ""
+"Deleting a visit will cause all its data to be lost.\n"
+"Do you really want to continue?"
+msgstr ""
+
+#. Create menu items, connect them to their callback
+#. * and add it to the menu
+#: .././libclinica/DoctorContextMenu.vala:58
+#: .././libclinica/PatientContextMenu.vala:54
+msgid "Delete"
+msgstr ""
+
+#. Instantiate menu items
+#: .././libclinica/DoctorContextMenu.vala:59
+#: .././libclinica/PatientContextMenu.vala:51
+#: .././libclinica/EventDetail.vala:111
+msgid "Edit"
+msgstr ""
+
+#: .././libclinica/MedicineEditor.vala:41
+msgid "Create a new Medicine"
+msgstr ""
+
+#: .././libclinica/CalendarWindow.vala:36
+msgid "Clinica calendar"
+msgstr ""
+
+#. Anamnesis
+#: .././libclinica/VisitTab.vala:286 .././libclinica/VisitPrinter.vala:107
+msgid "Anamnesis"
+msgstr ""
+
+#. Physical examination
+#: .././libclinica/VisitTab.vala:289 .././libclinica/VisitPrinter.vala:112
+msgid "Physical examination"
+msgstr ""
+
+#. Laboratory Exam
+#: .././libclinica/VisitTab.vala:292 .././libclinica/VisitPrinter.vala:117
+msgid "Laboratory exam"
+msgstr ""
+
+#: .././libclinica/VisitTab.vala:295
+msgid "Hystopathology"
+msgstr ""
+
+#. Diagnosis
+#: .././libclinica/VisitTab.vala:298 .././libclinica/VisitPrinter.vala:127
+msgid "Diagnosis"
+msgstr ""
+
+#. Topical therapy
+#: .././libclinica/VisitTab.vala:301 .././libclinica/VisitPrinter.vala:132
+msgid "Topical therapy"
+msgstr ""
+
+#. Systemic therapy
+#: .././libclinica/VisitTab.vala:304 .././libclinica/VisitPrinter.vala:137
+msgid "Systemic therapy"
+msgstr ""
+
+#. Subsequent checks
+#: .././libclinica/VisitTab.vala:307 .././libclinica/VisitPrinter.vala:142
+msgid "Subsequent checks"
+msgstr ""
+
+#: .././libclinica/MedicineTreeView.vala:37
+msgid "Medicine name"
+msgstr ""
+
+#: .././libclinica/MedicineTreeView.vala:40
+#: .././libclinica/MedicineDetailDialog.vala:75
+msgid "Price"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:81 .././libclinica/StartPage.vala:211
+msgid "Add a new patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:87
+msgid "Remove the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:93
+msgid "Modify the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:99
+msgid "Edit visits of the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:105
+msgid "Schedule a visit with the selected patient"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:417
+#, c-format
+msgid "Trying to removing doctor with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:440
+#, c-format
+msgid "Trying to removing patient with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:463
+#, c-format
+msgid "Trying to removing visit with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:486
+#, c-format
+msgid "Trying to removing event with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/Builder.vala:45
+#, c-format
+msgid ""
+"Failed to load UI file: %s. Please check your installation.\n"
+"%s"
+msgstr ""
+
+#: .././libclinica/LocalFileStore.vala:62
+#, c-format
+msgid "Unable to setup file monitors for the filestore folder: %s"
+msgstr ""
+
+#: .././libclinica/LocalFileStore.vala:106
+#, c-format
+msgid "Unable to setup a file monitor on directory %s"
+msgstr ""
+
+#: .././libclinica/LocalFileStore.vala:141
+#, c-format
+msgid "Error while listing the files for the visit identified by id %d"
+msgstr ""
+
+#: .././libclinica/LocalFileStore.vala:167
+msgid "Destination file already exists"
+msgstr ""
+
+#: .././libclinica/LocalFileStore.vala:172
+#, c-format
+msgid "Error while adding the file %s to the selected visit"
+msgstr ""
+
+#: .././libclinica/NetworkedDataProvider.vala:246
+msgid ""
+"You canceled the authentication process on the remote server.\n"
+"From now on Clinica will use the local database. If you want to connect to\n"
+"remote server please re-enable networking in the settings dialog."
+msgstr ""
+
+#. Set title to edit patient * instead of create new patient
+#: .././libclinica/PatientEditor.vala:304
+#, c-format
+msgid "Edit patient named %s"
+msgstr ""
+
+#: .././libclinica/PatientEditor.vala:408
+msgid "You must select a doctor for this patient."
+msgstr ""
+
+#: .././libclinica/PatientEditor.vala:409
+msgid ""
+"If you need to create a new one type his name in the entry and select Create "
+"new doctor from the completion list."
+msgstr ""
+
+#: .././libclinica/PatientEditor.vala:445
+msgid "Date inserted is invalid, aborting patient editing"
+msgstr ""
+
+#: .././libclinica/AuthenticationDialog.vala:40
+msgid "Authentication required"
+msgstr ""
+
+#. Start of events
+#: .././libclinica/CalendarEventList.vala:73
+msgid "Events scheduled"
+msgstr ""
+
+#: .././libclinica/CalendarEventList.vala:92
+msgid ""
+"No events on this day.\n"
+"You can create a new event\n"
+"by clicking on the top-left button."
+msgstr ""
+
+#: .././libclinica/CalendarEventList.vala:103
+msgid "Visits performed"
+msgstr ""
+
+#: .././libclinica/CalendarEventList.vala:105
+msgid "Visits scheduled"
+msgstr ""
+
+#: .././libclinica/CalendarEventList.vala:126
+msgid "No visits performed on this day"
+msgstr ""
+
+#: .././libclinica/ImportDialog.vala:40
+msgid "Import data from backup file"
+msgstr ""
+
+#: .././libclinica/PatientContextMenu.vala:57
+msgid "Edit visits"
+msgstr ""
+
+#. File menu
+#: .././libclinica/UIManager.vala:44
+msgid "_File"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:45
+msgid "New _patient"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:46
+msgid "Create a new patient"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:47
+msgid "New _doctor"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:48
+msgid "Create a new doctor"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:49
+msgid "_Quit"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:50
+msgid "Quit clinica"
+msgstr ""
+
+#. View menu
+#: .././libclinica/UIManager.vala:53
+msgid "_View"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:54
+msgid "_Start page"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:55
+msgid "Go to the start page of clinica"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:56
+msgid "_Patients"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:57
+msgid "Go to the list of patients"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:58
+msgid "_Doctors"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:59
+msgid "Go to the list of doctors"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:60
+msgid "_Search medicines"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:61
+msgid "Search medicines online"
+msgstr ""
+
+#. Tools menu
+#: .././libclinica/UIManager.vala:64
+msgid "_Tools"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:65
+msgid "_Settings"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:66
+msgid "Customize clinica behaviour"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:67
+msgid "Backup"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:68
+msgid "Backup clinica data to file"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:69
+msgid "Import"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:70
+msgid "Import data from backup files"
+msgstr ""
+
+#. Help menu
+#: .././libclinica/UIManager.vala:73
+msgid "_Help"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:74
+msgid "_Contents"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:75
+msgid "Open the help system"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:76
+msgid "_Report a bug"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:77
+msgid "Report a bug online"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:78
+msgid "_About"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:79
+msgid "Get to know the development team of Clinica"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:113
+msgid "Please select a valid backup file"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:125
+msgid "Importing data"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:126
+msgid "Please wait while Clinica imports the data..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:129
+msgid "Importing the JSON data.."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:137
+msgid "Error while parsing the backup JSON data"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:143 .././libclinica/BackupEngine.vala:170
+msgid "An error occurred while parsing the JSON file"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:165
+msgid ""
+"The doctors, patients, visits and events field in the JSON backup should be "
+"arrays, aborting."
+msgstr ""
+
+#. Clear the database and put the data back in it
+#. in such a way that won't break relationships.
+#: .././libclinica/BackupEngine.vala:188
+msgid "Clearing the old data in the database..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:192
+msgid "Loading doctors..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:201
+#, c-format
+msgid "- %d doctors have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:203
+msgid "Loading patients..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:216
+#, c-format
+msgid "- %d patients have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:218
+msgid "Loading visits..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:231
+#, c-format
+msgid "- %d visits have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:233
+msgid "Loading events..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:249
+#, c-format
+msgid "- %d events have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:258
+msgid "- A FileStore was found but is not available in the current provider\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:283
+#, c-format
+msgid "- %d files have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:287
+msgid "- No FileStore was found in the backup\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:298
+msgid "The import of the data has been completed successfully"
+msgstr ""
+
+#: .././libclinica/PatientListStore.vala:128
+#: .././libclinica/PatientListStore.vala:150
+msgid ""
+"Patients database seems corrupted. This is likely to be a bug in the "
+"application"
+msgstr ""
+
+#. Print the error message to stdout
+#: .././libclinica/Utils.vala:79
+msgid "ERROR => "
+msgstr ""
+
+#: .././libclinica/Utils.vala:83 .././libclinica/Utils.vala:84
+msgid "Clinica encountered an error"
+msgstr ""
+
+#: .././libclinica/LocalMedicinesDatabase.vala:90
+#, c-format
+msgid "Medicine with id = %lld not found in DB: %s"
+msgstr ""
+
+#: .././libclinica/LocalMedicinesDatabase.vala:119
+#, c-format
+msgid "Error inserting medicine in the database: %s"
+msgstr ""
+
+#: .././libclinica/EventEditor.vala:93
+msgid "Create a new event"
+msgstr ""
+
+#: .././libclinica/EventEditor.vala:97
+#, c-format
+msgid "Editing event: %s"
+msgstr ""
+
+#. Create the entry for title of the event and venue
+#: .././libclinica/EventEditor.vala:115
+msgid "Title"
+msgstr ""
+
+#: .././libclinica/EventEditor.vala:116
+msgid "Venue"
+msgstr ""
+
+#: .././libclinica/EventEditor.vala:151
+msgid "Time:"
+msgstr ""
+
+#: .././libclinica/EventEditor.vala:167
+msgid "Insert the description here..."
+msgstr ""
+
+#: .././libclinica/EventEditor.vala:205 .././libclinica/VisitToolbar.vala:96
+#, c-format
+msgid "Patient"
+msgstr ""
+
+#: .././libclinica/EventEditor.vala:264
+msgid "Visit"
+msgstr ""
+
+#: .././libclinica/VisitListStore.vala:99
 msgid ""
 "Visit database seems corrupted. This is likely to be a bug in the application"
 msgstr ""
 
-#: ../libclinica/UserInterface.vala:282
+#: .././libclinica/MedicineSearchPage.vala:76
+#: .././data/resources/ui/start_page.glade.h:5
+msgid "Search medicines"
+msgstr ""
+
+#: .././libclinica/MedicineSearchPage.vala:100
+msgid "No search engine available"
+msgstr ""
+
+#: .././libclinica/MedicineSearchPage.vala:108
 #, c-format
-msgid "Cannot open the help: %s"
+msgid "Searching for %s..."
 msgstr ""
 
-#: ../libclinica/PatientListPage.vala:74
-msgid "Patients"
+#: .././libclinica/MedicineSearchPage.vala:133
+msgid "Medicines"
 msgstr ""
 
-#: ../libclinica/PatientListView.vala:76
-#: ../libclinica/MedicineTreeView.vala:18 ../libclinica/DoctorListView.vala:51
-#: ../ui/patient_editor.glade.h:10 ../ui/doctor_editor.glade.h:4
-msgid "Name"
+#: .././libclinica/MedicineSearchPage.vala:96
+msgid "It's not possible to perform a search for medicine"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:143
+#, c-format
+msgid "Error creating some configuration files, check permission on %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:151
+#, c-format
+msgid "Error reading some configuration files, check permission on %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:170
+#, c-format
+msgid "Failure while settings new database version to %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:173
+msgid "Failure while upgrading database"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:177
+msgid "Version of the database is not compatible"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:199
+msgid ""
+"This is a version of Clinica newer than the one that created the\n"
+"patients database installed on the system.\n"
+"Using this version requires upgrading the database, and\n"
+"<b>the old version will not be able to use it anymore</b>.\n"
+"Do you wish to perform this one-time upgrade?\n"
 msgstr ""
 
-#. ...and then the surname column
-#: ../libclinica/PatientListView.vala:80 ../libclinica/DoctorListView.vala:56
-#: ../ui/patient_editor.glade.h:13 ../ui/doctor_editor.glade.h:6
-msgid "Surname"
+#: .././libclinica/SqliteDataProvider.vala:200
+msgid "Upgrade database"
 msgstr ""
 
-#: ../libclinica/PatientListView.vala:174
-msgid "Select a patient to delete it!"
+#: .././libclinica/SqliteDataProvider.vala:225
+msgid "Database needs to be moved"
 msgstr ""
 
-#: ../libclinica/PatientListView.vala:181
+#: .././libclinica/SqliteDataProvider.vala:226
 msgid ""
-"Really delete this patient? All information about him/her and the associated "
-"visits will be lost."
+"An older version of clinica has been detected and the old database has to be "
+"moved\n"
+"to a new location to continue.\n"
+"<b>The older version of clinica won't work anymore with this setup</b>.\n"
+"Do you still want to continue?"
 msgstr ""
 
-#. Print the error message to stdout
-#: ../libclinica/Utils.vala:79
-msgid "ERROR => "
+#: .././libclinica/SqliteDataProvider.vala:239
+msgid ""
+"Error while transferring the database to the new default location for "
+"clinica >= 0.2.9"
 msgstr ""
 
-#: ../libclinica/Utils.vala:83 ../libclinica/Utils.vala:84
-msgid "Clinica encountered an error"
+#: .././libclinica/SqliteDataProvider.vala:251
+msgid "Error upgrading database, please check your installation"
 msgstr ""
 
-#: ../libclinica/StartPage.vala:198
+#: .././libclinica/SqliteDataProvider.vala:266
+#, c-format
 msgid ""
-"Add a new patient \n"
-" with name "
+"Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %s"
 msgstr ""
 
-#: ../libclinica/StartPage.vala:204
-msgid "Add a new patient"
+#: .././libclinica/SqliteDataProvider.vala:359
+#, c-format
+msgid "Error while retrieving the doctor with id = %s"
 msgstr ""
 
-#: ../libclinica/MedicineTreeView.vala:21
-#: ../libclinica/MedicineDetailDialog.vala:56
-msgid "Price"
+#: .././libclinica/SqliteDataProvider.vala:399
+#, c-format
+msgid "An error occurred while saving the doctor with id %d: %s"
 msgstr ""
 
-#: ../libclinica/PatientEditor.vala:102
-msgid "Error loading patient_editor.glade."
+#: .././libclinica/SqliteDataProvider.vala:468
+#, c-format
+msgid "Error while retrieving the patient with id = %s"
 msgstr ""
 
-#. Set title to edit patient * instead of create new patient
-#: ../libclinica/PatientEditor.vala:307
+#: .././libclinica/SqliteDataProvider.vala:517
+#: .././libclinica/SqliteDataProvider.vala:652
 #, c-format
-msgid "Edit patient named %s"
+msgid "An error occurred while saving the doctor with id %s: %s"
 msgstr ""
 
-#: ../libclinica/PatientEditor.vala:411
-msgid "You must select a doctor for this patient."
+#: .././libclinica/SqliteDataProvider.vala:597
+#, c-format
+msgid "Error while retrieving the visit with id = %s"
 msgstr ""
 
-#: ../libclinica/PatientEditor.vala:412
-msgid ""
-"If you need to create a new one type his name in the entry and select Create "
-"new doctor from the completion list."
+#: .././libclinica/SqliteDataProvider.vala:686
+#, c-format
+msgid "Error while retrieving the event with id = %d"
 msgstr ""
 
-#: ../libclinica/PatientEditor.vala:446
-msgid "Date inserted is invalid, aborting patient editing"
+#: .././libclinica/SqliteDataProvider.vala:728
+#, c-format
+msgid "An error occurred while saving the event with id %s: %s"
 msgstr ""
 
-#. Set title according to the patient that we have loaded and connect
-#. * show startup signal to the focusing of the first field in the visit
-#: ../libclinica/VisitWindow.vala:62
-#, c-format
-msgid "Visits of the patient %s"
+#: .././libclinica/SettingsManager.vala:40
+msgid "Clinica settings"
 msgstr ""
 
-#: ../libclinica/PatientListStore.vala:86
-#: ../libclinica/PatientListStore.vala:132
-msgid ""
-"Patients database seems corrupted. This is likely to be a bug in the "
-"application"
+#: .././libclinica/SettingsManager.vala:52
+msgid "Clinica has been built without plugins support"
 msgstr ""
 
-#. Create menu items, connect them to their callback
-#. * and add it to the menu
-#: ../libclinica/DoctorContextMenu.vala:58
-#: ../libclinica/PatientContextMenu.vala:54
-msgid "Delete"
+#: .././libclinica/SettingsManager.vala:135
+msgid "Please use the Network tab to enable the Networked data provider"
 msgstr ""
 
-#. Instantiate menu items
-#: ../libclinica/DoctorContextMenu.vala:59
-#: ../libclinica/PatientContextMenu.vala:51
-msgid "Edit"
+#: .././libclinica/SettingsManager.vala:136
+msgid "Use the Network tab"
 msgstr ""
 
-#: ../libclinica/PatientContextMenu.vala:57
-msgid "Edit visits"
+#: .././libclinica/SettingsManager.vala:166
+msgid "Disconnect"
 msgstr ""
 
-#. Create the object and add the close button used
-#. * to dismiss the dialog
-#: ../libclinica/MedicineDetailDialog.vala:27
-msgid "Close"
+#: .././libclinica/SettingsManager.vala:166
+msgid "Connect"
 msgstr ""
 
-#: ../libclinica/MedicineDetailDialog.vala:46
-msgid "General information"
+#: .././libclinica/SettingsManager.vala:191
+#, c-format
+msgid "Connection to the given host failed. Please check your settings."
 msgstr ""
 
-#. And now the content for the others fields of the medicine
-#: ../libclinica/MedicineDetailDialog.vala:52
-msgid "Identification Code"
+#: .././libclinica/SettingsManager.vala:192
+msgid "Connection failed"
 msgstr ""
 
-#: ../libclinica/MedicineDetailDialog.vala:53
-msgid "Description"
+#: .././libclinica/SettingsManager.vala:206
+#: .././libclinica/ResourceManager.vala:284
+#, c-format
+msgid "Username or password are wrong. Disconnecting from the server."
 msgstr ""
 
-#: ../libclinica/MedicineDetailDialog.vala:54
-msgid "Active ingredient"
+#: .././libclinica/SettingsManager.vala:207
+msgid "Wrong authentication data has been provided"
 msgstr ""
 
-#: ../libclinica/MedicineDetailDialog.vala:55
-msgid "Storage reccomendations"
+#: .././libclinica/VisitActions.vala:60
+msgid "Edit details of patient"
 msgstr ""
 
-#: ../libclinica/MedicineDetailDialog.vala:64
-msgid "Additional notes"
+#: .././libclinica/VisitActions.vala:67
+msgid "Remove this visit"
 msgstr ""
 
-#: ../libclinica/MedicineDetailDialog.vala:90
-#: ../libclinica/VisitPrinter.vala:168
-msgid "Field empty"
+#: .././libclinica/VisitActions.vala:74
+msgid "Export this visit as PDF"
 msgstr ""
 
-#. First add a new visit and keep a reference to new_page
-#. *  to focus it on page loading.
-#. Create a new one and connect it
-#: ../libclinica/VisitBrowser.vala:62 ../libclinica/VisitBrowser.vala:184
-msgid "New visit"
+#: .././libclinica/VisitActions.vala:81
+msgid "Print a report of this visit"
 msgstr ""
 
-#: ../libclinica/VisitBrowser.vala:141
-msgid ""
-"A visit need to be saved in order to be exported as PDF.\n"
-"Do you want to save the visit now?"
+#: .././libclinica/VisitActions.vala:88
+msgid "Save this visit"
 msgstr ""
 
-#: ../libclinica/SettingsManager.vala:44
-msgid "Clinica settings"
+#: .././libclinica/VisitActions.vala:99
+msgid "Close the visits of this patient"
 msgstr ""
 
-#. Create the use-plugins checkbox
-#: ../libclinica/SettingsManager.vala:56
-msgid "Use plugins (need restart)"
+#: .././libclinica/VisitToolbar.vala:93
+msgid "This patient has not a doctor"
 msgstr ""
 
-#: ../libclinica/SettingsManager.vala:71
-msgid "General"
+#: .././libclinica/VisitToolbar.vala:97
+msgid "Doctor"
 msgstr ""
 
-#: ../libclinica/SettingsManager.vala:75
-msgid "Plugins"
+#: .././libclinica/DateTimePicker.vala:56
+msgid "Hour"
 msgstr ""
 
-#: ../libclinica/SettingsManager.vala:113
-msgid ""
-"Select the search engine\n"
-"used to find medicines"
+#: .././libclinica/DateTimePicker.vala:58
+msgid "Minute"
 msgstr ""
 
-#: ../libclinica/DoctorListStore.vala:73
+#: .././libclinica/DoctorListStore.vala:75
 msgid "Doctors database seems corrupted."
 msgstr ""
 
-#. Start of events
-#: ../libclinica/CalendarEventList.vala:70
-msgid "Events scheduled"
+#: .././libclinica/DoctorListView.vala:175
+msgid "Select a doctor to delete it!"
 msgstr ""
 
-#: ../libclinica/CalendarEventList.vala:89
+#: .././libclinica/DoctorListView.vala:186
 msgid ""
-"No events on this day.\n"
-"You can create a new event\n"
-"by clicking on the top-left button."
+"The doctor that you have selected for removal has some patients "
+"associated. \n"
 msgstr ""
 
-#: ../libclinica/CalendarEventList.vala:95
-msgid "Visits performed"
+#: .././libclinica/DoctorListView.vala:187
+msgid ""
+"It's not possible to remove it without disassociating all his patients.\n"
+"\n"
 msgstr ""
 
-#: ../libclinica/CalendarEventList.vala:115
-msgid "No visits performed on this day"
+#: .././libclinica/DoctorListView.vala:188
+#: .././libclinica/DoctorListView.vala:217
+msgid "Do you really want to proceed?"
 msgstr ""
 
-#: ../libclinica/VisitToolbar.vala:90
-msgid "This patient has not a doctor"
+#: .././libclinica/DoctorListView.vala:189
+msgid "Doctor has associated patients"
 msgstr ""
 
-#: ../libclinica/VisitToolbar.vala:93
-#, c-format
+#: .././libclinica/DoctorListView.vala:215
 msgid ""
-"Patient: <b>%s</b>\n"
-"Doctor: <b>%s</b>"
+"The following patients will be disassociated from this doctor by this "
+"action:\n"
 msgstr ""
 
-#. Show more details on this patient
-#: ../libclinica/VisitActions.vala:61
-msgid "Edit patient details"
+#: .././libclinica/DoctorListView.vala:218
+msgid "Confirm disassociation of patients"
 msgstr ""
 
-#. Save the visit as a PDF file
-#: ../libclinica/VisitActions.vala:71
-msgid "Save as PDF"
+#: .././libclinica/DoctorListView.vala:235
+msgid "Really delete this doctor? All information about him/her will be lost."
 msgstr ""
 
-#: ../libclinica/EventEditor.vala:93
-msgid "Create a new event"
+#. Ask the user where he would like to backup its files.
+#: .././libclinica/UserInterface.vala:360
+msgid "Select the folder where the data should be saved"
 msgstr ""
 
-#: ../libclinica/EventEditor.vala:97
+#. In this string %s refers to the path where the backup has been performed.
+#: .././libclinica/UserInterface.vala:386
 #, c-format
-msgid "Editing event: %s"
+msgid "Backup completed successfully in the folder %s"
 msgstr ""
 
-#. Create the entry for title of the event and venue
-#: ../libclinica/EventEditor.vala:114
-msgid "Title"
+#: .././libclinica/UserInterface.vala:387
+msgid "Backup completed"
 msgstr ""
 
-#: ../libclinica/EventEditor.vala:115
-msgid "Venue"
+#: .././libclinica/UserInterface.vala:389
+msgid ""
+"Please take care of copying the folder in a safe place for future restore of "
+"the data."
 msgstr ""
 
-#: ../libclinica/EventEditor.vala:144
-msgid "Time:"
+#: .././libclinica/UserInterface.vala:416
+#, c-format
+msgid "Cannot open the help: %s"
 msgstr ""
 
-#: ../libclinica/EventEditor.vala:160
-msgid "Insert the description here..."
+#: .././libclinica/UserInterface.vala:441
+msgid ""
+"An error occurred while opening the bug system. Please go to\n"
+"http://launchpad.net/clinica-project/ to file a bug"
 msgstr ""
 
-#: ../libclinica/EventEditor.vala:198
-msgid "Patient"
+#: .././libclinica/EventDetail.vala:65
+msgid "Edit event"
 msgstr ""
 
-#: ../libclinica/EventEditor.vala:255
-msgid "Visit"
+#: .././libclinica/EventDetail.vala:112
+msgid "Remove"
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:175
-msgid "Select a doctor to delete it!"
+#: .././libclinica/EventDetail.vala:145
+msgid "Really delete this event?"
+msgstr ""
+
+#: .././libclinica/Sidebar.vala:68
+msgid "Pages"
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:186
+#: .././libclinica/StartPage.vala:93
+msgid "Dashboard"
+msgstr ""
+
+#: .././libclinica/StartPage.vala:205
 msgid ""
-"The doctor that you have selected for removal has some patients "
-"associated. \n"
+"Add a new patient \n"
+" with name "
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:187
+#: .././libclinica/EventListStore.vala:121
 msgid ""
-"It's not possible to remove it without removing all his patients.\n"
-"\n"
+"Events database seems corrupted. This is likely to be a bug in the "
+"application"
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:188 ../libclinica/DoctorListView.vala:221
-msgid "Do you really want to proceed?"
+#: .././libclinica/DoctorListPage.vala:60
+#: .././libclinica/DoctorListPage.vala:93
+msgid "Doctors"
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:189
-msgid "Doctor has associated patients"
+#: .././libclinica/DoctorListPage.vala:76
+msgid "Add a doctor"
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:219
-msgid "The following patients will be deleted by this action:\n"
+#: .././libclinica/DoctorListPage.vala:82
+msgid "Edit the selected doctor"
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:222
-msgid "Confirm deletion of patients"
+#: .././libclinica/DoctorListPage.vala:88
+msgid "Remove the selected doctor"
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:244
-msgid "Really delete this doctor? All information about him/her will be lost."
+#: .././libclinica/ResourceManager.vala:285
+msgid "Error while authenticating on the server"
 msgstr ""
 
-#. Anamnesis
-#: ../libclinica/VisitTab.vala:258 ../libclinica/VisitPrinter.vala:68
-msgid "Anamnesis"
+#: .././libclinica/AboutDialog.vala:41
+msgid "Medical records manager"
 msgstr ""
 
-#. Physical examination
-#: ../libclinica/VisitTab.vala:261 ../libclinica/VisitPrinter.vala:71
-msgid "Physical examination"
+#: .././libclinica/AboutDialog.vala:43
+msgid "About Clinica"
 msgstr ""
 
-#. Laboratory Exam
-#: ../libclinica/VisitTab.vala:264 ../libclinica/VisitPrinter.vala:74
-msgid "Laboratory exam"
+#: .././libclinica/AboutDialog.vala:52
+msgid "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
 msgstr ""
 
-#: ../libclinica/VisitTab.vala:267
-msgid "Hystopathology"
+#: .././libclinica/AboutDialog.vala:53
+msgid "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
 msgstr ""
 
-#. Diagnosis
-#: ../libclinica/VisitTab.vala:270 ../libclinica/VisitPrinter.vala:80
-msgid "Diagnosis"
+#. Histopathology
+#: .././libclinica/VisitPrinter.vala:122
+msgid "Histopathology"
 msgstr ""
 
-#. Topical therapy
-#: ../libclinica/VisitTab.vala:273 ../libclinica/VisitPrinter.vala:83
-msgid "Topical therapy"
+#. Now write the date of the visit after that
+#: .././libclinica/VisitPrinter.vala:285
+#, c-format
+msgid "Report of the visit of %s"
 msgstr ""
 
-#. Systemic therapy
-#: ../libclinica/VisitTab.vala:276 ../libclinica/VisitPrinter.vala:86
-msgid "Systemic therapy"
+#: .././libclinica/VisitPrinter.vala:316
+#: .././libclinica/MedicineDetailDialog.vala:109
+msgid "Field empty"
 msgstr ""
 
-#. Subsequent checks
-#: ../libclinica/VisitTab.vala:279 ../libclinica/VisitPrinter.vala:89
-msgid "Subsequent checks"
+#. Add a Attach button
+#: .././libclinica/VisitFileManager.vala:89
+msgid "Attach file"
 msgstr ""
 
-#: ../libclinica/PluginManager.vala:35
-msgid ""
-"Clinica is extensible via plugins and you can easily enable\n"
-" and disable them using this window."
+#: .././libclinica/VisitFileManager.vala:97
+msgid "Browse files"
 msgstr ""
 
-#: ../libclinica/CalendarWindow.vala:36
-msgid "Clinica calendar"
+#: .././libclinica/VisitFileManager.vala:113
+msgid "Select a file to attach"
 msgstr ""
 
-#. Histopathology
-#: ../libclinica/VisitPrinter.vala:77
-msgid "Histopathology"
+#: .././libclinica/VisitFileManager.vala:133
+msgid "Unable to open the browser on the filestore position"
 msgstr ""
 
-#: ../libclinica/EventListStore.vala:93
+#: .././libclinica/VisitFileManager.vala:163
 msgid ""
-"Events database seems corrupted. This is likely to be a bug in the "
-"application"
+"Save the visit\n"
+" to attach files"
 msgstr ""
 
-#. Set title of edit doctor dialog, space is important!
-#: ../libclinica/DoctorEditor.vala:91
-#, c-format
-msgid "Edit doctor named %s"
+#: .././libclinica/VisitFileManager.vala:170
+msgid "Attach files"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:184
-#, c-format
-msgid "Error creating some configuration files, check permission on %s"
+#: .././libclinica/SidebarCalendarEntry.vala:30
+msgid "Calendar"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:192
-#, c-format
-msgid "Error reading some configuration files, check permission on %s"
+#. Create the object and add the close button used
+#. * to dismiss the dialog
+#: .././libclinica/MedicineDetailDialog.vala:46
+msgid "Close"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:211
-#, c-format
-msgid "Failure while settings new database version to %s"
+#: .././libclinica/MedicineDetailDialog.vala:65
+msgid "General information"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:214
-msgid "Failure while upgrading database"
+#. And now the content for the others fields of the medicine
+#: .././libclinica/MedicineDetailDialog.vala:71
+msgid "Identification Code"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:218
-msgid "Version of the database is not compatible"
+#: .././libclinica/MedicineDetailDialog.vala:72
+msgid "Description"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:293
-msgid ""
-"This is a version of Clinica newer than the one that created the\n"
-"patients database installed on the system.\n"
-"Using this version requires upgrading the database, and\n"
-"<b>the old version will not be able to use it anymore</b>.\n"
-"Do you wish to perform this one-time upgrade?\n"
+#: .././libclinica/MedicineDetailDialog.vala:73
+msgid "Active ingredient"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:294
-msgid "Upgrade database"
+#: .././libclinica/MedicineDetailDialog.vala:74
+msgid "Storage reccomendations"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:375
-msgid "Error upgrading database, please check your installation"
+#: .././libclinica/MedicineDetailDialog.vala:83
+msgid "Additional notes"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:390
+#. Nothing to do for now.
+#: .././libclinica/FileDetail.vala:89
 #, c-format
-msgid ""
-"Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %d"
+msgid "Error while loading icon for file %s: %s"
 msgstr ""
 
-#: ../libclinica/AboutDialog.vala:40
-msgid "Medical records manager"
+#: .././libclinica/FileDetail.vala:98
+msgid "Open file"
 msgstr ""
 
-#: ../libclinica/AboutDialog.vala:42
-msgid "About Clinica"
+#: .././libclinica/FileDetail.vala:110
+msgid "Delete file"
 msgstr ""
 
-#: ../libclinica/AboutDialog.vala:51
-msgid "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+#: .././libclinica/FileDetail.vala:122
+#, c-format
+msgid ""
+"Do you really want to delete the file %s?\n"
+"If you proceed it will be definitively lost."
 msgstr ""
 
-#: ../libclinica/AboutDialog.vala:52
-msgid "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+#: .././libclinica/FileDetail.vala:135
+#, c-format
+msgid "Error while opening the file %s"
 msgstr ""
 
-#. Start of LAUNCHPAD contributions. Each one is indented
-#. * of two spaces
-#: ../libclinica/AboutDialog.vala:56
-msgid ""
-"\n"
-"Launchpad contributions: \n"
+#: .././data/resources/ui/start_page.glade.h:1
+msgid "Browse the patients to start a visit"
 msgstr ""
 
-#: ../libclinica/DoctorListPage.vala:70
-msgid "Doctors"
+#: .././data/resources/ui/start_page.glade.h:2
+msgid "Add new patient"
 msgstr ""
 
-#. And the button to go back
-#: ../libclinica/MedicineSearchPage.vala:42
-#: ../libclinica/MedicineSearchPage.vala:72
-msgid "Back"
+#: .././data/resources/ui/start_page.glade.h:3
+msgid "Patient list"
 msgstr ""
 
-#: ../libclinica/MedicineSearchPage.vala:94
-msgid "No search engine available"
+#: .././data/resources/ui/start_page.glade.h:4
+msgid "Doctor list"
 msgstr ""
 
-#: ../libclinica/MedicineSearchPage.vala:102
-#, c-format
-msgid "Searching for %s..."
+#: .././data/resources/ui/start_page.glade.h:6
+msgid "Open calendar"
 msgstr ""
 
-#: ../libclinica/MedicineSearchPage.vala:104
-msgid "Stop"
+#: .././data/resources/ui/authentication_dialog.glade.h:1
+msgid "The server requires authentication. Please insert your credentials:"
 msgstr ""
 
-#: ../libclinica/MedicineSearchPage.vala:127
-msgid "Medicine search"
+#: .././data/resources/ui/authentication_dialog.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:11
+msgid "Username"
 msgstr ""
 
-#: ../libclinica/MedicineSearchPage.vala:90
-msgid "It's not possible to perform a search for medicine"
+#: .././data/resources/ui/authentication_dialog.glade.h:3
+#: .././data/resources/ui/settings_window.glade.h:12
+msgid "Password"
 msgstr ""
 
-#: ../clinica/Clinica.vala:57
-#, c-format
-msgid "Clinica %s\n"
+#: .././data/resources/ui/medicine_editor.glade.h:1
+msgid "Name:"
 msgstr ""
 
-#: ../ui/new_button.glade.h:1
-msgid "Add new patient"
+#: .././data/resources/ui/medicine_editor.glade.h:2
+msgid "Description:"
 msgstr ""
 
-#: ../ui/new_button.glade.h:2
-msgid "Browse the patients to start a visit"
+#: .././data/resources/ui/medicine_editor.glade.h:3
+msgid "Active ingredient:"
 msgstr ""
 
-#: ../ui/new_button.glade.h:3
-msgid "Doctor list"
+#: .././data/resources/ui/medicine_editor.glade.h:4
+msgid "Storage reccomendations:"
 msgstr ""
 
-#: ../ui/new_button.glade.h:4
-msgid "Open calendar"
+#: .././data/resources/ui/medicine_editor.glade.h:5
+msgid "Price:"
 msgstr ""
 
-#: ../ui/new_button.glade.h:5
-msgid "Patient list"
+#: .././data/resources/ui/medicine_editor.glade.h:6
+msgid "Other notes:"
 msgstr ""
 
-#: ../ui/new_button.glade.h:6
-msgid "Search medicines"
+#: .././data/resources/ui/import_dialog.glade.h:1
+msgid "Source:\t"
 msgstr ""
 
-#: ../ui/window.glade.h:1
-msgid "Clinica"
+#: .././data/resources/ui/import_dialog.glade.h:2
+msgid "Select the backup folder"
 msgstr ""
 
-#: ../ui/window.glade.h:2
-msgid "New Doctor"
+#: .././data/resources/ui/import_dialog.glade.h:3
+msgid ""
+"<b>Warning:</b> Please note that the current data in the database <b>will be "
+"definitely lost</b>. Consider performing a backup of the current data before "
+"importing the old one."
 msgstr ""
 
-#: ../ui/window.glade.h:3
-msgid "New Patient"
+#: .././data/resources/ui/doctor_editor.glade.h:1
+#: .././data/resources/ui/patient_editor.glade.h:12
+msgid "Doctor:"
 msgstr ""
 
-#: ../ui/window.glade.h:4
-msgid "_About"
+#: .././data/resources/ui/doctor_editor.glade.h:4
+#: .././data/resources/ui/patient_editor.glade.h:11
+msgid "Phone:"
 msgstr ""
 
-#: ../ui/window.glade.h:5
-msgid "_Contents"
+#: .././data/resources/ui/doctor_editor.glade.h:5
+msgid "Mobile:"
 msgstr ""
 
-#: ../ui/window.glade.h:6
-msgid "_Doctors"
+#: .././data/resources/ui/wait_dialog.glade.h:1
+msgid "label"
 msgstr ""
 
-#: ../ui/window.glade.h:7
-msgid "_File"
+#: .././data/resources/ui/settings_window.glade.h:1
+msgid "Use plugins (restart required)"
 msgstr ""
 
-#: ../ui/window.glade.h:8
-msgid "_Help"
+#: .././data/resources/ui/settings_window.glade.h:2
+msgid "Allow to browse files in visits"
 msgstr ""
 
-#: ../ui/window.glade.h:9
-msgid "_Home"
+#: .././data/resources/ui/settings_window.glade.h:3
+msgid "Medicines search engine"
 msgstr ""
 
-#: ../ui/window.glade.h:10
-msgid "_Patients"
+#: .././data/resources/ui/settings_window.glade.h:4
+msgid "Data source"
 msgstr ""
 
-#: ../ui/window.glade.h:11
-msgid "_Quit"
+#: .././data/resources/ui/settings_window.glade.h:5
+msgid "General"
 msgstr ""
 
-#: ../ui/window.glade.h:12
-msgid "_Search medicines"
+#: .././data/resources/ui/settings_window.glade.h:6
+msgid "Host"
 msgstr ""
 
-#: ../ui/window.glade.h:13
-msgid "_Settings"
+#: .././data/resources/ui/settings_window.glade.h:7
+msgid "Port"
 msgstr ""
 
-#: ../ui/window.glade.h:14
-msgid "_Tools"
+#: .././data/resources/ui/settings_window.glade.h:8
+msgid "button"
 msgstr ""
 
-#: ../ui/window.glade.h:15
-msgid "_View"
+#: .././data/resources/ui/settings_window.glade.h:9
+msgid "Connection to a remote Clinica instance"
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:1
-msgid "/"
+#: .././data/resources/ui/settings_window.glade.h:10
+msgid "Allow connections of other clinica from the LAN"
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:2
-msgid "Address:"
+#: .././data/resources/ui/settings_window.glade.h:13
+msgid "Built-in server"
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:3
-msgid "Codice fiscale:"
+#: .././data/resources/ui/settings_window.glade.h:14
+msgid "Network"
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:4
-msgid "Create a new patient"
+#: .././data/resources/ui/settings_window.glade.h:15
+msgid ""
+"The details that are inserted here will be used when generating\n"
+"the automatic visit reports. "
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:5
-msgid "Date of birth:"
+#: .././data/resources/ui/settings_window.glade.h:18
+msgid "Address"
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:6 ../ui/doctor_editor.glade.h:2
-msgid "Doctor:"
+#: .././data/resources/ui/settings_window.glade.h:19
+msgid "Institution"
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:7
-msgid "Female"
+#: .././data/resources/ui/settings_window.glade.h:20
+msgid "Email"
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:8
-msgid "Gender:"
+#: .././data/resources/ui/settings_window.glade.h:21
+msgid "Personal details"
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:9
-msgid "Male"
+#: .././data/resources/ui/settings_window.glade.h:22
+msgid "Plugins"
+msgstr ""
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:1
+msgid "Visits"
+msgstr ""
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:2
+msgid "Schedule a visit"
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:11
+#: .././data/resources/ui/patient_editor.glade.h:1
 msgid "Patient:"
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:12 ../ui/doctor_editor.glade.h:5
-msgid "Phone:"
+#: .././data/resources/ui/patient_editor.glade.h:4
+msgid "Gender:"
+msgstr ""
+
+#: .././data/resources/ui/patient_editor.glade.h:5
+msgid "Date of birth:"
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:14
+#: .././data/resources/ui/patient_editor.glade.h:6
 msgid "dd"
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:15
+#: .././data/resources/ui/patient_editor.glade.h:7
+msgid "/"
+msgstr ""
+
+#: .././data/resources/ui/patient_editor.glade.h:8
 msgid "mm"
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:16
+#: .././data/resources/ui/patient_editor.glade.h:9
 msgid "yyyy"
 msgstr ""
 
-#: ../ui/patient_list_sidebar.glade.h:1
-msgid "Visits"
+#: .././data/resources/ui/patient_editor.glade.h:10
+msgid "Address:"
 msgstr ""
 
-#: ../ui/doctor_editor.glade.h:1
-msgid "Create a new doctor"
+#: .././data/resources/ui/patient_editor.glade.h:13
+msgid "Codice fiscale:"
 msgstr ""
 
-#: ../ui/doctor_editor.glade.h:3
-msgid "Mobile:"
+#: .././data/resources/ui/patient_editor.glade.h:14
+msgid "Male"
+msgstr ""
+
+#: .././data/resources/ui/patient_editor.glade.h:15
+msgid "Female"
+msgstr ""
+
+#: .././data/resources/ui/visit_scheduler.glade.h:1
+msgid "Select the date on which you'd like to schedule the visit."
+msgstr ""
+
+#: .././data/resources/ui/visit_scheduler.glade.h:2
+msgid "Selected patient"
+msgstr ""
+
+#: .././data/resources/ui/visit_scheduler.glade.h:3
+msgid ""
+"<b>Tip:</b> Once created this visit will be visible in the visit editor of "
+"this patient."
 msgstr ""
diff --git a/po/cs.po b/po/cs.po
new file mode 100644
index 0000000..68be99d
--- /dev/null
+++ b/po/cs.po
@@ -0,0 +1,1394 @@
+# Czech translation for clinica-project
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the clinica-project package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: clinica-project\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-04-18 10:23+0200\n"
+"PO-Revision-Date: 2012-05-12 13:19+0000\n"
+"Last-Translator: Jakub Šnapka <snapka at seznam.cz>\n"
+"Language-Team: Czech <cs at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-05-18 05:44+0000\n"
+"X-Generator: Launchpad (build 16626)\n"
+"Language: cs\n"
+
+#: .././plugins/AgenziaDelFarmaco.py:166
+msgid "Dosage form"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:167
+msgid "System of supply"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:168
+msgid "Class of eligibility"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:169
+msgid "Firm"
+msgstr ""
+
+#. Title of edit doctor dialog
+#: .././libclinica/DoctorEditor.vala:88
+#, c-format
+msgid "Edit doctor named %s"
+msgstr "Upravit doktora %s"
+
+#: .././libclinica/PatientLens.vala:37
+msgid "Search for patients"
+msgstr "Hledat pacienta"
+
+#: .././libclinica/PatientLens.vala:43
+msgid "Recently visited patients"
+msgstr "Naposledy navštívení pacienti"
+
+#. Create the SidebarEntry
+#: .././libclinica/PatientLens.vala:47 .././libclinica/PatientListPage.vala:64
+#: .././libclinica/PatientListPage.vala:110
+msgid "Patients"
+msgstr "Pacienti"
+
+#: .././libclinica/PatientListView.vala:76
+#: .././libclinica/DoctorListView.vala:51
+#: .././data/resources/ui/doctor_editor.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:17
+#: .././data/resources/ui/patient_editor.glade.h:2
+msgid "Name"
+msgstr "Jméno"
+
+#. ...and then the surname column
+#: .././libclinica/PatientListView.vala:80
+#: .././libclinica/DoctorListView.vala:56
+#: .././data/resources/ui/doctor_editor.glade.h:3
+#: .././data/resources/ui/patient_editor.glade.h:3
+msgid "Surname"
+msgstr "Příjmení"
+
+#: .././libclinica/PatientListView.vala:165
+msgid "Select a patient to delete it!"
+msgstr "Vyberte pacienta k vymazání"
+
+#: .././libclinica/PatientListView.vala:172
+msgid ""
+"Really delete this patient? All information about him/her and the associated "
+"visits will be lost."
+msgstr ""
+"Opravdu vymazata tohoto pacienta? Všechny informace s ním spojené budou "
+"smazány."
+
+#. Set title according to the patient that we have loaded and connect
+#. * show startup signal to the focusing of the first field in the visit
+#: .././libclinica/VisitPage.vala:63
+#, c-format
+msgid "Visit of the patient %s"
+msgstr ""
+
+#: .././libclinica/PluginManager.vala:35
+msgid ""
+"Clinica is extensible via plugins and you can easily enable\n"
+" and disable them using this window."
+msgstr ""
+"Clinica je rozšířitelná pomocí pluginů a můžete je jednoduše\n"
+" zapnout a vypnout pomocí tohoto okna."
+
+#: .././libclinica/VisitSchedulerDialog.vala:60
+#: .././libclinica/VisitSchedulerDialog.vala:76
+msgid "Patient not selected"
+msgstr "Pacient nevybrán"
+
+#: .././libclinica/VisitSchedulerDialog.vala:72
+#, c-format
+msgid "Schedule a vist for the patient %s"
+msgstr "Naplánovat návštěvu pro %s"
+
+#: .././libclinica/Application.vala:113
+#, c-format
+msgid "Option parsing failed: %s\n"
+msgstr "Zpracování volby selhalo: %s\n"
+
+#: .././libclinica/Application.vala:148
+#, c-format
+msgid "Clinica %s\n"
+msgstr ""
+
+#. Then add add a new visit and keep a reference to new_page
+#. *  to focus it on page loading.
+#. Create a new one and connect it
+#: .././libclinica/VisitBrowser.vala:73 .././libclinica/VisitBrowser.vala:252
+msgid "New visit"
+msgstr "Nová návštěva"
+
+#: .././libclinica/VisitBrowser.vala:152 .././libclinica/VisitBrowser.vala:209
+msgid ""
+"A visit need to be saved in order to be exported as PDF.\n"
+"Do you want to save the visit now?"
+msgstr ""
+"Návštěva musí být uložena, aby mohla být exportována do PDF.\n"
+"Chcete nyní uložit návštěvu?"
+
+#: .././libclinica/VisitBrowser.vala:196
+msgid "Error while delivering the print operation"
+msgstr ""
+
+#: .././libclinica/VisitDetail.vala:70
+msgid "Edit visit"
+msgstr "Upravit návštěvu"
+
+#: .././libclinica/VisitDetail.vala:80 .././libclinica/EventDetail.vala:75
+msgid "Delete event"
+msgstr "Smazat událost"
+
+#: .././libclinica/VisitDetail.vala:104
+msgid "Show details"
+msgstr "Zobrazit podrobnosti"
+
+#: .././libclinica/VisitDetail.vala:125 .././libclinica/VisitTab.vala:269
+msgid ""
+"Deleting a visit will cause all its data to be lost.\n"
+"Do you really want to continue?"
+msgstr ""
+"Smazáním návštěvy budou všechny data ztracena.\n"
+"Opravdu chcete pokračovat?"
+
+#. Create menu items, connect them to their callback
+#. * and add it to the menu
+#: .././libclinica/DoctorContextMenu.vala:58
+#: .././libclinica/PatientContextMenu.vala:54
+msgid "Delete"
+msgstr "Smazat"
+
+#. Instantiate menu items
+#: .././libclinica/DoctorContextMenu.vala:59
+#: .././libclinica/PatientContextMenu.vala:51
+#: .././libclinica/EventDetail.vala:111
+msgid "Edit"
+msgstr "Upravit"
+
+#: .././libclinica/MedicineEditor.vala:41
+msgid "Create a new Medicine"
+msgstr ""
+
+#: .././libclinica/CalendarWindow.vala:36
+msgid "Clinica calendar"
+msgstr "Clinica kalendář"
+
+#. Anamnesis
+#: .././libclinica/VisitTab.vala:286 .././libclinica/VisitPrinter.vala:107
+msgid "Anamnesis"
+msgstr "Anamnéza"
+
+#. Physical examination
+#: .././libclinica/VisitTab.vala:289 .././libclinica/VisitPrinter.vala:112
+msgid "Physical examination"
+msgstr "Fyzické vyšetření"
+
+#. Laboratory Exam
+#: .././libclinica/VisitTab.vala:292 .././libclinica/VisitPrinter.vala:117
+msgid "Laboratory exam"
+msgstr "Laboratorní vyšetření"
+
+#: .././libclinica/VisitTab.vala:295
+msgid "Hystopathology"
+msgstr "Histopatologie"
+
+#. Diagnosis
+#: .././libclinica/VisitTab.vala:298 .././libclinica/VisitPrinter.vala:127
+msgid "Diagnosis"
+msgstr "Diagnóza"
+
+#. Topical therapy
+#: .././libclinica/VisitTab.vala:301 .././libclinica/VisitPrinter.vala:132
+msgid "Topical therapy"
+msgstr "Topická léčba"
+
+#. Systemic therapy
+#: .././libclinica/VisitTab.vala:304 .././libclinica/VisitPrinter.vala:137
+msgid "Systemic therapy"
+msgstr "Systémová léčba"
+
+#. Subsequent checks
+#: .././libclinica/VisitTab.vala:307 .././libclinica/VisitPrinter.vala:142
+msgid "Subsequent checks"
+msgstr "Následující kontroly"
+
+#: .././libclinica/MedicineTreeView.vala:37
+msgid "Medicine name"
+msgstr ""
+
+#: .././libclinica/MedicineTreeView.vala:40
+#: .././libclinica/MedicineDetailDialog.vala:75
+msgid "Price"
+msgstr "Cena"
+
+#: .././libclinica/PatientListPage.vala:81 .././libclinica/StartPage.vala:211
+msgid "Add a new patient"
+msgstr "Vložit nového pacienta"
+
+#: .././libclinica/PatientListPage.vala:87
+msgid "Remove the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:93
+msgid "Modify the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:99
+msgid "Edit visits of the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:105
+msgid "Schedule a visit with the selected patient"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:417
+#, c-format
+msgid "Trying to removing doctor with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:440
+#, c-format
+msgid "Trying to removing patient with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:463
+#, c-format
+msgid "Trying to removing visit with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:486
+#, c-format
+msgid "Trying to removing event with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/Builder.vala:45
+#, c-format
+msgid ""
+"Failed to load UI file: %s. Please check your installation.\n"
+"%s"
+msgstr ""
+"Načtení UI souboru %s selhalo. Zkontrolujte prosím vaši instalaci.\n"
+"%s"
+
+#: .././libclinica/LocalFileStore.vala:62
+#, c-format
+msgid "Unable to setup file monitors for the filestore folder: %s"
+msgstr "Není možno nastavit monitorování souborů pro adresář souboru: %s"
+
+#: .././libclinica/LocalFileStore.vala:106
+#, c-format
+msgid "Unable to setup a file monitor on directory %s"
+msgstr "Není možno nastavit monitorování souborů na adresář %s"
+
+#: .././libclinica/LocalFileStore.vala:141
+#, c-format
+msgid "Error while listing the files for the visit identified by id %d"
+msgstr "Chyba při výpisu souborů k návštěvě číslo %d"
+
+#: .././libclinica/LocalFileStore.vala:167
+msgid "Destination file already exists"
+msgstr "Cílový soubor už existuje"
+
+#: .././libclinica/LocalFileStore.vala:172
+#, c-format
+msgid "Error while adding the file %s to the selected visit"
+msgstr "Chyba při vkládání souboru %s do vybrané návštěvy"
+
+#: .././libclinica/NetworkedDataProvider.vala:246
+msgid ""
+"You canceled the authentication process on the remote server.\n"
+"From now on Clinica will use the local database. If you want to connect to\n"
+"remote server please re-enable networking in the settings dialog."
+msgstr ""
+
+#. Set title to edit patient * instead of create new patient
+#: .././libclinica/PatientEditor.vala:304
+#, c-format
+msgid "Edit patient named %s"
+msgstr "Upravit pacienta %s"
+
+#: .././libclinica/PatientEditor.vala:408
+msgid "You must select a doctor for this patient."
+msgstr "Musíte vybrat doktora pro tohoto pacienta."
+
+#: .././libclinica/PatientEditor.vala:409
+msgid ""
+"If you need to create a new one type his name in the entry and select Create "
+"new doctor from the completion list."
+msgstr ""
+"Pokud potřebujete vytvořit nového, vepište jeho jméno do kolonky a vyberte "
+"Vytvořit nového doktora z dokončovacího seznamu."
+
+#: .././libclinica/PatientEditor.vala:445
+msgid "Date inserted is invalid, aborting patient editing"
+msgstr "Vložené datum je neplatné, ukončuji úpravu pacienta"
+
+#: .././libclinica/AuthenticationDialog.vala:40
+msgid "Authentication required"
+msgstr ""
+
+#. Start of events
+#: .././libclinica/CalendarEventList.vala:73
+msgid "Events scheduled"
+msgstr "Naplánované události"
+
+#: .././libclinica/CalendarEventList.vala:92
+msgid ""
+"No events on this day.\n"
+"You can create a new event\n"
+"by clicking on the top-left button."
+msgstr ""
+"Žádné události pro dnešní den.\n"
+"Můžete vytvořit novou událost\n"
+"kliknutím na tlačítko vlevo nahoře."
+
+#: .././libclinica/CalendarEventList.vala:103
+msgid "Visits performed"
+msgstr "Provedené návštěvy"
+
+#: .././libclinica/CalendarEventList.vala:105
+msgid "Visits scheduled"
+msgstr "Naplánované návštěvy"
+
+#: .././libclinica/CalendarEventList.vala:126
+msgid "No visits performed on this day"
+msgstr "Dnes neprovedena žádná návštěva"
+
+#: .././libclinica/ImportDialog.vala:40
+msgid "Import data from backup file"
+msgstr ""
+
+#: .././libclinica/PatientContextMenu.vala:57
+msgid "Edit visits"
+msgstr "Upravit návštěva"
+
+#. File menu
+#: .././libclinica/UIManager.vala:44
+msgid "_File"
+msgstr "_Soubor"
+
+#: .././libclinica/UIManager.vala:45
+msgid "New _patient"
+msgstr "Nový _pacient"
+
+#: .././libclinica/UIManager.vala:46
+msgid "Create a new patient"
+msgstr "Vytvořit nového pacienta"
+
+#: .././libclinica/UIManager.vala:47
+msgid "New _doctor"
+msgstr "Nový _doktor"
+
+#: .././libclinica/UIManager.vala:48
+msgid "Create a new doctor"
+msgstr "Vytvořit nového doktora"
+
+#: .././libclinica/UIManager.vala:49
+msgid "_Quit"
+msgstr "_Konec"
+
+#: .././libclinica/UIManager.vala:50
+msgid "Quit clinica"
+msgstr "Ukončit Clinica"
+
+#. View menu
+#: .././libclinica/UIManager.vala:53
+msgid "_View"
+msgstr "Z_obrazit"
+
+#: .././libclinica/UIManager.vala:54
+msgid "_Start page"
+msgstr "Ú_vodní strana"
+
+#: .././libclinica/UIManager.vala:55
+msgid "Go to the start page of clinica"
+msgstr "Jít na úvodní stranu Clinica"
+
+#: .././libclinica/UIManager.vala:56
+msgid "_Patients"
+msgstr "_Pacienti"
+
+#: .././libclinica/UIManager.vala:57
+msgid "Go to the list of patients"
+msgstr "Jít na seznam pacientů"
+
+#: .././libclinica/UIManager.vala:58
+msgid "_Doctors"
+msgstr "_Doktoři"
+
+#: .././libclinica/UIManager.vala:59
+msgid "Go to the list of doctors"
+msgstr "Jít na seznam doktorů"
+
+#: .././libclinica/UIManager.vala:60
+msgid "_Search medicines"
+msgstr "_Hledat medikament"
+
+#: .././libclinica/UIManager.vala:61
+msgid "Search medicines online"
+msgstr "Hledat medikamenty online"
+
+#. Tools menu
+#: .././libclinica/UIManager.vala:64
+msgid "_Tools"
+msgstr "Nás_troje"
+
+#: .././libclinica/UIManager.vala:65
+msgid "_Settings"
+msgstr "Na_stavení"
+
+#: .././libclinica/UIManager.vala:66
+msgid "Customize clinica behaviour"
+msgstr "Upravit chování Clinica"
+
+#: .././libclinica/UIManager.vala:67
+msgid "Backup"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:68
+msgid "Backup clinica data to file"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:69
+msgid "Import"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:70
+msgid "Import data from backup files"
+msgstr ""
+
+#. Help menu
+#: .././libclinica/UIManager.vala:73
+msgid "_Help"
+msgstr "Ná_pověda"
+
+#: .././libclinica/UIManager.vala:74
+msgid "_Contents"
+msgstr "_Obsah"
+
+#: .././libclinica/UIManager.vala:75
+msgid "Open the help system"
+msgstr "Otevřít systém nápovědy"
+
+#: .././libclinica/UIManager.vala:76
+msgid "_Report a bug"
+msgstr "_Zaslat hlášení o chybě"
+
+#: .././libclinica/UIManager.vala:77
+msgid "Report a bug online"
+msgstr "Nahlásit chybu online"
+
+#: .././libclinica/UIManager.vala:78
+msgid "_About"
+msgstr "_O programu"
+
+#: .././libclinica/UIManager.vala:79
+msgid "Get to know the development team of Clinica"
+msgstr "Poznat tým vývojářů Clinica"
+
+#: .././libclinica/BackupEngine.vala:113
+msgid "Please select a valid backup file"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:125
+msgid "Importing data"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:126
+msgid "Please wait while Clinica imports the data..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:129
+msgid "Importing the JSON data.."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:137
+msgid "Error while parsing the backup JSON data"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:143 .././libclinica/BackupEngine.vala:170
+msgid "An error occurred while parsing the JSON file"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:165
+msgid ""
+"The doctors, patients, visits and events field in the JSON backup should be "
+"arrays, aborting."
+msgstr ""
+
+#. Clear the database and put the data back in it
+#. in such a way that won't break relationships.
+#: .././libclinica/BackupEngine.vala:188
+msgid "Clearing the old data in the database..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:192
+msgid "Loading doctors..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:201
+#, c-format
+msgid "- %d doctors have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:203
+msgid "Loading patients..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:216
+#, c-format
+msgid "- %d patients have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:218
+msgid "Loading visits..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:231
+#, c-format
+msgid "- %d visits have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:233
+msgid "Loading events..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:249
+#, c-format
+msgid "- %d events have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:258
+msgid ""
+"- A FileStore was found but is not available in the current provider\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:283
+#, c-format
+msgid "- %d files have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:287
+msgid "- No FileStore was found in the backup\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:298
+msgid "The import of the data has been completed successfully"
+msgstr ""
+
+#: .././libclinica/PatientListStore.vala:128
+#: .././libclinica/PatientListStore.vala:150
+msgid ""
+"Patients database seems corrupted. This is likely to be a bug in the "
+"application"
+msgstr ""
+"Databáze pacientů se zdá být zničená. Pravděpodobně se jedná o chybu programu"
+
+#. Print the error message to stdout
+#: .././libclinica/Utils.vala:79
+msgid "ERROR => "
+msgstr "ERROR => "
+
+#: .././libclinica/Utils.vala:83 .././libclinica/Utils.vala:84
+msgid "Clinica encountered an error"
+msgstr "Clinica narazila na chybu"
+
+#: .././libclinica/LocalMedicinesDatabase.vala:90
+#, c-format
+msgid "Medicine with id = %lld not found in DB: %s"
+msgstr ""
+
+#: .././libclinica/LocalMedicinesDatabase.vala:119
+#, c-format
+msgid "Error inserting medicine in the database: %s"
+msgstr ""
+
+#: .././libclinica/EventEditor.vala:93
+msgid "Create a new event"
+msgstr "Vytvořit novou událost"
+
+#: .././libclinica/EventEditor.vala:97
+#, c-format
+msgid "Editing event: %s"
+msgstr "Úprava události: %s"
+
+#. Create the entry for title of the event and venue
+#: .././libclinica/EventEditor.vala:115
+msgid "Title"
+msgstr "Název"
+
+#: .././libclinica/EventEditor.vala:116
+msgid "Venue"
+msgstr "Místo konání"
+
+#: .././libclinica/EventEditor.vala:151
+msgid "Time:"
+msgstr "Čas:"
+
+#: .././libclinica/EventEditor.vala:167
+msgid "Insert the description here..."
+msgstr "Sem vložte popis..."
+
+#: .././libclinica/EventEditor.vala:205 .././libclinica/VisitToolbar.vala:96
+#, c-format
+msgid "Patient"
+msgstr "Pacient"
+
+#: .././libclinica/EventEditor.vala:264
+msgid "Visit"
+msgstr "Návštěva"
+
+#: .././libclinica/VisitListStore.vala:99
+msgid ""
+"Visit database seems corrupted. This is likely to be a bug in the application"
+msgstr ""
+"Databáze návštěv se zdá být zničená. Pravděpodobně se jedná o chybu programu"
+
+#: .././libclinica/MedicineSearchPage.vala:76
+#: .././data/resources/ui/start_page.glade.h:5
+msgid "Search medicines"
+msgstr "Hledat medikamenty"
+
+#: .././libclinica/MedicineSearchPage.vala:100
+msgid "No search engine available"
+msgstr "Žádný vyhledávací engine není dostupný"
+
+#: .././libclinica/MedicineSearchPage.vala:108
+#, c-format
+msgid "Searching for %s..."
+msgstr "Hledám %s..."
+
+#: .././libclinica/MedicineSearchPage.vala:133
+msgid "Medicines"
+msgstr ""
+
+#: .././libclinica/MedicineSearchPage.vala:96
+msgid "It's not possible to perform a search for medicine"
+msgstr "Není možné provést hledání medikamentu"
+
+#: .././libclinica/SqliteDataProvider.vala:143
+#, c-format
+msgid "Error creating some configuration files, check permission on %s"
+msgstr ""
+"Chyba při vytváření konfiguračních souborů, zkontrolujte oprávnění na %s"
+
+#: .././libclinica/SqliteDataProvider.vala:151
+#, c-format
+msgid "Error reading some configuration files, check permission on %s"
+msgstr "Chyba při čtení konfiguračních souborů, zkontrolujte oprávnění na %s"
+
+#: .././libclinica/SqliteDataProvider.vala:170
+#, c-format
+msgid "Failure while settings new database version to %s"
+msgstr "Selhání při nastavování nové verze databáze na %s"
+
+#: .././libclinica/SqliteDataProvider.vala:173
+msgid "Failure while upgrading database"
+msgstr "Selhání při upgradu databáze"
+
+#: .././libclinica/SqliteDataProvider.vala:177
+msgid "Version of the database is not compatible"
+msgstr "Verze databáze není kompatibilní"
+
+#: .././libclinica/SqliteDataProvider.vala:199
+msgid ""
+"This is a version of Clinica newer than the one that created the\n"
+"patients database installed on the system.\n"
+"Using this version requires upgrading the database, and\n"
+"<b>the old version will not be able to use it anymore</b>.\n"
+"Do you wish to perform this one-time upgrade?\n"
+msgstr ""
+"Tato verze Clinica je novější než ta, která\n"
+"vytvořila databázo pacientů na tomto počítači.\n"
+"Používání této verze vyžaduje upgrade databáze\n"
+"a <b>stará verze ji nebude moct nadále používat</b>.\n"
+"Přejete si provést tento jednorázový upgrade?\n"
+
+#: .././libclinica/SqliteDataProvider.vala:200
+msgid "Upgrade database"
+msgstr "Upgradovat databázi"
+
+#: .././libclinica/SqliteDataProvider.vala:225
+msgid "Database needs to be moved"
+msgstr "Databáze musí být přesunuta"
+
+#: .././libclinica/SqliteDataProvider.vala:226
+msgid ""
+"An older version of clinica has been detected and the old database has to be "
+"moved\n"
+"to a new location to continue.\n"
+"<b>The older version of clinica won't work anymore with this setup</b>.\n"
+"Do you still want to continue?"
+msgstr ""
+"Byla objevena starší verze Clinica a stará databáze musí\n"
+"být pro pokračování přesunuta na jiné místo.\n"
+"<b>Starší verze Clinica již nebude fungovat s tímto nastavením</b>.\n"
+"Opravdu chcete pokračovat?"
+
+#: .././libclinica/SqliteDataProvider.vala:239
+msgid ""
+"Error while transferring the database to the new default location for "
+"clinica >= 0.2.9"
+msgstr ""
+"Chyba při přesunu databáze do nového výchozího umístění pro Clinica >= 0.2.9"
+
+#: .././libclinica/SqliteDataProvider.vala:251
+msgid "Error upgrading database, please check your installation"
+msgstr "Chyba při upgradu databáze, zkontrolujte prosím svou instalaci"
+
+#: .././libclinica/SqliteDataProvider.vala:266
+#, c-format
+msgid ""
+"Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:359
+#, c-format
+msgid "Error while retrieving the doctor with id = %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:399
+#, c-format
+msgid "An error occurred while saving the doctor with id %d: %s"
+msgstr "Vyskytla se chyba při ukládání doktora číslo %d: %s"
+
+#: .././libclinica/SqliteDataProvider.vala:468
+#, c-format
+msgid "Error while retrieving the patient with id = %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:517
+#: .././libclinica/SqliteDataProvider.vala:652
+#, c-format
+msgid "An error occurred while saving the doctor with id %s: %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:597
+#, c-format
+msgid "Error while retrieving the visit with id = %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:686
+#, c-format
+msgid "Error while retrieving the event with id = %d"
+msgstr "Chyba při vyvolávání události číslo %d"
+
+#: .././libclinica/SqliteDataProvider.vala:728
+#, c-format
+msgid "An error occurred while saving the event with id %s: %s"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:40
+msgid "Clinica settings"
+msgstr "Nastavení Clinica"
+
+#: .././libclinica/SettingsManager.vala:52
+msgid "Clinica has been built without plugins support"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:135
+msgid "Please use the Network tab to enable the Networked data provider"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:136
+msgid "Use the Network tab"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Disconnect"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Connect"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:191
+#, c-format
+msgid "Connection to the given host failed. Please check your settings."
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:192
+msgid "Connection failed"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:206
+#: .././libclinica/ResourceManager.vala:284
+#, c-format
+msgid "Username or password are wrong. Disconnecting from the server."
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:207
+msgid "Wrong authentication data has been provided"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:60
+msgid "Edit details of patient"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:67
+msgid "Remove this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:74
+msgid "Export this visit as PDF"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:81
+msgid "Print a report of this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:88
+msgid "Save this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:99
+msgid "Close the visits of this patient"
+msgstr ""
+
+#: .././libclinica/VisitToolbar.vala:93
+msgid "This patient has not a doctor"
+msgstr "Tento pacient nemá doktora"
+
+#: .././libclinica/VisitToolbar.vala:97
+msgid "Doctor"
+msgstr ""
+
+#: .././libclinica/DateTimePicker.vala:56
+msgid "Hour"
+msgstr "Hodina"
+
+#: .././libclinica/DateTimePicker.vala:58
+msgid "Minute"
+msgstr "Minuta"
+
+#: .././libclinica/DoctorListStore.vala:75
+msgid "Doctors database seems corrupted."
+msgstr "Databáze doktorů se zdá být zničená."
+
+#: .././libclinica/DoctorListView.vala:175
+msgid "Select a doctor to delete it!"
+msgstr "Vyberte doktora k vymazání"
+
+#: .././libclinica/DoctorListView.vala:186
+msgid ""
+"The doctor that you have selected for removal has some patients associated. "
+"\n"
+msgstr "Vámi kvymazání vybraný doktor má přiřazeny pacienty. \n"
+
+#: .././libclinica/DoctorListView.vala:187
+msgid ""
+"It's not possible to remove it without disassociating all his patients.\n"
+"\n"
+msgstr ""
+"Není možné jej vymazat bez přeřazení všech jeho pacientů.\n"
+"\n"
+
+#: .././libclinica/DoctorListView.vala:188
+#: .././libclinica/DoctorListView.vala:217
+msgid "Do you really want to proceed?"
+msgstr "Opravdu chcete toto provést?"
+
+#: .././libclinica/DoctorListView.vala:189
+msgid "Doctor has associated patients"
+msgstr "Doktor má přiřazené pacienty"
+
+#: .././libclinica/DoctorListView.vala:215
+msgid ""
+"The following patients will be disassociated from this doctor by this "
+"action:\n"
+msgstr "Touto akcí budou následující pacienti přeřazeni od tohoto doktora:\n"
+
+#: .././libclinica/DoctorListView.vala:218
+msgid "Confirm disassociation of patients"
+msgstr "Potvrdit přeřazení pacientů"
+
+#: .././libclinica/DoctorListView.vala:235
+msgid ""
+"Really delete this doctor? All information about him/her will be lost."
+msgstr ""
+"Opravdu chcete smazat doktora? Všechny informace o něm budou ztraceny."
+
+#. Ask the user where he would like to backup its files.
+#: .././libclinica/UserInterface.vala:360
+msgid "Select the folder where the data should be saved"
+msgstr ""
+
+#. In this string %s refers to the path where the backup has been performed.
+#: .././libclinica/UserInterface.vala:386
+#, c-format
+msgid "Backup completed successfully in the folder %s"
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:387
+msgid "Backup completed"
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:389
+msgid ""
+"Please take care of copying the folder in a safe place for future restore of "
+"the data."
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:416
+#, c-format
+msgid "Cannot open the help: %s"
+msgstr "Nemohu otevřít nápovědu: %s"
+
+#: .././libclinica/UserInterface.vala:441
+msgid ""
+"An error occurred while opening the bug system. Please go to\n"
+"http://launchpad.net/clinica-project/ to file a bug"
+msgstr ""
+"Vyskytla se chyba při otevírání hlásiče chyb. Pro nahlášení chyby\n"
+"běžte prosím na http://launchpad.net/clinica-project/"
+
+#: .././libclinica/EventDetail.vala:65
+msgid "Edit event"
+msgstr "Upravit událost"
+
+#: .././libclinica/EventDetail.vala:112
+msgid "Remove"
+msgstr "Odebrat"
+
+#: .././libclinica/EventDetail.vala:145
+msgid "Really delete this event?"
+msgstr "Opravdu smazat tuto událost?"
+
+#: .././libclinica/Sidebar.vala:68
+msgid "Pages"
+msgstr ""
+
+#: .././libclinica/StartPage.vala:93
+msgid "Dashboard"
+msgstr ""
+
+#: .././libclinica/StartPage.vala:205
+msgid ""
+"Add a new patient \n"
+" with name "
+msgstr ""
+"Vložit nového pacienta \n"
+" se jménem "
+
+#: .././libclinica/EventListStore.vala:121
+msgid ""
+"Events database seems corrupted. This is likely to be a bug in the "
+"application"
+msgstr ""
+"Databáze událostí se zdá být poškozená. Pravděpodobně se jedná o chybu "
+"programu"
+
+#: .././libclinica/DoctorListPage.vala:60
+#: .././libclinica/DoctorListPage.vala:93
+msgid "Doctors"
+msgstr "Doktoři"
+
+#: .././libclinica/DoctorListPage.vala:76
+msgid "Add a doctor"
+msgstr ""
+
+#: .././libclinica/DoctorListPage.vala:82
+msgid "Edit the selected doctor"
+msgstr ""
+
+#: .././libclinica/DoctorListPage.vala:88
+msgid "Remove the selected doctor"
+msgstr ""
+
+#: .././libclinica/ResourceManager.vala:285
+msgid "Error while authenticating on the server"
+msgstr ""
+
+#: .././libclinica/AboutDialog.vala:41
+msgid "Medical records manager"
+msgstr "Manažer zdravotních záznamů"
+
+#: .././libclinica/AboutDialog.vala:43
+msgid "About Clinica"
+msgstr "O Clinica"
+
+#: .././libclinica/AboutDialog.vala:52
+msgid "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+msgstr "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+
+#: .././libclinica/AboutDialog.vala:53
+msgid "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+msgstr "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+
+#. Histopathology
+#: .././libclinica/VisitPrinter.vala:122
+msgid "Histopathology"
+msgstr "Histopatologie"
+
+#. Now write the date of the visit after that
+#: .././libclinica/VisitPrinter.vala:285
+#, c-format
+msgid "Report of the visit of %s"
+msgstr ""
+
+#: .././libclinica/VisitPrinter.vala:316
+#: .././libclinica/MedicineDetailDialog.vala:109
+msgid "Field empty"
+msgstr "Pole prázdné"
+
+#. Add a Attach button
+#: .././libclinica/VisitFileManager.vala:89
+msgid "Attach file"
+msgstr "Přiložit soubor"
+
+#: .././libclinica/VisitFileManager.vala:97
+msgid "Browse files"
+msgstr "Procházet soubory"
+
+#: .././libclinica/VisitFileManager.vala:113
+msgid "Select a file to attach"
+msgstr "Vybrat soubor k přiložení"
+
+#: .././libclinica/VisitFileManager.vala:133
+msgid "Unable to open the browser on the filestore position"
+msgstr "Není možné otevřít problížeč na umístění souboru"
+
+#: .././libclinica/VisitFileManager.vala:163
+msgid ""
+"Save the visit\n"
+" to attach files"
+msgstr ""
+"Pro přiložení\n"
+" uložte návštěvu"
+
+#: .././libclinica/VisitFileManager.vala:170
+msgid "Attach files"
+msgstr "Přiložit soubory"
+
+#: .././libclinica/SidebarCalendarEntry.vala:30
+msgid "Calendar"
+msgstr ""
+
+#. Create the object and add the close button used
+#. * to dismiss the dialog
+#: .././libclinica/MedicineDetailDialog.vala:46
+msgid "Close"
+msgstr "Zavřít"
+
+#: .././libclinica/MedicineDetailDialog.vala:65
+msgid "General information"
+msgstr "Obecné informace"
+
+#. And now the content for the others fields of the medicine
+#: .././libclinica/MedicineDetailDialog.vala:71
+msgid "Identification Code"
+msgstr "Identifikační kód"
+
+#: .././libclinica/MedicineDetailDialog.vala:72
+msgid "Description"
+msgstr "Popis"
+
+#: .././libclinica/MedicineDetailDialog.vala:73
+msgid "Active ingredient"
+msgstr "Účinná látka"
+
+#: .././libclinica/MedicineDetailDialog.vala:74
+msgid "Storage reccomendations"
+msgstr "Doporučení ke skladování"
+
+#: .././libclinica/MedicineDetailDialog.vala:83
+msgid "Additional notes"
+msgstr "Dodatečné poznámky"
+
+#. Nothing to do for now.
+#: .././libclinica/FileDetail.vala:89
+#, c-format
+msgid "Error while loading icon for file %s: %s"
+msgstr "Chyba při načítání ikony souboru %s: %s"
+
+#: .././libclinica/FileDetail.vala:98
+msgid "Open file"
+msgstr "Otevřít soubor"
+
+#: .././libclinica/FileDetail.vala:110
+msgid "Delete file"
+msgstr "Smazat soubor"
+
+#: .././libclinica/FileDetail.vala:122
+#, c-format
+msgid ""
+"Do you really want to delete the file %s?\n"
+"If you proceed it will be definitively lost."
+msgstr ""
+"Opravdu si přejete smazat soubor: %s?\n"
+"Soubor bude poté definitivně ztracen."
+
+#: .././libclinica/FileDetail.vala:135
+#, c-format
+msgid "Error while opening the file %s"
+msgstr "Chyba při otevírání souboru %s"
+
+#: .././data/resources/ui/start_page.glade.h:1
+msgid "Browse the patients to start a visit"
+msgstr "Procházet pacienty pro začátek návštěvy"
+
+#: .././data/resources/ui/start_page.glade.h:2
+msgid "Add new patient"
+msgstr "Přidat nového pacienta"
+
+#: .././data/resources/ui/start_page.glade.h:3
+msgid "Patient list"
+msgstr "Seznam pacientů"
+
+#: .././data/resources/ui/start_page.glade.h:4
+msgid "Doctor list"
+msgstr "Seznam doktorů"
+
+#: .././data/resources/ui/start_page.glade.h:6
+msgid "Open calendar"
+msgstr "Otevřít kalendář"
+
+#: .././data/resources/ui/authentication_dialog.glade.h:1
+msgid "The server requires authentication. Please insert your credentials:"
+msgstr ""
+
+#: .././data/resources/ui/authentication_dialog.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:11
+msgid "Username"
+msgstr ""
+
+#: .././data/resources/ui/authentication_dialog.glade.h:3
+#: .././data/resources/ui/settings_window.glade.h:12
+msgid "Password"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:1
+msgid "Name:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:2
+msgid "Description:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:3
+msgid "Active ingredient:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:4
+msgid "Storage reccomendations:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:5
+msgid "Price:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:6
+msgid "Other notes:"
+msgstr ""
+
+#: .././data/resources/ui/import_dialog.glade.h:1
+msgid "Source:\t"
+msgstr ""
+
+#: .././data/resources/ui/import_dialog.glade.h:2
+msgid "Select the backup folder"
+msgstr ""
+
+#: .././data/resources/ui/import_dialog.glade.h:3
+msgid ""
+"<b>Warning:</b> Please note that the current data in the database <b>will be "
+"definitely lost</b>. Consider performing a backup of the current data before "
+"importing the old one."
+msgstr ""
+
+#: .././data/resources/ui/doctor_editor.glade.h:1
+#: .././data/resources/ui/patient_editor.glade.h:12
+msgid "Doctor:"
+msgstr "Doktor:"
+
+#: .././data/resources/ui/doctor_editor.glade.h:4
+#: .././data/resources/ui/patient_editor.glade.h:11
+msgid "Phone:"
+msgstr "Telefon:"
+
+#: .././data/resources/ui/doctor_editor.glade.h:5
+msgid "Mobile:"
+msgstr "Mobil:"
+
+#: .././data/resources/ui/wait_dialog.glade.h:1
+msgid "label"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:1
+msgid "Use plugins (restart required)"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:2
+msgid "Allow to browse files in visits"
+msgstr "Povolit procházení souborů v návštěvách"
+
+#: .././data/resources/ui/settings_window.glade.h:3
+msgid "Medicines search engine"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:4
+msgid "Data source"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:5
+msgid "General"
+msgstr "Obecné"
+
+#: .././data/resources/ui/settings_window.glade.h:6
+msgid "Host"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:7
+msgid "Port"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:8
+msgid "button"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:9
+msgid "Connection to a remote Clinica instance"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:10
+msgid "Allow connections of other clinica from the LAN"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:13
+msgid "Built-in server"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:14
+msgid "Network"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:15
+msgid ""
+"The details that are inserted here will be used when generating\n"
+"the automatic visit reports. "
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:18
+msgid "Address"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:19
+msgid "Institution"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:20
+msgid "Email"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:21
+msgid "Personal details"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:22
+msgid "Plugins"
+msgstr "Pluginy"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:1
+msgid "Visits"
+msgstr "Návštěvy"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:2
+msgid "Schedule a visit"
+msgstr ""
+
+#: .././data/resources/ui/patient_editor.glade.h:1
+msgid "Patient:"
+msgstr "Pacient:"
+
+#: .././data/resources/ui/patient_editor.glade.h:4
+msgid "Gender:"
+msgstr "Pohlaví:"
+
+#: .././data/resources/ui/patient_editor.glade.h:5
+msgid "Date of birth:"
+msgstr "Datum narození:"
+
+#: .././data/resources/ui/patient_editor.glade.h:6
+msgid "dd"
+msgstr "dd"
+
+#: .././data/resources/ui/patient_editor.glade.h:7
+msgid "/"
+msgstr "/"
+
+#: .././data/resources/ui/patient_editor.glade.h:8
+msgid "mm"
+msgstr "mm"
+
+#: .././data/resources/ui/patient_editor.glade.h:9
+msgid "yyyy"
+msgstr "rrrr"
+
+#: .././data/resources/ui/patient_editor.glade.h:10
+msgid "Address:"
+msgstr "Adresa:"
+
+#: .././data/resources/ui/patient_editor.glade.h:13
+msgid "Codice fiscale:"
+msgstr ""
+
+#: .././data/resources/ui/patient_editor.glade.h:14
+msgid "Male"
+msgstr "Muž"
+
+#: .././data/resources/ui/patient_editor.glade.h:15
+msgid "Female"
+msgstr "Žena"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:1
+msgid "Select the date on which you'd like to schedule the visit."
+msgstr ""
+
+#: .././data/resources/ui/visit_scheduler.glade.h:2
+msgid "Selected patient"
+msgstr ""
+
+#: .././data/resources/ui/visit_scheduler.glade.h:3
+msgid ""
+"<b>Tip:</b> Once created this visit will be visible in the visit editor of "
+"this patient."
+msgstr ""
+
+#, c-format
+#~ msgid "Visits of the patient %s"
+#~ msgstr "Návštěva pacienta %s"
+
+#~ msgid "Medicine search"
+#~ msgstr "Hledání medikamentu"
+
+#~ msgid "Stop"
+#~ msgstr "Zastavit"
+
+#~ msgid ""
+#~ "Select the search engine\n"
+#~ "used to find medicines"
+#~ msgstr ""
+#~ "Vyberte vyhledávací engine\n"
+#~ "pro hledání medikamentů"
+
+#~ msgid "Edit patient details"
+#~ msgstr "Upravit detaily pacienta"
+
+#~ msgid "Save as PDF"
+#~ msgstr "Uložit jako PDF"
+
+#~ msgid "Use plugins (need restart)"
+#~ msgstr "Používat pluginy (nutný restart)"
+
+#, c-format
+#~ msgid ""
+#~ "Patient: <b>%s</b>\n"
+#~ "Doctor: <b>%s</b>"
+#~ msgstr ""
+#~ "Pacient: <b>%s</b>\n"
+#~ "Doktor: <b>%s</b>"
diff --git a/po/de.po b/po/de.po
new file mode 100644
index 0000000..1575e73
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,1464 @@
+# German translation for clinica-project
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the clinica-project package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: clinica-project\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-04-18 10:23+0200\n"
+"PO-Revision-Date: 2012-05-04 13:31+0000\n"
+"Last-Translator: Steven Beer <Unknown>\n"
+"Language-Team: German <de at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-05-18 05:44+0000\n"
+"X-Generator: Launchpad (build 16626)\n"
+"Language: de\n"
+
+#: .././plugins/AgenziaDelFarmaco.py:166
+msgid "Dosage form"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:167
+msgid "System of supply"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:168
+msgid "Class of eligibility"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:169
+msgid "Firm"
+msgstr ""
+
+#. Title of edit doctor dialog
+#: .././libclinica/DoctorEditor.vala:88
+#, c-format
+msgid "Edit doctor named %s"
+msgstr "Arzt mit dem Namen %s bearbeiten"
+
+#: .././libclinica/PatientLens.vala:37
+msgid "Search for patients"
+msgstr "Nach Patienten suchen"
+
+#: .././libclinica/PatientLens.vala:43
+msgid "Recently visited patients"
+msgstr "Kürzlich besuchte Patienten"
+
+#. Create the SidebarEntry
+#: .././libclinica/PatientLens.vala:47 .././libclinica/PatientListPage.vala:64
+#: .././libclinica/PatientListPage.vala:110
+msgid "Patients"
+msgstr "Patienten"
+
+#: .././libclinica/PatientListView.vala:76
+#: .././libclinica/DoctorListView.vala:51
+#: .././data/resources/ui/doctor_editor.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:17
+#: .././data/resources/ui/patient_editor.glade.h:2
+msgid "Name"
+msgstr "Name"
+
+#. ...and then the surname column
+#: .././libclinica/PatientListView.vala:80
+#: .././libclinica/DoctorListView.vala:56
+#: .././data/resources/ui/doctor_editor.glade.h:3
+#: .././data/resources/ui/patient_editor.glade.h:3
+msgid "Surname"
+msgstr "Nachname"
+
+#: .././libclinica/PatientListView.vala:165
+msgid "Select a patient to delete it!"
+msgstr "Wählen Sie einen Patienten zum Löschen aus!"
+
+#: .././libclinica/PatientListView.vala:172
+msgid ""
+"Really delete this patient? All information about him/her and the associated "
+"visits will be lost."
+msgstr ""
+"Sind Sie sicher, diesen Patienten zu löschen? Alle zugehörigen Informationen "
+"und Besuche werden gelöscht."
+
+#. Set title according to the patient that we have loaded and connect
+#. * show startup signal to the focusing of the first field in the visit
+#: .././libclinica/VisitPage.vala:63
+#, c-format
+msgid "Visit of the patient %s"
+msgstr ""
+
+#: .././libclinica/PluginManager.vala:35
+msgid ""
+"Clinica is extensible via plugins and you can easily enable\n"
+" and disable them using this window."
+msgstr ""
+"Clinica ist ist über Plugins erweiterbar, die Sie einfach mit diesem "
+"Fenster\n"
+"aktivieren und deaktivieren können."
+
+#: .././libclinica/VisitSchedulerDialog.vala:60
+#: .././libclinica/VisitSchedulerDialog.vala:76
+msgid "Patient not selected"
+msgstr "Patient nicht ausgewählt"
+
+#: .././libclinica/VisitSchedulerDialog.vala:72
+#, c-format
+msgid "Schedule a vist for the patient %s"
+msgstr "Einen Besuch planen für den Patienten %s"
+
+#: .././libclinica/Application.vala:113
+#, c-format
+msgid "Option parsing failed: %s\n"
+msgstr "Analyse der Option fehlgeschlagen %s\n"
+
+#: .././libclinica/Application.vala:148
+#, c-format
+msgid "Clinica %s\n"
+msgstr "Clinica %s\n"
+
+#. Then add add a new visit and keep a reference to new_page
+#. *  to focus it on page loading.
+#. Create a new one and connect it
+#: .././libclinica/VisitBrowser.vala:73 .././libclinica/VisitBrowser.vala:252
+msgid "New visit"
+msgstr "Neuer Besuch"
+
+#: .././libclinica/VisitBrowser.vala:152 .././libclinica/VisitBrowser.vala:209
+msgid ""
+"A visit need to be saved in order to be exported as PDF.\n"
+"Do you want to save the visit now?"
+msgstr ""
+"Ein Besuch muss für einen PDF-Export erst gespeichert werden.\n"
+"Möchten Sie den Besuch jetzt speichern?"
+
+#: .././libclinica/VisitBrowser.vala:196
+msgid "Error while delivering the print operation"
+msgstr ""
+
+#: .././libclinica/VisitDetail.vala:70
+msgid "Edit visit"
+msgstr "Besuch bearbeiten"
+
+#: .././libclinica/VisitDetail.vala:80 .././libclinica/EventDetail.vala:75
+msgid "Delete event"
+msgstr "Ereignis löschen"
+
+#: .././libclinica/VisitDetail.vala:104
+msgid "Show details"
+msgstr "Details anzeigen"
+
+#: .././libclinica/VisitDetail.vala:125 .././libclinica/VisitTab.vala:269
+msgid ""
+"Deleting a visit will cause all its data to be lost.\n"
+"Do you really want to continue?"
+msgstr ""
+"Das Entfernen eines Besuchs löscht alle dazugehörigen Daten.\n"
+"Möchten Sie wirklich fortfahren?"
+
+#. Create menu items, connect them to their callback
+#. * and add it to the menu
+#: .././libclinica/DoctorContextMenu.vala:58
+#: .././libclinica/PatientContextMenu.vala:54
+msgid "Delete"
+msgstr "Entfernen"
+
+#. Instantiate menu items
+#: .././libclinica/DoctorContextMenu.vala:59
+#: .././libclinica/PatientContextMenu.vala:51
+#: .././libclinica/EventDetail.vala:111
+msgid "Edit"
+msgstr "Bearbeiten"
+
+#: .././libclinica/MedicineEditor.vala:41
+msgid "Create a new Medicine"
+msgstr ""
+
+#: .././libclinica/CalendarWindow.vala:36
+msgid "Clinica calendar"
+msgstr "Clinica Kalender"
+
+#. Anamnesis
+#: .././libclinica/VisitTab.vala:286 .././libclinica/VisitPrinter.vala:107
+msgid "Anamnesis"
+msgstr "Anamnese"
+
+#. Physical examination
+#: .././libclinica/VisitTab.vala:289 .././libclinica/VisitPrinter.vala:112
+msgid "Physical examination"
+msgstr "Ärztliche Untersuchung"
+
+#. Laboratory Exam
+#: .././libclinica/VisitTab.vala:292 .././libclinica/VisitPrinter.vala:117
+msgid "Laboratory exam"
+msgstr "Laborbericht"
+
+#: .././libclinica/VisitTab.vala:295
+msgid "Hystopathology"
+msgstr "Histopathology"
+
+#. Diagnosis
+#: .././libclinica/VisitTab.vala:298 .././libclinica/VisitPrinter.vala:127
+msgid "Diagnosis"
+msgstr "Diagnose"
+
+#. Topical therapy
+#: .././libclinica/VisitTab.vala:301 .././libclinica/VisitPrinter.vala:132
+msgid "Topical therapy"
+msgstr "Aktuelle Therapie"
+
+#. Systemic therapy
+#: .././libclinica/VisitTab.vala:304 .././libclinica/VisitPrinter.vala:137
+msgid "Systemic therapy"
+msgstr "Systematische Therapie"
+
+#. Subsequent checks
+#: .././libclinica/VisitTab.vala:307 .././libclinica/VisitPrinter.vala:142
+msgid "Subsequent checks"
+msgstr "Anschließende Untersuchungen"
+
+#: .././libclinica/MedicineTreeView.vala:37
+msgid "Medicine name"
+msgstr ""
+
+#: .././libclinica/MedicineTreeView.vala:40
+#: .././libclinica/MedicineDetailDialog.vala:75
+msgid "Price"
+msgstr "Preis"
+
+#: .././libclinica/PatientListPage.vala:81 .././libclinica/StartPage.vala:211
+msgid "Add a new patient"
+msgstr "Neuen Patienten hinzufügen"
+
+#: .././libclinica/PatientListPage.vala:87
+msgid "Remove the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:93
+msgid "Modify the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:99
+msgid "Edit visits of the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:105
+msgid "Schedule a visit with the selected patient"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:417
+#, c-format
+msgid "Trying to removing doctor with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:440
+#, c-format
+msgid "Trying to removing patient with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:463
+#, c-format
+msgid "Trying to removing visit with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:486
+#, c-format
+msgid "Trying to removing event with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/Builder.vala:45
+#, c-format
+msgid ""
+"Failed to load UI file: %s. Please check your installation.\n"
+"%s"
+msgstr ""
+"Fehler beim Laden der UI-Datei: %s. Bitte prüfen Sie Ihre Installation.\n"
+"%s"
+
+#: .././libclinica/LocalFileStore.vala:62
+#, c-format
+msgid "Unable to setup file monitors for the filestore folder: %s"
+msgstr ""
+"Kann die Datei-Überwachungen für den Speicher-Ordner nicht einrichten: %s"
+
+#: .././libclinica/LocalFileStore.vala:106
+#, c-format
+msgid "Unable to setup a file monitor on directory %s"
+msgstr "Kann die Datei-Überwachung für folgenden Ordner nicht einrichten: %s"
+
+#: .././libclinica/LocalFileStore.vala:141
+#, c-format
+msgid "Error while listing the files for the visit identified by id %d"
+msgstr "Fehler beim Auflisten der Dateien für den Besuch mit der ID %d"
+
+#: .././libclinica/LocalFileStore.vala:167
+msgid "Destination file already exists"
+msgstr "Zieldatei existiert bereits"
+
+#: .././libclinica/LocalFileStore.vala:172
+#, c-format
+msgid "Error while adding the file %s to the selected visit"
+msgstr "Fehler beim Hinzufügn der Datei %s für den ausgewählten Besuch."
+
+#: .././libclinica/NetworkedDataProvider.vala:246
+msgid ""
+"You canceled the authentication process on the remote server.\n"
+"From now on Clinica will use the local database. If you want to connect to\n"
+"remote server please re-enable networking in the settings dialog."
+msgstr ""
+
+#. Set title to edit patient * instead of create new patient
+#: .././libclinica/PatientEditor.vala:304
+#, c-format
+msgid "Edit patient named %s"
+msgstr "Patient mit dem Namen %s bearbeiten"
+
+#: .././libclinica/PatientEditor.vala:408
+msgid "You must select a doctor for this patient."
+msgstr "Sie müssen einen Arzt für diesen Patienten angeben."
+
+#: .././libclinica/PatientEditor.vala:409
+msgid ""
+"If you need to create a new one type his name in the entry and select Create "
+"new doctor from the completion list."
+msgstr ""
+"Wenn Sie einen neuen erstellen müssen, geben Sie seinen Namen in das "
+"Eingabefeld ein und wählen Neuen Arzt erstellen von der Fertigstellungsliste."
+
+#: .././libclinica/PatientEditor.vala:445
+msgid "Date inserted is invalid, aborting patient editing"
+msgstr "Eingegebenes Datum ist ungültig, Abbruch der Patentien-Bearbeitung"
+
+#: .././libclinica/AuthenticationDialog.vala:40
+msgid "Authentication required"
+msgstr ""
+
+#. Start of events
+#: .././libclinica/CalendarEventList.vala:73
+msgid "Events scheduled"
+msgstr "Geplante Ereignisse"
+
+#: .././libclinica/CalendarEventList.vala:92
+msgid ""
+"No events on this day.\n"
+"You can create a new event\n"
+"by clicking on the top-left button."
+msgstr ""
+"Keine Ereignisse an diesem Tag.\n"
+"Sie können ein neues Ereignis erstellen,\n"
+"indem Sie auf den Button ganz oben links klicken."
+
+#: .././libclinica/CalendarEventList.vala:103
+msgid "Visits performed"
+msgstr "Durchgeführte Besuche"
+
+#: .././libclinica/CalendarEventList.vala:105
+msgid "Visits scheduled"
+msgstr "Geplante Besuche"
+
+#: .././libclinica/CalendarEventList.vala:126
+msgid "No visits performed on this day"
+msgstr "Keine Besuche an diesem Tag durchgeführt"
+
+#: .././libclinica/ImportDialog.vala:40
+msgid "Import data from backup file"
+msgstr ""
+
+#: .././libclinica/PatientContextMenu.vala:57
+msgid "Edit visits"
+msgstr "Besuche bearbeiten"
+
+#. File menu
+#: .././libclinica/UIManager.vala:44
+msgid "_File"
+msgstr "_Datei"
+
+#: .././libclinica/UIManager.vala:45
+msgid "New _patient"
+msgstr "Neuer _Patient"
+
+#: .././libclinica/UIManager.vala:46
+msgid "Create a new patient"
+msgstr "Neuen Patient erstellen"
+
+#: .././libclinica/UIManager.vala:47
+msgid "New _doctor"
+msgstr "Neuer _Arzt"
+
+#: .././libclinica/UIManager.vala:48
+msgid "Create a new doctor"
+msgstr "Neuen Arzt erstellen"
+
+#: .././libclinica/UIManager.vala:49
+msgid "_Quit"
+msgstr "_Beenden"
+
+#: .././libclinica/UIManager.vala:50
+msgid "Quit clinica"
+msgstr "Clinica beenden"
+
+#. View menu
+#: .././libclinica/UIManager.vala:53
+msgid "_View"
+msgstr "_Anzeige"
+
+#: .././libclinica/UIManager.vala:54
+msgid "_Start page"
+msgstr "_Startseite"
+
+#: .././libclinica/UIManager.vala:55
+msgid "Go to the start page of clinica"
+msgstr "Zur Startseite von Clinica gehen"
+
+#: .././libclinica/UIManager.vala:56
+msgid "_Patients"
+msgstr "_Patienten"
+
+#: .././libclinica/UIManager.vala:57
+msgid "Go to the list of patients"
+msgstr "Zur Patientenliste gehen"
+
+#: .././libclinica/UIManager.vala:58
+msgid "_Doctors"
+msgstr "_Ärzte"
+
+#: .././libclinica/UIManager.vala:59
+msgid "Go to the list of doctors"
+msgstr "Zur Ärzteliste gehen"
+
+#: .././libclinica/UIManager.vala:60
+msgid "_Search medicines"
+msgstr "_Medikamente suchen"
+
+#: .././libclinica/UIManager.vala:61
+msgid "Search medicines online"
+msgstr "Medikamente online suchen"
+
+#. Tools menu
+#: .././libclinica/UIManager.vala:64
+msgid "_Tools"
+msgstr "_Werkzeuge"
+
+#: .././libclinica/UIManager.vala:65
+msgid "_Settings"
+msgstr "_Einstellungen"
+
+#: .././libclinica/UIManager.vala:66
+msgid "Customize clinica behaviour"
+msgstr "Verhalten von Clinica anpassen"
+
+#: .././libclinica/UIManager.vala:67
+msgid "Backup"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:68
+msgid "Backup clinica data to file"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:69
+msgid "Import"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:70
+msgid "Import data from backup files"
+msgstr ""
+
+#. Help menu
+#: .././libclinica/UIManager.vala:73
+msgid "_Help"
+msgstr "_Hilfe"
+
+#: .././libclinica/UIManager.vala:74
+msgid "_Contents"
+msgstr "_Inhalte"
+
+#: .././libclinica/UIManager.vala:75
+msgid "Open the help system"
+msgstr "Hilfesystem öffnen"
+
+#: .././libclinica/UIManager.vala:76
+msgid "_Report a bug"
+msgstr "_Einen Fehler melden"
+
+#: .././libclinica/UIManager.vala:77
+msgid "Report a bug online"
+msgstr "Einen Fehler online melden"
+
+#: .././libclinica/UIManager.vala:78
+msgid "_About"
+msgstr "_Über"
+
+#: .././libclinica/UIManager.vala:79
+msgid "Get to know the development team of Clinica"
+msgstr "Lernen Sie das Entwickler-Team von Clinica kennen"
+
+#: .././libclinica/BackupEngine.vala:113
+msgid "Please select a valid backup file"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:125
+msgid "Importing data"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:126
+msgid "Please wait while Clinica imports the data..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:129
+msgid "Importing the JSON data.."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:137
+msgid "Error while parsing the backup JSON data"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:143 .././libclinica/BackupEngine.vala:170
+msgid "An error occurred while parsing the JSON file"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:165
+msgid ""
+"The doctors, patients, visits and events field in the JSON backup should be "
+"arrays, aborting."
+msgstr ""
+
+#. Clear the database and put the data back in it
+#. in such a way that won't break relationships.
+#: .././libclinica/BackupEngine.vala:188
+msgid "Clearing the old data in the database..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:192
+msgid "Loading doctors..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:201
+#, c-format
+msgid "- %d doctors have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:203
+msgid "Loading patients..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:216
+#, c-format
+msgid "- %d patients have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:218
+msgid "Loading visits..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:231
+#, c-format
+msgid "- %d visits have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:233
+msgid "Loading events..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:249
+#, c-format
+msgid "- %d events have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:258
+msgid ""
+"- A FileStore was found but is not available in the current provider\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:283
+#, c-format
+msgid "- %d files have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:287
+msgid "- No FileStore was found in the backup\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:298
+msgid "The import of the data has been completed successfully"
+msgstr ""
+
+#: .././libclinica/PatientListStore.vala:128
+#: .././libclinica/PatientListStore.vala:150
+msgid ""
+"Patients database seems corrupted. This is likely to be a bug in the "
+"application"
+msgstr ""
+"Die Datenbank der Patienten scheint beschädigt zu sein. Dies ist "
+"wahrscheinlich ein Fehler in der Anwendung."
+
+#. Print the error message to stdout
+#: .././libclinica/Utils.vala:79
+msgid "ERROR => "
+msgstr "[31;1mERROR[0m => "
+
+#: .././libclinica/Utils.vala:83 .././libclinica/Utils.vala:84
+msgid "Clinica encountered an error"
+msgstr "Clinica ist auf einen Fehler gestoßen"
+
+#: .././libclinica/LocalMedicinesDatabase.vala:90
+#, c-format
+msgid "Medicine with id = %lld not found in DB: %s"
+msgstr ""
+
+#: .././libclinica/LocalMedicinesDatabase.vala:119
+#, c-format
+msgid "Error inserting medicine in the database: %s"
+msgstr ""
+
+#: .././libclinica/EventEditor.vala:93
+msgid "Create a new event"
+msgstr "Neues Ereignis erstellen"
+
+#: .././libclinica/EventEditor.vala:97
+#, c-format
+msgid "Editing event: %s"
+msgstr "Ereignis bearbeiten: %s"
+
+#. Create the entry for title of the event and venue
+#: .././libclinica/EventEditor.vala:115
+msgid "Title"
+msgstr "Bezeichnung"
+
+#: .././libclinica/EventEditor.vala:116
+msgid "Venue"
+msgstr "Ort"
+
+#: .././libclinica/EventEditor.vala:151
+msgid "Time:"
+msgstr "Zeit:"
+
+#: .././libclinica/EventEditor.vala:167
+msgid "Insert the description here..."
+msgstr "Geben Sie die Beschreibung hier ein..."
+
+#: .././libclinica/EventEditor.vala:205 .././libclinica/VisitToolbar.vala:96
+#, c-format
+msgid "Patient"
+msgstr "Patient"
+
+#: .././libclinica/EventEditor.vala:264
+msgid "Visit"
+msgstr "Besuch"
+
+#: .././libclinica/VisitListStore.vala:99
+msgid ""
+"Visit database seems corrupted. This is likely to be a bug in the application"
+msgstr ""
+"Die Datenbank der Besuche scheint beschädigt zu sein. Dies ist "
+"wahrscheinlich ein Fehler in der Anwendung."
+
+#: .././libclinica/MedicineSearchPage.vala:76
+#: .././data/resources/ui/start_page.glade.h:5
+msgid "Search medicines"
+msgstr "Suche Medikamente"
+
+#: .././libclinica/MedicineSearchPage.vala:100
+msgid "No search engine available"
+msgstr "Keine Suchmaschine verfügbar"
+
+#: .././libclinica/MedicineSearchPage.vala:108
+#, c-format
+msgid "Searching for %s..."
+msgstr "Suche nach %s…"
+
+#: .././libclinica/MedicineSearchPage.vala:133
+msgid "Medicines"
+msgstr ""
+
+#: .././libclinica/MedicineSearchPage.vala:96
+msgid "It's not possible to perform a search for medicine"
+msgstr "Es ist nicht möglich nach Medikamenten online zu suchen"
+
+#: .././libclinica/SqliteDataProvider.vala:143
+#, c-format
+msgid "Error creating some configuration files, check permission on %s"
+msgstr ""
+"Fehler beim Erstellen der Konfigurationsdateien, prüfen Sie die "
+"Berechtigungen für %s"
+
+#: .././libclinica/SqliteDataProvider.vala:151
+#, c-format
+msgid "Error reading some configuration files, check permission on %s"
+msgstr ""
+"Fehler beim Lesen der Konfigurationsdateien, prüfen Sie die Berechtigungen "
+"für %s"
+
+#: .././libclinica/SqliteDataProvider.vala:170
+#, c-format
+msgid "Failure while settings new database version to %s"
+msgstr "Fehler während des Einstellen der neuen Datenbank zu Version %s"
+
+#: .././libclinica/SqliteDataProvider.vala:173
+msgid "Failure while upgrading database"
+msgstr "Fehler während der Datenbank-Aktualisierung"
+
+#: .././libclinica/SqliteDataProvider.vala:177
+msgid "Version of the database is not compatible"
+msgstr "Datenbankversion ist nicht kompatibel"
+
+#: .././libclinica/SqliteDataProvider.vala:199
+msgid ""
+"This is a version of Clinica newer than the one that created the\n"
+"patients database installed on the system.\n"
+"Using this version requires upgrading the database, and\n"
+"<b>the old version will not be able to use it anymore</b>.\n"
+"Do you wish to perform this one-time upgrade?\n"
+msgstr ""
+"Dies ist eine neuere Version von Clinica, als die Version,  die\n"
+"die Patienendatenbank auf Ihrem System installiert hat.\n"
+"Um diese Version benutzen zu können, ist eine Aktualisierung der Datenbank "
+"nötig.\n"
+"<b>Die alte Version wird dann nicht mehr verwendbar sein.</b>\n"
+"Möchten Sie die einmalige Aktualisierung durchführen?\n"
+
+#: .././libclinica/SqliteDataProvider.vala:200
+msgid "Upgrade database"
+msgstr "Datenbank aktualisieren"
+
+#: .././libclinica/SqliteDataProvider.vala:225
+msgid "Database needs to be moved"
+msgstr "Datenbank muss verschoben werden"
+
+#: .././libclinica/SqliteDataProvider.vala:226
+msgid ""
+"An older version of clinica has been detected and the old database has to be "
+"moved\n"
+"to a new location to continue.\n"
+"<b>The older version of clinica won't work anymore with this setup</b>.\n"
+"Do you still want to continue?"
+msgstr ""
+"Eine ältere Version von Clinica wurde erkannt und die alte Datenbank muss an "
+"eine\n"
+"andere Position verschoben werden, um fortzusetzen.\n"
+"<b>Die ältere Version von Clinica wird mit diesem Setup nicht mehr "
+"funktionieren.</b>\n"
+"Möchten Sie immer noch fortsetzen?"
+
+#: .././libclinica/SqliteDataProvider.vala:239
+msgid ""
+"Error while transferring the database to the new default location for "
+"clinica >= 0.2.9"
+msgstr ""
+"Fehler während der Übertragung der Datenbank zur neuen Standardspeicherort "
+"von Clinica >= 0.2.9"
+
+#: .././libclinica/SqliteDataProvider.vala:251
+msgid "Error upgrading database, please check your installation"
+msgstr ""
+"Fehler bei der Datenbank-Aktualisierung, bitte prüfen Sie Ihre Installation"
+
+#: .././libclinica/SqliteDataProvider.vala:266
+#, c-format
+msgid ""
+"Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:359
+#, c-format
+msgid "Error while retrieving the doctor with id = %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:399
+#, c-format
+msgid "An error occurred while saving the doctor with id %d: %s"
+msgstr "Fehler beim Speichern des Arztes mit der ID %d: %s"
+
+#: .././libclinica/SqliteDataProvider.vala:468
+#, c-format
+msgid "Error while retrieving the patient with id = %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:517
+#: .././libclinica/SqliteDataProvider.vala:652
+#, c-format
+msgid "An error occurred while saving the doctor with id %s: %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:597
+#, c-format
+msgid "Error while retrieving the visit with id = %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:686
+#, c-format
+msgid "Error while retrieving the event with id = %d"
+msgstr "Fehler beim Abrufen des Ereignisses mit der ID = %d"
+
+#: .././libclinica/SqliteDataProvider.vala:728
+#, c-format
+msgid "An error occurred while saving the event with id %s: %s"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:40
+msgid "Clinica settings"
+msgstr "Clinica Einstellungen"
+
+#: .././libclinica/SettingsManager.vala:52
+msgid "Clinica has been built without plugins support"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:135
+msgid "Please use the Network tab to enable the Networked data provider"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:136
+msgid "Use the Network tab"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Disconnect"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Connect"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:191
+#, c-format
+msgid "Connection to the given host failed. Please check your settings."
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:192
+msgid "Connection failed"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:206
+#: .././libclinica/ResourceManager.vala:284
+#, c-format
+msgid "Username or password are wrong. Disconnecting from the server."
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:207
+msgid "Wrong authentication data has been provided"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:60
+msgid "Edit details of patient"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:67
+msgid "Remove this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:74
+msgid "Export this visit as PDF"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:81
+msgid "Print a report of this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:88
+msgid "Save this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:99
+msgid "Close the visits of this patient"
+msgstr ""
+
+#: .././libclinica/VisitToolbar.vala:93
+msgid "This patient has not a doctor"
+msgstr "Dieser Patient hat keinen Arzt"
+
+#: .././libclinica/VisitToolbar.vala:97
+msgid "Doctor"
+msgstr ""
+
+#: .././libclinica/DateTimePicker.vala:56
+msgid "Hour"
+msgstr "Stunde"
+
+#: .././libclinica/DateTimePicker.vala:58
+msgid "Minute"
+msgstr "Minute(n)"
+
+#: .././libclinica/DoctorListStore.vala:75
+msgid "Doctors database seems corrupted."
+msgstr "Arzt-Datenbank scheint beschädigt zu sein."
+
+#: .././libclinica/DoctorListView.vala:175
+msgid "Select a doctor to delete it!"
+msgstr "Wählen Sie ein Arzt zum Löschen aus!"
+
+#: .././libclinica/DoctorListView.vala:186
+msgid ""
+"The doctor that you have selected for removal has some patients associated. "
+"\n"
+msgstr ""
+"Der Arzt den Sie zum Löschen ausgewählt haben, sind noch einige Patienten "
+"zugeordnet. \n"
+
+#: .././libclinica/DoctorListView.vala:187
+msgid ""
+"It's not possible to remove it without disassociating all his patients.\n"
+"\n"
+msgstr ""
+"Das Löschen ist nicht möglich, ohne die Zuordnungen alle seiner Patienten "
+"aufzuheben.\n"
+"\n"
+
+#: .././libclinica/DoctorListView.vala:188
+#: .././libclinica/DoctorListView.vala:217
+msgid "Do you really want to proceed?"
+msgstr "Möchten Sie wirklich fortfahren?"
+
+#: .././libclinica/DoctorListView.vala:189
+msgid "Doctor has associated patients"
+msgstr "Arzt hat zugeordnete Patienten"
+
+#: .././libclinica/DoctorListView.vala:215
+msgid ""
+"The following patients will be disassociated from this doctor by this "
+"action:\n"
+msgstr ""
+"Die folgenden Patienten-Zuordnungen werden beim Durchführen dieser Aktion "
+"vom Arzt aufgehoben:\n"
+
+#: .././libclinica/DoctorListView.vala:218
+msgid "Confirm disassociation of patients"
+msgstr "Aufhebung der Patienten-Zuordnung bestätigen"
+
+#: .././libclinica/DoctorListView.vala:235
+msgid ""
+"Really delete this doctor? All information about him/her will be lost."
+msgstr ""
+"Möchten Sie den Arzt wirklich löschen? Alle Informationen über ihn/sie gehen "
+"verloren."
+
+#. Ask the user where he would like to backup its files.
+#: .././libclinica/UserInterface.vala:360
+msgid "Select the folder where the data should be saved"
+msgstr ""
+
+#. In this string %s refers to the path where the backup has been performed.
+#: .././libclinica/UserInterface.vala:386
+#, c-format
+msgid "Backup completed successfully in the folder %s"
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:387
+msgid "Backup completed"
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:389
+msgid ""
+"Please take care of copying the folder in a safe place for future restore of "
+"the data."
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:416
+#, c-format
+msgid "Cannot open the help: %s"
+msgstr "Kan Hilfe nicht öffnen: %s"
+
+#: .././libclinica/UserInterface.vala:441
+msgid ""
+"An error occurred while opening the bug system. Please go to\n"
+"http://launchpad.net/clinica-project/ to file a bug"
+msgstr ""
+"Ein Fehler beim Öffnen des Bug-Systems aufgetreten. Bitte gehen Sie zu\n"
+"http://launchpad.net/clinica-project/ um einen Bug zu melden"
+
+#: .././libclinica/EventDetail.vala:65
+msgid "Edit event"
+msgstr "Ereignis bearbeiten"
+
+#: .././libclinica/EventDetail.vala:112
+msgid "Remove"
+msgstr "Löschen"
+
+#: .././libclinica/EventDetail.vala:145
+msgid "Really delete this event?"
+msgstr "Möchten Sie das Ereignis wirklich löschen?"
+
+#: .././libclinica/Sidebar.vala:68
+msgid "Pages"
+msgstr ""
+
+#: .././libclinica/StartPage.vala:93
+msgid "Dashboard"
+msgstr ""
+
+#: .././libclinica/StartPage.vala:205
+msgid ""
+"Add a new patient \n"
+" with name "
+msgstr ""
+"Hinzufügen eines Patienten \n"
+" mit dem Namen "
+
+#: .././libclinica/EventListStore.vala:121
+msgid ""
+"Events database seems corrupted. This is likely to be a bug in the "
+"application"
+msgstr ""
+"Die Ereignis-Datenbank scheint beschädigt zu sein. Dies ist wahrscheinlich "
+"ein Fehler in der Anwendung."
+
+#: .././libclinica/DoctorListPage.vala:60
+#: .././libclinica/DoctorListPage.vala:93
+msgid "Doctors"
+msgstr "Ärzte"
+
+#: .././libclinica/DoctorListPage.vala:76
+msgid "Add a doctor"
+msgstr ""
+
+#: .././libclinica/DoctorListPage.vala:82
+msgid "Edit the selected doctor"
+msgstr ""
+
+#: .././libclinica/DoctorListPage.vala:88
+msgid "Remove the selected doctor"
+msgstr ""
+
+#: .././libclinica/ResourceManager.vala:285
+msgid "Error while authenticating on the server"
+msgstr ""
+
+#: .././libclinica/AboutDialog.vala:41
+msgid "Medical records manager"
+msgstr "Medizinische Aufnahmeverwaltung"
+
+#: .././libclinica/AboutDialog.vala:43
+msgid "About Clinica"
+msgstr "Über Clinica"
+
+#: .././libclinica/AboutDialog.vala:52
+msgid "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+msgstr "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+
+#: .././libclinica/AboutDialog.vala:53
+msgid "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+msgstr "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+
+#. Histopathology
+#: .././libclinica/VisitPrinter.vala:122
+msgid "Histopathology"
+msgstr "Histopathologie"
+
+#. Now write the date of the visit after that
+#: .././libclinica/VisitPrinter.vala:285
+#, c-format
+msgid "Report of the visit of %s"
+msgstr ""
+
+#: .././libclinica/VisitPrinter.vala:316
+#: .././libclinica/MedicineDetailDialog.vala:109
+msgid "Field empty"
+msgstr "Feld leer"
+
+#. Add a Attach button
+#: .././libclinica/VisitFileManager.vala:89
+msgid "Attach file"
+msgstr "Datei anhängen"
+
+#: .././libclinica/VisitFileManager.vala:97
+msgid "Browse files"
+msgstr "Dateien durchsuchen"
+
+#: .././libclinica/VisitFileManager.vala:113
+msgid "Select a file to attach"
+msgstr "Datei zum Anhängen auswählen"
+
+#: .././libclinica/VisitFileManager.vala:133
+msgid "Unable to open the browser on the filestore position"
+msgstr "Kann den Datei-Browser am Speicherort nicht öffnen"
+
+#: .././libclinica/VisitFileManager.vala:163
+msgid ""
+"Save the visit\n"
+" to attach files"
+msgstr ""
+"Den Besuch speichern\n"
+" um Dateien anzuhängen"
+
+#: .././libclinica/VisitFileManager.vala:170
+msgid "Attach files"
+msgstr "Dateien anhängen"
+
+#: .././libclinica/SidebarCalendarEntry.vala:30
+msgid "Calendar"
+msgstr ""
+
+#. Create the object and add the close button used
+#. * to dismiss the dialog
+#: .././libclinica/MedicineDetailDialog.vala:46
+msgid "Close"
+msgstr "Schließen"
+
+#: .././libclinica/MedicineDetailDialog.vala:65
+msgid "General information"
+msgstr "Allgemeine Informationen"
+
+#. And now the content for the others fields of the medicine
+#: .././libclinica/MedicineDetailDialog.vala:71
+msgid "Identification Code"
+msgstr "Indentificationscode"
+
+#: .././libclinica/MedicineDetailDialog.vala:72
+msgid "Description"
+msgstr "Beschreibung"
+
+#: .././libclinica/MedicineDetailDialog.vala:73
+msgid "Active ingredient"
+msgstr "Wirkstoff"
+
+#: .././libclinica/MedicineDetailDialog.vala:74
+msgid "Storage reccomendations"
+msgstr "Empfehlungen für die Lagerung"
+
+#: .././libclinica/MedicineDetailDialog.vala:83
+msgid "Additional notes"
+msgstr "Zusätzliche Angaben"
+
+#. Nothing to do for now.
+#: .././libclinica/FileDetail.vala:89
+#, c-format
+msgid "Error while loading icon for file %s: %s"
+msgstr "Fehler beim Laden des Icons für die Datei  %s: %s"
+
+#: .././libclinica/FileDetail.vala:98
+msgid "Open file"
+msgstr "Datei öffnen"
+
+#: .././libclinica/FileDetail.vala:110
+msgid "Delete file"
+msgstr "Datei löschen"
+
+#: .././libclinica/FileDetail.vala:122
+#, c-format
+msgid ""
+"Do you really want to delete the file %s?\n"
+"If you proceed it will be definitively lost."
+msgstr ""
+"Möchten Sie die Datei %s wirklich löschen?\n"
+"Wenn Sie fortfahren, ist sie endgültig verloren."
+
+#: .././libclinica/FileDetail.vala:135
+#, c-format
+msgid "Error while opening the file %s"
+msgstr "Fehler beim Öffnen der Datei %s"
+
+#: .././data/resources/ui/start_page.glade.h:1
+msgid "Browse the patients to start a visit"
+msgstr "Durchsuchen Sie die Patienten, um einen Besuch zu starten"
+
+#: .././data/resources/ui/start_page.glade.h:2
+msgid "Add new patient"
+msgstr "Neuen Patienten hinzufügen"
+
+#: .././data/resources/ui/start_page.glade.h:3
+msgid "Patient list"
+msgstr "Patienten-Liste"
+
+#: .././data/resources/ui/start_page.glade.h:4
+msgid "Doctor list"
+msgstr "Arzt-Liste"
+
+#: .././data/resources/ui/start_page.glade.h:6
+msgid "Open calendar"
+msgstr "Kalender öffnen"
+
+#: .././data/resources/ui/authentication_dialog.glade.h:1
+msgid "The server requires authentication. Please insert your credentials:"
+msgstr ""
+
+#: .././data/resources/ui/authentication_dialog.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:11
+msgid "Username"
+msgstr ""
+
+#: .././data/resources/ui/authentication_dialog.glade.h:3
+#: .././data/resources/ui/settings_window.glade.h:12
+msgid "Password"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:1
+msgid "Name:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:2
+msgid "Description:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:3
+msgid "Active ingredient:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:4
+msgid "Storage reccomendations:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:5
+msgid "Price:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:6
+msgid "Other notes:"
+msgstr ""
+
+#: .././data/resources/ui/import_dialog.glade.h:1
+msgid "Source:\t"
+msgstr ""
+
+#: .././data/resources/ui/import_dialog.glade.h:2
+msgid "Select the backup folder"
+msgstr ""
+
+#: .././data/resources/ui/import_dialog.glade.h:3
+msgid ""
+"<b>Warning:</b> Please note that the current data in the database <b>will be "
+"definitely lost</b>. Consider performing a backup of the current data before "
+"importing the old one."
+msgstr ""
+
+#: .././data/resources/ui/doctor_editor.glade.h:1
+#: .././data/resources/ui/patient_editor.glade.h:12
+msgid "Doctor:"
+msgstr "Arzt:"
+
+#: .././data/resources/ui/doctor_editor.glade.h:4
+#: .././data/resources/ui/patient_editor.glade.h:11
+msgid "Phone:"
+msgstr "Telefon:"
+
+#: .././data/resources/ui/doctor_editor.glade.h:5
+msgid "Mobile:"
+msgstr "Mobil:"
+
+#: .././data/resources/ui/wait_dialog.glade.h:1
+msgid "label"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:1
+msgid "Use plugins (restart required)"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:2
+msgid "Allow to browse files in visits"
+msgstr "Durchsuchen von Dateien in Besuchen erlauben"
+
+#: .././data/resources/ui/settings_window.glade.h:3
+msgid "Medicines search engine"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:4
+msgid "Data source"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:5
+msgid "General"
+msgstr "Allgemein"
+
+#: .././data/resources/ui/settings_window.glade.h:6
+msgid "Host"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:7
+msgid "Port"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:8
+msgid "button"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:9
+msgid "Connection to a remote Clinica instance"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:10
+msgid "Allow connections of other clinica from the LAN"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:13
+msgid "Built-in server"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:14
+msgid "Network"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:15
+msgid ""
+"The details that are inserted here will be used when generating\n"
+"the automatic visit reports. "
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:18
+msgid "Address"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:19
+msgid "Institution"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:20
+msgid "Email"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:21
+msgid "Personal details"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:22
+msgid "Plugins"
+msgstr "Plugins"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:1
+msgid "Visits"
+msgstr "Besuche"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:2
+msgid "Schedule a visit"
+msgstr ""
+
+#: .././data/resources/ui/patient_editor.glade.h:1
+msgid "Patient:"
+msgstr "Patient:"
+
+#: .././data/resources/ui/patient_editor.glade.h:4
+msgid "Gender:"
+msgstr "Geschlecht:"
+
+#: .././data/resources/ui/patient_editor.glade.h:5
+msgid "Date of birth:"
+msgstr "Geburtsdatum:"
+
+#: .././data/resources/ui/patient_editor.glade.h:6
+msgid "dd"
+msgstr "TT"
+
+#: .././data/resources/ui/patient_editor.glade.h:7
+msgid "/"
+msgstr "."
+
+#: .././data/resources/ui/patient_editor.glade.h:8
+msgid "mm"
+msgstr "MM"
+
+#: .././data/resources/ui/patient_editor.glade.h:9
+msgid "yyyy"
+msgstr "JJJJ"
+
+#: .././data/resources/ui/patient_editor.glade.h:10
+msgid "Address:"
+msgstr "Adresse:"
+
+#: .././data/resources/ui/patient_editor.glade.h:13
+msgid "Codice fiscale:"
+msgstr "Steuernummer:"
+
+#: .././data/resources/ui/patient_editor.glade.h:14
+msgid "Male"
+msgstr "männlich"
+
+#: .././data/resources/ui/patient_editor.glade.h:15
+msgid "Female"
+msgstr "weiblich"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:1
+msgid "Select the date on which you'd like to schedule the visit."
+msgstr ""
+
+#: .././data/resources/ui/visit_scheduler.glade.h:2
+msgid "Selected patient"
+msgstr ""
+
+#: .././data/resources/ui/visit_scheduler.glade.h:3
+msgid ""
+"<b>Tip:</b> Once created this visit will be visible in the visit editor of "
+"this patient."
+msgstr ""
+
+#, c-format
+#~ msgid "Visits of the patient %s"
+#~ msgstr "Besuche des Patienten: %s"
+
+#~ msgid "Medicine search"
+#~ msgstr "Suche nach Medikamenten"
+
+#~ msgid "Stop"
+#~ msgstr "Anhalten"
+
+#~ msgid ""
+#~ "Select the search engine\n"
+#~ "used to find medicines"
+#~ msgstr ""
+#~ "Wählen Sie die Suchmaschine aus,\n"
+#~ "um Medikament zu finden"
+
+#~ msgid "Edit patient details"
+#~ msgstr "Patienten-Details bearbeiten"
+
+#~ msgid "Save as PDF"
+#~ msgstr "Speichern als PDF"
+
+#~ msgid "Use plugins (need restart)"
+#~ msgstr "Plugins benutzen (Neustart erforderlich)"
+
+#, c-format
+#~ msgid ""
+#~ "Patient: <b>%s</b>\n"
+#~ "Doctor: <b>%s</b>"
+#~ msgstr ""
+#~ "Patient: <b>%s</b>\n"
+#~ "Arzt:  <b>%s</b>"
+
+#~ msgid ""
+#~ "You cannot delete a doctor with associated patients. Delete his patients "
+#~ "first."
+#~ msgstr ""
+#~ "Sie können keinen Arzt löschen, dem Patienten zugeordnet sind. Löschen Sie "
+#~ "zuerst dessen Patienten."
+
+#~ msgid "New Doctor"
+#~ msgstr "Neuer Arzt"
+
+#~ msgid ""
+#~ "It's not possible to remove it without removing all his patients.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Er kann nicht entfernt werden, ohne auch alle seine Patienten zu löschen.\n"
+#~ "\n"
+
+#~ msgid "Back"
+#~ msgstr "Zurück"
+
+#~ msgid "New Patient"
+#~ msgstr "Neuer Patient"
+
+#~ msgid "Confirm deletion of patients"
+#~ msgstr "Löschen von Patienten bestätigen"
+
+#~ msgid "The following patients will be deleted by this action:\n"
+#~ msgstr "Folgende Patienten werden durch diese Aktion gelöscht:\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Launchpad contributions: \n"
+#~ msgstr ""
+#~ "\n"
+#~ "Mitwirkende via Launchpad: \n"
+
+#~ msgid "Clinica"
+#~ msgstr "Clinica"
+
+#, c-format
+#~ msgid ""
+#~ "Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %d"
+#~ msgstr ""
+#~ "Fehler beim Aktualisieren der Datenbank von Version 0.1 auf 0.2. Sqlite-Exit-"
+#~ "Code: %d"
+
+#~ msgid "Error loading patient_editor.glade."
+#~ msgstr "Fehler beim Laden von patient_editor.glade."
+
+#~ msgid "_Home"
+#~ msgstr "_Startseite"
diff --git a/po/el.po b/po/el.po
new file mode 100644
index 0000000..cf45311
--- /dev/null
+++ b/po/el.po
@@ -0,0 +1,1450 @@
+# Greek translation for clinica-project
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the clinica-project package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: clinica-project\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-04-18 10:23+0200\n"
+"PO-Revision-Date: 2012-10-30 10:16+0000\n"
+"Last-Translator: greg tsagournos <gregtsag at otenet.gr>\n"
+"Language-Team: Greek <el at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-05-18 05:44+0000\n"
+"X-Generator: Launchpad (build 16626)\n"
+"Language: el\n"
+
+#: .././plugins/AgenziaDelFarmaco.py:166
+msgid "Dosage form"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:167
+msgid "System of supply"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:168
+msgid "Class of eligibility"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:169
+msgid "Firm"
+msgstr ""
+
+#. Title of edit doctor dialog
+#: .././libclinica/DoctorEditor.vala:88
+#, c-format
+msgid "Edit doctor named %s"
+msgstr "Επεξεργασία Ονόματος Γιατρού %s"
+
+#: .././libclinica/PatientLens.vala:37
+msgid "Search for patients"
+msgstr "Αναζήτηση Ασθενή"
+
+#: .././libclinica/PatientLens.vala:43
+msgid "Recently visited patients"
+msgstr "Πρόσφατες Επισκέψεις σε Ασθενείς"
+
+#. Create the SidebarEntry
+#: .././libclinica/PatientLens.vala:47 .././libclinica/PatientListPage.vala:64
+#: .././libclinica/PatientListPage.vala:110
+msgid "Patients"
+msgstr "Ασθενείς"
+
+#: .././libclinica/PatientListView.vala:76
+#: .././libclinica/DoctorListView.vala:51
+#: .././data/resources/ui/doctor_editor.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:17
+#: .././data/resources/ui/patient_editor.glade.h:2
+msgid "Name"
+msgstr "Όνομα"
+
+#. ...and then the surname column
+#: .././libclinica/PatientListView.vala:80
+#: .././libclinica/DoctorListView.vala:56
+#: .././data/resources/ui/doctor_editor.glade.h:3
+#: .././data/resources/ui/patient_editor.glade.h:3
+msgid "Surname"
+msgstr "Επώνυμο"
+
+#: .././libclinica/PatientListView.vala:165
+msgid "Select a patient to delete it!"
+msgstr "Διάλεξε τον Ασθενή που θέλεις να σβήσεις"
+
+#: .././libclinica/PatientListView.vala:172
+msgid ""
+"Really delete this patient? All information about him/her and the associated "
+"visits will be lost."
+msgstr ""
+"Είσαι σίγουρος ότι θέλεις να σβήσεις τον Ασθενή . Όλα τα δεδομένα που τον "
+"αφορούν θα χαθούν."
+
+#. Set title according to the patient that we have loaded and connect
+#. * show startup signal to the focusing of the first field in the visit
+#: .././libclinica/VisitPage.vala:63
+#, c-format
+msgid "Visit of the patient %s"
+msgstr "Επίσκεψη στον Ασθενή %s"
+
+#: .././libclinica/PluginManager.vala:35
+msgid ""
+"Clinica is extensible via plugins and you can easily enable\n"
+" and disable them using this window."
+msgstr ""
+"Το Clinica  είναι επεκτάσιμο με προσθήκες που μπορείς να ενεργοποιήσεις "
+"εύκολα\n"
+"Μπορείς να απενεργοποιήσεις τις προσθήκες από αυτό το παράθυρο."
+
+#: .././libclinica/VisitSchedulerDialog.vala:60
+#: .././libclinica/VisitSchedulerDialog.vala:76
+msgid "Patient not selected"
+msgstr "Δεν έχει επιλεχθεί Ασθενής"
+
+#: .././libclinica/VisitSchedulerDialog.vala:72
+#, c-format
+msgid "Schedule a vist for the patient %s"
+msgstr "Προγραμμάτισε Επίσκεψη στον Ασθενή %s"
+
+#: .././libclinica/Application.vala:113
+#, c-format
+msgid "Option parsing failed: %s\n"
+msgstr "Αποτυχία ανάλυσης : %s\n"
+
+#: .././libclinica/Application.vala:148
+#, c-format
+msgid "Clinica %s\n"
+msgstr "Clinica %s\n"
+
+#. Then add add a new visit and keep a reference to new_page
+#. *  to focus it on page loading.
+#. Create a new one and connect it
+#: .././libclinica/VisitBrowser.vala:73 .././libclinica/VisitBrowser.vala:252
+msgid "New visit"
+msgstr "Νέα Επίσκεψη"
+
+#: .././libclinica/VisitBrowser.vala:152 .././libclinica/VisitBrowser.vala:209
+msgid ""
+"A visit need to be saved in order to be exported as PDF.\n"
+"Do you want to save the visit now?"
+msgstr "Η Επίσκεψη πρέπει να αποθηκευθεί  προκειμένου να εξαχθεί ως PDF."
+
+#: .././libclinica/VisitBrowser.vala:196
+msgid "Error while delivering the print operation"
+msgstr ""
+
+#: .././libclinica/VisitDetail.vala:70
+msgid "Edit visit"
+msgstr "Επεξεργασία Επίσκεψης"
+
+#: .././libclinica/VisitDetail.vala:80 .././libclinica/EventDetail.vala:75
+msgid "Delete event"
+msgstr "Διαγραφή γεγονότος"
+
+#: .././libclinica/VisitDetail.vala:104
+msgid "Show details"
+msgstr "Προβολή λεπτομεριών"
+
+#: .././libclinica/VisitDetail.vala:125 .././libclinica/VisitTab.vala:269
+msgid ""
+"Deleting a visit will cause all its data to be lost.\n"
+"Do you really want to continue?"
+msgstr ""
+"Διαγραφή Επίσκεψης ! Όλα της τα δεδομένα θα χαθούν !\n"
+"Θέλεις να συνεχίσεις ?"
+
+#. Create menu items, connect them to their callback
+#. * and add it to the menu
+#: .././libclinica/DoctorContextMenu.vala:58
+#: .././libclinica/PatientContextMenu.vala:54
+msgid "Delete"
+msgstr "Διαγραφή"
+
+#. Instantiate menu items
+#: .././libclinica/DoctorContextMenu.vala:59
+#: .././libclinica/PatientContextMenu.vala:51
+#: .././libclinica/EventDetail.vala:111
+msgid "Edit"
+msgstr "Επεξεργασία"
+
+#: .././libclinica/MedicineEditor.vala:41
+msgid "Create a new Medicine"
+msgstr ""
+
+#: .././libclinica/CalendarWindow.vala:36
+msgid "Clinica calendar"
+msgstr "Ημερολόγιο"
+
+#. Anamnesis
+#: .././libclinica/VisitTab.vala:286 .././libclinica/VisitPrinter.vala:107
+msgid "Anamnesis"
+msgstr "Ιστορικό Ασθενούς"
+
+#. Physical examination
+#: .././libclinica/VisitTab.vala:289 .././libclinica/VisitPrinter.vala:112
+msgid "Physical examination"
+msgstr "Κλινική εξέταση"
+
+#. Laboratory Exam
+#: .././libclinica/VisitTab.vala:292 .././libclinica/VisitPrinter.vala:117
+msgid "Laboratory exam"
+msgstr "Εργαστηριακές εξετάσεις"
+
+#: .././libclinica/VisitTab.vala:295
+msgid "Hystopathology"
+msgstr "Ιστοπαθολογία"
+
+#. Diagnosis
+#: .././libclinica/VisitTab.vala:298 .././libclinica/VisitPrinter.vala:127
+msgid "Diagnosis"
+msgstr "Διάγνωση"
+
+#. Topical therapy
+#: .././libclinica/VisitTab.vala:301 .././libclinica/VisitPrinter.vala:132
+msgid "Topical therapy"
+msgstr "Τοπική θεραπεία"
+
+#. Systemic therapy
+#: .././libclinica/VisitTab.vala:304 .././libclinica/VisitPrinter.vala:137
+msgid "Systemic therapy"
+msgstr "Συστηματική θεραπεία"
+
+#. Subsequent checks
+#: .././libclinica/VisitTab.vala:307 .././libclinica/VisitPrinter.vala:142
+msgid "Subsequent checks"
+msgstr "Μεταγενέστεροι έλεγχοι"
+
+#: .././libclinica/MedicineTreeView.vala:37
+msgid "Medicine name"
+msgstr ""
+
+#: .././libclinica/MedicineTreeView.vala:40
+#: .././libclinica/MedicineDetailDialog.vala:75
+msgid "Price"
+msgstr "Τιμή"
+
+#: .././libclinica/PatientListPage.vala:81 .././libclinica/StartPage.vala:211
+msgid "Add a new patient"
+msgstr "Καινούργιος Ασθενής"
+
+#: .././libclinica/PatientListPage.vala:87
+msgid "Remove the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:93
+msgid "Modify the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:99
+msgid "Edit visits of the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:105
+msgid "Schedule a visit with the selected patient"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:417
+#, c-format
+msgid "Trying to removing doctor with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:440
+#, c-format
+msgid "Trying to removing patient with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:463
+#, c-format
+msgid "Trying to removing visit with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:486
+#, c-format
+msgid "Trying to removing event with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/Builder.vala:45
+#, c-format
+msgid ""
+"Failed to load UI file: %s. Please check your installation.\n"
+"%s"
+msgstr ""
+"Αποτυχία Φόρτωσης του UI αρχείου: %s . Ελέγξετε την εγκατάσταση σας. \n"
+"%s"
+
+#: .././libclinica/LocalFileStore.vala:62
+#, c-format
+msgid "Unable to setup file monitors for the filestore folder: %s"
+msgstr "Αδυναμία δημιουργίας Φακέλου : %s"
+
+#: .././libclinica/LocalFileStore.vala:106
+#, c-format
+msgid "Unable to setup a file monitor on directory %s"
+msgstr "Αδυναμία δημιουργίας Αρχείου στο Φάκελο : %s"
+
+#: .././libclinica/LocalFileStore.vala:141
+#, c-format
+msgid "Error while listing the files for the visit identified by id %d"
+msgstr "ΣΦΑΛΜΑ κατά την δημιουργία των αρχείων  της Επίσκεψης με id %d"
+
+#: .././libclinica/LocalFileStore.vala:167
+msgid "Destination file already exists"
+msgstr "Ο φάκελος προορισμού υπάρχει ΗΔΗ"
+
+#: .././libclinica/LocalFileStore.vala:172
+#, c-format
+msgid "Error while adding the file %s to the selected visit"
+msgstr "ΣΦΑΛΜΑ κατά την δημιουργία του αρχείου %s στην επιλεγμένη Επίσκεψη"
+
+#: .././libclinica/NetworkedDataProvider.vala:246
+msgid ""
+"You canceled the authentication process on the remote server.\n"
+"From now on Clinica will use the local database. If you want to connect to\n"
+"remote server please re-enable networking in the settings dialog."
+msgstr ""
+
+#. Set title to edit patient * instead of create new patient
+#: .././libclinica/PatientEditor.vala:304
+#, c-format
+msgid "Edit patient named %s"
+msgstr "Επεξεργασία του Ασθενή %s"
+
+#: .././libclinica/PatientEditor.vala:408
+msgid "You must select a doctor for this patient."
+msgstr "Επιλογή Γιατρού για τον Ασθενή"
+
+#: .././libclinica/PatientEditor.vala:409
+msgid ""
+"If you need to create a new one type his name in the entry and select Create "
+"new doctor from the completion list."
+msgstr ""
+"Εισαγωγή νέου Γιατρού. Πληκτρολογήστε το Όνομά του και Επιλέξτε \"Δημιουργία "
+"νέου Γιατρού\""
+
+#: .././libclinica/PatientEditor.vala:445
+msgid "Date inserted is invalid, aborting patient editing"
+msgstr "Λάθος Ημερομηνία"
+
+#: .././libclinica/AuthenticationDialog.vala:40
+msgid "Authentication required"
+msgstr ""
+
+#. Start of events
+#: .././libclinica/CalendarEventList.vala:73
+msgid "Events scheduled"
+msgstr "Προγραμματισμένες Εργασίες"
+
+#: .././libclinica/CalendarEventList.vala:92
+msgid ""
+"No events on this day.\n"
+"You can create a new event\n"
+"by clicking on the top-left button."
+msgstr ""
+"Δεν υπάρχουν Εργασίες την συγκεκριμένη ημέρα.\n"
+"Μπορείς να δημιουργήσεις νέα Εργασία \n"
+"πατώντας το κουμπί πάνω-αριστερά"
+
+#: .././libclinica/CalendarEventList.vala:103
+msgid "Visits performed"
+msgstr "Επισκέψεις που έχουν Πραγματοποιηθεί"
+
+#: .././libclinica/CalendarEventList.vala:105
+msgid "Visits scheduled"
+msgstr "Προγραμματισμένες Επισκέψεις"
+
+#: .././libclinica/CalendarEventList.vala:126
+msgid "No visits performed on this day"
+msgstr "Δεν έγινε καμία Επίσκεψη την συγκεκριμένη ημέρα"
+
+#: .././libclinica/ImportDialog.vala:40
+msgid "Import data from backup file"
+msgstr ""
+
+#: .././libclinica/PatientContextMenu.vala:57
+msgid "Edit visits"
+msgstr "Επεξεργασία Επισκέψεων"
+
+#. File menu
+#: .././libclinica/UIManager.vala:44
+msgid "_File"
+msgstr "_Αρχείο"
+
+#: .././libclinica/UIManager.vala:45
+msgid "New _patient"
+msgstr "Νέος _Ασθενής"
+
+#: .././libclinica/UIManager.vala:46
+msgid "Create a new patient"
+msgstr "Δημιουργία Νέου Ασθενή"
+
+#: .././libclinica/UIManager.vala:47
+msgid "New _doctor"
+msgstr "Νέος _Γιατρός"
+
+#: .././libclinica/UIManager.vala:48
+msgid "Create a new doctor"
+msgstr "Δημιουργία Νεου Γιατρού"
+
+#: .././libclinica/UIManager.vala:49
+msgid "_Quit"
+msgstr "Έξοδος"
+
+#: .././libclinica/UIManager.vala:50
+msgid "Quit clinica"
+msgstr "Έξοδος από το Clinica"
+
+#. View menu
+#: .././libclinica/UIManager.vala:53
+msgid "_View"
+msgstr "_Προβολή"
+
+#: .././libclinica/UIManager.vala:54
+msgid "_Start page"
+msgstr "_Αρχική σελίδα"
+
+#: .././libclinica/UIManager.vala:55
+msgid "Go to the start page of clinica"
+msgstr "Επιστροφή στην Αρχική σελίδα"
+
+#: .././libclinica/UIManager.vala:56
+msgid "_Patients"
+msgstr "_Ασθενείς"
+
+#: .././libclinica/UIManager.vala:57
+msgid "Go to the list of patients"
+msgstr "Λίστα Ασθενών"
+
+#: .././libclinica/UIManager.vala:58
+msgid "_Doctors"
+msgstr "_Γιατροί"
+
+#: .././libclinica/UIManager.vala:59
+msgid "Go to the list of doctors"
+msgstr "Λίστα Γιατρών"
+
+#: .././libclinica/UIManager.vala:60
+msgid "_Search medicines"
+msgstr "_Αναζήτηση Φαρμάκων"
+
+#: .././libclinica/UIManager.vala:61
+msgid "Search medicines online"
+msgstr "Online Αναζήτηση Φαρμάκων"
+
+#. Tools menu
+#: .././libclinica/UIManager.vala:64
+msgid "_Tools"
+msgstr "_Εργαλεία"
+
+#: .././libclinica/UIManager.vala:65
+msgid "_Settings"
+msgstr "_Ρυθμίσεις"
+
+#: .././libclinica/UIManager.vala:66
+msgid "Customize clinica behaviour"
+msgstr "Προσαρμογή (Customize)"
+
+#: .././libclinica/UIManager.vala:67
+msgid "Backup"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:68
+msgid "Backup clinica data to file"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:69
+msgid "Import"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:70
+msgid "Import data from backup files"
+msgstr ""
+
+#. Help menu
+#: .././libclinica/UIManager.vala:73
+msgid "_Help"
+msgstr "_Βοήθεια"
+
+#: .././libclinica/UIManager.vala:74
+msgid "_Contents"
+msgstr "_Περιεχόμενα"
+
+#: .././libclinica/UIManager.vala:75
+msgid "Open the help system"
+msgstr "Άνοιγμα της Βοήθειας"
+
+#: .././libclinica/UIManager.vala:76
+msgid "_Report a bug"
+msgstr "_Αναφορά σφάλματος"
+
+#: .././libclinica/UIManager.vala:77
+msgid "Report a bug online"
+msgstr "Αναφορά Σφάλματος (bug)"
+
+#: .././libclinica/UIManager.vala:78
+msgid "_About"
+msgstr "_Σχετικά"
+
+#: .././libclinica/UIManager.vala:79
+msgid "Get to know the development team of Clinica"
+msgstr "Ομάδα ανάπτυξης Clinica"
+
+#: .././libclinica/BackupEngine.vala:113
+msgid "Please select a valid backup file"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:125
+msgid "Importing data"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:126
+msgid "Please wait while Clinica imports the data..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:129
+msgid "Importing the JSON data.."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:137
+msgid "Error while parsing the backup JSON data"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:143 .././libclinica/BackupEngine.vala:170
+msgid "An error occurred while parsing the JSON file"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:165
+msgid ""
+"The doctors, patients, visits and events field in the JSON backup should be "
+"arrays, aborting."
+msgstr ""
+
+#. Clear the database and put the data back in it
+#. in such a way that won't break relationships.
+#: .././libclinica/BackupEngine.vala:188
+msgid "Clearing the old data in the database..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:192
+msgid "Loading doctors..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:201
+#, c-format
+msgid "- %d doctors have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:203
+msgid "Loading patients..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:216
+#, c-format
+msgid "- %d patients have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:218
+msgid "Loading visits..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:231
+#, c-format
+msgid "- %d visits have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:233
+msgid "Loading events..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:249
+#, c-format
+msgid "- %d events have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:258
+msgid ""
+"- A FileStore was found but is not available in the current provider\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:283
+#, c-format
+msgid "- %d files have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:287
+msgid "- No FileStore was found in the backup\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:298
+msgid "The import of the data has been completed successfully"
+msgstr ""
+
+#: .././libclinica/PatientListStore.vala:128
+#: .././libclinica/PatientListStore.vala:150
+msgid ""
+"Patients database seems corrupted. This is likely to be a bug in the "
+"application"
+msgstr "Η βάση δεδομένων των Ασθενών  έχει καταστραφεί . Σφάλμα εφαρμογής"
+
+#. Print the error message to stdout
+#: .././libclinica/Utils.vala:79
+msgid "ERROR => "
+msgstr "ΣΦΑΛΜΑ => "
+
+#: .././libclinica/Utils.vala:83 .././libclinica/Utils.vala:84
+msgid "Clinica encountered an error"
+msgstr "Το Πρόγραμμα αντιμετώπισε κάποιο ΣΦΑΛΜΑ"
+
+#: .././libclinica/LocalMedicinesDatabase.vala:90
+#, c-format
+msgid "Medicine with id = %lld not found in DB: %s"
+msgstr ""
+
+#: .././libclinica/LocalMedicinesDatabase.vala:119
+#, c-format
+msgid "Error inserting medicine in the database: %s"
+msgstr ""
+
+#: .././libclinica/EventEditor.vala:93
+msgid "Create a new event"
+msgstr "Δημιουργία νέας Εργασίας"
+
+#: .././libclinica/EventEditor.vala:97
+#, c-format
+msgid "Editing event: %s"
+msgstr "Επεξεργασία Εργασίας: %s"
+
+#. Create the entry for title of the event and venue
+#: .././libclinica/EventEditor.vala:115
+msgid "Title"
+msgstr "Τίτλος"
+
+#: .././libclinica/EventEditor.vala:116
+msgid "Venue"
+msgstr "Χώρος"
+
+#: .././libclinica/EventEditor.vala:151
+msgid "Time:"
+msgstr "Χρόνος:"
+
+#: .././libclinica/EventEditor.vala:167
+msgid "Insert the description here..."
+msgstr "Περιγραφή ..."
+
+#: .././libclinica/EventEditor.vala:205 .././libclinica/VisitToolbar.vala:96
+#, c-format
+msgid "Patient"
+msgstr "Ασθενής"
+
+#: .././libclinica/EventEditor.vala:264
+msgid "Visit"
+msgstr "Επίσκεψη"
+
+#: .././libclinica/VisitListStore.vala:99
+msgid ""
+"Visit database seems corrupted. This is likely to be a bug in the application"
+msgstr "Η βάση δεδομένων των Επισκέψεων έχει καταστραφεί . Σφάλμα εφαρμογής"
+
+#: .././libclinica/MedicineSearchPage.vala:76
+#: .././data/resources/ui/start_page.glade.h:5
+msgid "Search medicines"
+msgstr "Αναζήτηση Φαρμάκων"
+
+#: .././libclinica/MedicineSearchPage.vala:100
+msgid "No search engine available"
+msgstr "Δεν υπάρχει διαθέσιμη Μηχανή Αναζήτησης"
+
+#: .././libclinica/MedicineSearchPage.vala:108
+#, c-format
+msgid "Searching for %s..."
+msgstr "Αναζήτηση  %s..."
+
+#: .././libclinica/MedicineSearchPage.vala:133
+msgid "Medicines"
+msgstr "Φάρμακα"
+
+#: .././libclinica/MedicineSearchPage.vala:96
+msgid "It's not possible to perform a search for medicine"
+msgstr "Δεν μπορεί να γίνει Αναζήτηση  Φαρμάκου"
+
+#: .././libclinica/SqliteDataProvider.vala:143
+#, c-format
+msgid "Error creating some configuration files, check permission on %s"
+msgstr "ΣΦΑΛΜΑ κατά τη δημιουργία αρχείων ρυθμίσεων , έλεγχος %s"
+
+#: .././libclinica/SqliteDataProvider.vala:151
+#, c-format
+msgid "Error reading some configuration files, check permission on %s"
+msgstr "ΣΦΑΛΜΑ κατά την ανάγνωση του αρχείου ρυθμίσεων , έλεγχος %s"
+
+#: .././libclinica/SqliteDataProvider.vala:170
+#, c-format
+msgid "Failure while settings new database version to %s"
+msgstr "ΑΠΟΤΥΧΙΑ κατά τη ρύθμιση νέας βάσης δεδομένων , %s"
+
+#: .././libclinica/SqliteDataProvider.vala:173
+msgid "Failure while upgrading database"
+msgstr "ΑΠΟΤΥΧΙΑ κατά την αναβάθμιση βάσης δεδομένων"
+
+#: .././libclinica/SqliteDataProvider.vala:177
+msgid "Version of the database is not compatible"
+msgstr "Μη συμβατή έκδοση Βάσης Δεδομένων"
+
+#: .././libclinica/SqliteDataProvider.vala:199
+msgid ""
+"This is a version of Clinica newer than the one that created the\n"
+"patients database installed on the system.\n"
+"Using this version requires upgrading the database, and\n"
+"<b>the old version will not be able to use it anymore</b>.\n"
+"Do you wish to perform this one-time upgrade?\n"
+msgstr ""
+"Αυτή είναι μια έκδοση του  Clinica νεότερη από εκείνη στην οποία "
+"δημιουργήθηκε\n"
+"η βάση δεδομένων των Ασθενών που είναι εγκατεστημένη στο σύστημά σας.\n"
+"Χρησιμοποιώντας αυτήν την έκδοση απαιτείται αναβάθμιση της βάσης δεδομένων, "
+"και\n"
+"<b> η παλιά έκδοση δεν θα είναι σε θέση να χρησιμοποιηθεί πια </ b>.\n"
+"Θέλετε να εκτελέσετε αυτή την μη αναστρέψιμη αναβάθμιση;\n"
+
+#: .././libclinica/SqliteDataProvider.vala:200
+msgid "Upgrade database"
+msgstr "Αναβάθμιση Βάσης Δεδομένων"
+
+#: .././libclinica/SqliteDataProvider.vala:225
+msgid "Database needs to be moved"
+msgstr "Η Βάση Δεδομένων Πρέπει να μετακινηθεί"
+
+#: .././libclinica/SqliteDataProvider.vala:226
+msgid ""
+"An older version of clinica has been detected and the old database has to be "
+"moved\n"
+"to a new location to continue.\n"
+"<b>The older version of clinica won't work anymore with this setup</b>.\n"
+"Do you still want to continue?"
+msgstr ""
+"Μία παλαιότερη έκδοση του Clinica εντοπίστηκε, η παλιά βάση δεδομένων πρέπει "
+"να μετακινηθεί\n"
+"σε νέα τοποθεσία για να συνεχίσετε.\n"
+" <b>Η παλαιότερη έκδοση του Clinica δεν θα μπορεί πλέον να λειτουργήσει με "
+"αυτή την εγκατάσταση</b>.\n"
+"Θέλετε να συνεχίσετε ?"
+
+#: .././libclinica/SqliteDataProvider.vala:239
+msgid ""
+"Error while transferring the database to the new default location for "
+"clinica >= 0.2.9"
+msgstr ""
+"ΣΦΑΛΜΑ κατά την μεταφορά της βάσης δεδομένων στη νέα προεπιλεγμένη θέση του "
+"Clinica >= 0.2.9"
+
+#: .././libclinica/SqliteDataProvider.vala:251
+msgid "Error upgrading database, please check your installation"
+msgstr ""
+"ΣΦΑΛΜΑ κατά την αναβάθμιση της βάσης δεδομένων, ελέγξτε την εγκατάσταση σας"
+
+#: .././libclinica/SqliteDataProvider.vala:266
+#, c-format
+msgid ""
+"Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %s"
+msgstr ""
+"Σφάλμα κατά την αναβάθμιση της βάσης δεδομένων από την έκδοση 0.1 στην 0.2 , "
+" SQLite κωδικός εξόδου: %s"
+
+#: .././libclinica/SqliteDataProvider.vala:359
+#, c-format
+msgid "Error while retrieving the doctor with id = %s"
+msgstr "ΣΦΑΛΜΑ κατά την ανάκτηση του Γιατρού με id = %s"
+
+#: .././libclinica/SqliteDataProvider.vala:399
+#, c-format
+msgid "An error occurred while saving the doctor with id %d: %s"
+msgstr "Παρουσιάστηκε ΣΦΑΛΜΑ κατά την αποθήκευση του Γιατρού με id %d: %s"
+
+#: .././libclinica/SqliteDataProvider.vala:468
+#, c-format
+msgid "Error while retrieving the patient with id = %s"
+msgstr "ΣΦΑΛΜΑ κατά την ανάκτηση του Ασθενούς με id = %s"
+
+#: .././libclinica/SqliteDataProvider.vala:517
+#: .././libclinica/SqliteDataProvider.vala:652
+#, c-format
+msgid "An error occurred while saving the doctor with id %s: %s"
+msgstr "Παρουσιάστηκε ΣΦΑΛΜΑ κατά την αποθήκευση του γιατρού με id %s: %s"
+
+#: .././libclinica/SqliteDataProvider.vala:597
+#, c-format
+msgid "Error while retrieving the visit with id = %s"
+msgstr "ΣΦΑΛΜΑ κατά την ανάκτηση της Επίσκεψης με id = %s"
+
+#: .././libclinica/SqliteDataProvider.vala:686
+#, c-format
+msgid "Error while retrieving the event with id = %d"
+msgstr "ΣΦΑΛΜΑ κατά την ανάκτηση της Εργασίας με id = %d"
+
+#: .././libclinica/SqliteDataProvider.vala:728
+#, c-format
+msgid "An error occurred while saving the event with id %s: %s"
+msgstr "Παρουσιάστηκε ΣΦΑΛΜΑ κατά την αποθήκευση της Εργασίας με id %s: %s"
+
+#: .././libclinica/SettingsManager.vala:40
+msgid "Clinica settings"
+msgstr "Επιλογές"
+
+#: .././libclinica/SettingsManager.vala:52
+msgid "Clinica has been built without plugins support"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:135
+msgid "Please use the Network tab to enable the Networked data provider"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:136
+msgid "Use the Network tab"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Disconnect"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Connect"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:191
+#, c-format
+msgid "Connection to the given host failed. Please check your settings."
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:192
+msgid "Connection failed"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:206
+#: .././libclinica/ResourceManager.vala:284
+#, c-format
+msgid "Username or password are wrong. Disconnecting from the server."
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:207
+msgid "Wrong authentication data has been provided"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:60
+msgid "Edit details of patient"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:67
+msgid "Remove this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:74
+msgid "Export this visit as PDF"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:81
+msgid "Print a report of this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:88
+msgid "Save this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:99
+msgid "Close the visits of this patient"
+msgstr ""
+
+#: .././libclinica/VisitToolbar.vala:93
+msgid "This patient has not a doctor"
+msgstr "Δεν έχει οριστεί Γιατρός για τον Ασθενή"
+
+#: .././libclinica/VisitToolbar.vala:97
+msgid "Doctor"
+msgstr ""
+
+#: .././libclinica/DateTimePicker.vala:56
+msgid "Hour"
+msgstr "Ώρα"
+
+#: .././libclinica/DateTimePicker.vala:58
+msgid "Minute"
+msgstr "Λεπτό"
+
+#: .././libclinica/DoctorListStore.vala:75
+msgid "Doctors database seems corrupted."
+msgstr "Η βάση δεδομένων των Γιατρών έχει αλλοιωθεί"
+
+#: .././libclinica/DoctorListView.vala:175
+msgid "Select a doctor to delete it!"
+msgstr "Διάλεξε Γιατρό που θέλεις να διαγράψεις !"
+
+#: .././libclinica/DoctorListView.vala:186
+msgid ""
+"The doctor that you have selected for removal has some patients associated. "
+"\n"
+msgstr ""
+"ΠΡΟΣΟΧΗ ! Αντιστοιχούν Ασθενείς στον Γιατρό που θέλεις να διαγράψεις ! \n"
+
+#: .././libclinica/DoctorListView.vala:187
+msgid ""
+"It's not possible to remove it without disassociating all his patients.\n"
+"\n"
+msgstr ""
+"Δεν είναι δυνατόν να αφαιρεθεί χωρίς να απομακρυνθούν όλοι οι  Ασθενείς "
+"του.\n"
+"\n"
+
+#: .././libclinica/DoctorListView.vala:188
+#: .././libclinica/DoctorListView.vala:217
+msgid "Do you really want to proceed?"
+msgstr "ΣΥΝΕΧΕΙΑ ?"
+
+#: .././libclinica/DoctorListView.vala:189
+msgid "Doctor has associated patients"
+msgstr "Αντιστοιχούν Ασθενείς στον Γιατρό"
+
+#: .././libclinica/DoctorListView.vala:215
+msgid ""
+"The following patients will be disassociated from this doctor by this "
+"action:\n"
+msgstr "Οι εξής Ασθενείς θα απομακρυνθούν από τον Γιατρό :\n"
+
+#: .././libclinica/DoctorListView.vala:218
+msgid "Confirm disassociation of patients"
+msgstr "Επιβεβαίωση απομάκρυνσης  Ασθενών"
+
+#: .././libclinica/DoctorListView.vala:235
+msgid ""
+"Really delete this doctor? All information about him/her will be lost."
+msgstr "Διαγραφή Γιατρού ?  Όλες οι πληροφορίες του θα χαθούν."
+
+#. Ask the user where he would like to backup its files.
+#: .././libclinica/UserInterface.vala:360
+msgid "Select the folder where the data should be saved"
+msgstr ""
+
+#. In this string %s refers to the path where the backup has been performed.
+#: .././libclinica/UserInterface.vala:386
+#, c-format
+msgid "Backup completed successfully in the folder %s"
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:387
+msgid "Backup completed"
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:389
+msgid ""
+"Please take care of copying the folder in a safe place for future restore of "
+"the data."
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:416
+#, c-format
+msgid "Cannot open the help: %s"
+msgstr "Δεν ανοίγει η Βοήθεια: %s"
+
+#: .././libclinica/UserInterface.vala:441
+msgid ""
+"An error occurred while opening the bug system. Please go to\n"
+"http://launchpad.net/clinica-project/ to file a bug"
+msgstr ""
+"Παρουσιάστηκε ΣΦΑΛΜΑ κατά το άνοιγμα του συστήματος αναφοράς σφαλμάτων. "
+"Παρακαλώ πηγαίνετε στο\n"
+"http://launchpad.net/clinica-project/   και δηλώστε το σφάλμα"
+
+#: .././libclinica/EventDetail.vala:65
+msgid "Edit event"
+msgstr "Επεξεργασία Εργασίας"
+
+#: .././libclinica/EventDetail.vala:112
+msgid "Remove"
+msgstr "Διαγραφή"
+
+#: .././libclinica/EventDetail.vala:145
+msgid "Really delete this event?"
+msgstr "Διαγραφή Εργασίας ?"
+
+#: .././libclinica/Sidebar.vala:68
+msgid "Pages"
+msgstr "Σελίδες"
+
+#: .././libclinica/StartPage.vala:93
+msgid "Dashboard"
+msgstr "Πίνακας ελέγχου"
+
+#: .././libclinica/StartPage.vala:205
+msgid ""
+"Add a new patient \n"
+" with name "
+msgstr "Καινούργιος Ασθενής "
+
+#: .././libclinica/EventListStore.vala:121
+msgid ""
+"Events database seems corrupted. This is likely to be a bug in the "
+"application"
+msgstr "Η βάση δεδομένων των Εργασιών έχει καταστραφεί. ΣΦΑΛΜΑ  ΕΦΑΡΜΟΓΗΣ"
+
+#: .././libclinica/DoctorListPage.vala:60
+#: .././libclinica/DoctorListPage.vala:93
+msgid "Doctors"
+msgstr "Γιατροί"
+
+#: .././libclinica/DoctorListPage.vala:76
+msgid "Add a doctor"
+msgstr ""
+
+#: .././libclinica/DoctorListPage.vala:82
+msgid "Edit the selected doctor"
+msgstr ""
+
+#: .././libclinica/DoctorListPage.vala:88
+msgid "Remove the selected doctor"
+msgstr ""
+
+#: .././libclinica/ResourceManager.vala:285
+msgid "Error while authenticating on the server"
+msgstr ""
+
+#: .././libclinica/AboutDialog.vala:41
+msgid "Medical records manager"
+msgstr "Εφαρμογή διαχείρισης ιατρικών αρχείων"
+
+#: .././libclinica/AboutDialog.vala:43
+msgid "About Clinica"
+msgstr "Σχετικά με το Clinica"
+
+#: .././libclinica/AboutDialog.vala:52
+msgid "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+msgstr "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+
+#: .././libclinica/AboutDialog.vala:53
+msgid "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+msgstr "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+
+#. Histopathology
+#: .././libclinica/VisitPrinter.vala:122
+msgid "Histopathology"
+msgstr "Ιστοπαθολογία"
+
+#. Now write the date of the visit after that
+#: .././libclinica/VisitPrinter.vala:285
+#, c-format
+msgid "Report of the visit of %s"
+msgstr ""
+
+#: .././libclinica/VisitPrinter.vala:316
+#: .././libclinica/MedicineDetailDialog.vala:109
+msgid "Field empty"
+msgstr "Κενό Πεδίο"
+
+#. Add a Attach button
+#: .././libclinica/VisitFileManager.vala:89
+msgid "Attach file"
+msgstr "Επισύναψη αρχείου"
+
+#: .././libclinica/VisitFileManager.vala:97
+msgid "Browse files"
+msgstr "Περιήγηση αρχείων (Browse)"
+
+#: .././libclinica/VisitFileManager.vala:113
+msgid "Select a file to attach"
+msgstr "Επιλογή αρχείου Επισύναψης"
+
+#: .././libclinica/VisitFileManager.vala:133
+msgid "Unable to open the browser on the filestore position"
+msgstr "Δεν είναι δυνατό να ανοίξει το πρόγραμμα περιήγησης (browser)"
+
+#: .././libclinica/VisitFileManager.vala:163
+msgid ""
+"Save the visit\n"
+" to attach files"
+msgstr ""
+"Αποθήκευση της Επίσκεψης\n"
+"Επισύναψη αρχείων"
+
+#: .././libclinica/VisitFileManager.vala:170
+msgid "Attach files"
+msgstr "Επισύναψη αρχείου"
+
+#: .././libclinica/SidebarCalendarEntry.vala:30
+msgid "Calendar"
+msgstr "Ημερολόγιο"
+
+#. Create the object and add the close button used
+#. * to dismiss the dialog
+#: .././libclinica/MedicineDetailDialog.vala:46
+msgid "Close"
+msgstr "Τερματισμός"
+
+#: .././libclinica/MedicineDetailDialog.vala:65
+msgid "General information"
+msgstr "Γενικές πληροφορίες"
+
+#. And now the content for the others fields of the medicine
+#: .././libclinica/MedicineDetailDialog.vala:71
+msgid "Identification Code"
+msgstr "Κωδικός Αναγνώρισης"
+
+#: .././libclinica/MedicineDetailDialog.vala:72
+msgid "Description"
+msgstr "Περιγραφή:"
+
+#: .././libclinica/MedicineDetailDialog.vala:73
+msgid "Active ingredient"
+msgstr "Ενεργό Συστατικό"
+
+#: .././libclinica/MedicineDetailDialog.vala:74
+msgid "Storage reccomendations"
+msgstr "Προτάσεις Αποθήκευσης"
+
+#: .././libclinica/MedicineDetailDialog.vala:83
+msgid "Additional notes"
+msgstr "Πρόσθετες σημειώσεις"
+
+#. Nothing to do for now.
+#: .././libclinica/FileDetail.vala:89
+#, c-format
+msgid "Error while loading icon for file %s: %s"
+msgstr "Σφάλμα κατά τη φόρτωση εικονιδίου για το αρχείο %s: %s"
+
+#: .././libclinica/FileDetail.vala:98
+msgid "Open file"
+msgstr "Άνοιγμα αρχείου"
+
+#: .././libclinica/FileDetail.vala:110
+msgid "Delete file"
+msgstr "Διαγραφή Αρχείου"
+
+#: .././libclinica/FileDetail.vala:122
+#, c-format
+msgid ""
+"Do you really want to delete the file %s?\n"
+"If you proceed it will be definitively lost."
+msgstr ""
+"Θέλεις πραγματικά να διαγράψεις το αρχείο %s?\n"
+"Αν συνεχίσεις θα χαθεί οριστικά."
+
+#: .././libclinica/FileDetail.vala:135
+#, c-format
+msgid "Error while opening the file %s"
+msgstr "ΣΦΑΛΜΑ κατά το άνοιγμα του αρχείου %s"
+
+#: .././data/resources/ui/start_page.glade.h:1
+msgid "Browse the patients to start a visit"
+msgstr "Αναζήτηση ασθενών , έναρξη επίσκεψης"
+
+#: .././data/resources/ui/start_page.glade.h:2
+msgid "Add new patient"
+msgstr "Προσθήκη νέου Ασθενή"
+
+#: .././data/resources/ui/start_page.glade.h:3
+msgid "Patient list"
+msgstr "Λιστα Ασθενών"
+
+#: .././data/resources/ui/start_page.glade.h:4
+msgid "Doctor list"
+msgstr "Λίστα Γιατρών"
+
+#: .././data/resources/ui/start_page.glade.h:6
+msgid "Open calendar"
+msgstr "Άνοιγμα Ημερολογίου"
+
+#: .././data/resources/ui/authentication_dialog.glade.h:1
+msgid "The server requires authentication. Please insert your credentials:"
+msgstr ""
+
+#: .././data/resources/ui/authentication_dialog.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:11
+msgid "Username"
+msgstr ""
+
+#: .././data/resources/ui/authentication_dialog.glade.h:3
+#: .././data/resources/ui/settings_window.glade.h:12
+msgid "Password"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:1
+msgid "Name:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:2
+msgid "Description:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:3
+msgid "Active ingredient:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:4
+msgid "Storage reccomendations:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:5
+msgid "Price:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:6
+msgid "Other notes:"
+msgstr ""
+
+#: .././data/resources/ui/import_dialog.glade.h:1
+msgid "Source:\t"
+msgstr ""
+
+#: .././data/resources/ui/import_dialog.glade.h:2
+msgid "Select the backup folder"
+msgstr ""
+
+#: .././data/resources/ui/import_dialog.glade.h:3
+msgid ""
+"<b>Warning:</b> Please note that the current data in the database <b>will be "
+"definitely lost</b>. Consider performing a backup of the current data before "
+"importing the old one."
+msgstr ""
+
+#: .././data/resources/ui/doctor_editor.glade.h:1
+#: .././data/resources/ui/patient_editor.glade.h:12
+msgid "Doctor:"
+msgstr "Γιατρός :"
+
+#: .././data/resources/ui/doctor_editor.glade.h:4
+#: .././data/resources/ui/patient_editor.glade.h:11
+msgid "Phone:"
+msgstr "Τηλέφωνο:"
+
+#: .././data/resources/ui/doctor_editor.glade.h:5
+msgid "Mobile:"
+msgstr "Κινητό:"
+
+#: .././data/resources/ui/wait_dialog.glade.h:1
+msgid "label"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:1
+msgid "Use plugins (restart required)"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:2
+msgid "Allow to browse files in visits"
+msgstr "Περιηγηθείτε στα αρχεία Επισκέψεων"
+
+#: .././data/resources/ui/settings_window.glade.h:3
+msgid "Medicines search engine"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:4
+msgid "Data source"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:5
+msgid "General"
+msgstr "Γενικά"
+
+#: .././data/resources/ui/settings_window.glade.h:6
+msgid "Host"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:7
+msgid "Port"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:8
+msgid "button"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:9
+msgid "Connection to a remote Clinica instance"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:10
+msgid "Allow connections of other clinica from the LAN"
+msgstr "Να επιτρέπονται συνδέσεις από το LAN"
+
+#: .././data/resources/ui/settings_window.glade.h:13
+msgid "Built-in server"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:14
+msgid "Network"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:15
+msgid ""
+"The details that are inserted here will be used when generating\n"
+"the automatic visit reports. "
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:18
+msgid "Address"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:19
+msgid "Institution"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:20
+msgid "Email"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:21
+msgid "Personal details"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:22
+msgid "Plugins"
+msgstr "Πρόσθετα (Plugins)"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:1
+msgid "Visits"
+msgstr "Επισκέψεις"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:2
+msgid "Schedule a visit"
+msgstr "Προγραμματίσμός Επίσκεψης"
+
+#: .././data/resources/ui/patient_editor.glade.h:1
+msgid "Patient:"
+msgstr "Ασθενής:"
+
+#: .././data/resources/ui/patient_editor.glade.h:4
+msgid "Gender:"
+msgstr "Φύλο:"
+
+#: .././data/resources/ui/patient_editor.glade.h:5
+msgid "Date of birth:"
+msgstr "Ημερομηνία γέννησης:"
+
+#: .././data/resources/ui/patient_editor.glade.h:6
+msgid "dd"
+msgstr "ηη"
+
+#: .././data/resources/ui/patient_editor.glade.h:7
+msgid "/"
+msgstr "/"
+
+#: .././data/resources/ui/patient_editor.glade.h:8
+msgid "mm"
+msgstr "μμ"
+
+#: .././data/resources/ui/patient_editor.glade.h:9
+msgid "yyyy"
+msgstr "χχχχ"
+
+#: .././data/resources/ui/patient_editor.glade.h:10
+msgid "Address:"
+msgstr "Διεύθυνση:"
+
+#: .././data/resources/ui/patient_editor.glade.h:13
+msgid "Codice fiscale:"
+msgstr "ΑΦΜ :"
+
+#: .././data/resources/ui/patient_editor.glade.h:14
+msgid "Male"
+msgstr "Άρρεν"
+
+#: .././data/resources/ui/patient_editor.glade.h:15
+msgid "Female"
+msgstr "Θήλυ"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:1
+msgid "Select the date on which you'd like to schedule the visit."
+msgstr "Επιλέξτε την ημερομηνια Επίσκεψης"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:2
+msgid "Selected patient"
+msgstr "Επιλέξτε Ασθενή"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:3
+msgid ""
+"<b>Tip:</b> Once created this visit will be visible in the visit editor of "
+"this patient."
+msgstr ""
+"<b>Tip:</b> Μόλις δημιουργηθεί αυτή η επίσκεψη θα είναι ορατή στο πρόγραμμα "
+"επεξεργασίας επίσκεψεων του ασθενή"
+
+#~ msgid ""
+#~ "You cannot delete a doctor with associated patients. Delete his patients "
+#~ "first."
+#~ msgstr ""
+#~ "Δεν μπορείς να σβήσεις γιατρό που είναι συνδεδεμένος με ασθενή. Σβήσε τον "
+#~ "ασθενή του πρώτα"
+
+#, c-format
+#~ msgid "Visits of the patient %s"
+#~ msgstr "Επισκέψεις στον Ασθενή %s"
+
+#~ msgid "Error loading patient_editor.glade."
+#~ msgstr "Σφάλμα κατά τη φόρτωση του αρχείου του Ασθενή"
+
+#~ msgid ""
+#~ "Select the search engine\n"
+#~ "used to find medicines"
+#~ msgstr ""
+#~ "Επιλογή μηχανής αναζήτησης\n"
+#~ "για την εύρεση φαρμάκων"
+
+#~ msgid "Use plugins (need restart)"
+#~ msgstr "Ενεργοποίηση Πρόσθετων ( Μετά την επανεκίνηση  )"
+
+#~ msgid "Edit patient details"
+#~ msgstr "Επεξεργασία Πληροφοριών  Ασθενή"
+
+#~ msgid "Save as PDF"
+#~ msgstr "Αποθήκευση ώς pdf"
+
+#, c-format
+#~ msgid ""
+#~ "Patient: <b>%s</b>\n"
+#~ "Doctor: <b>%s</b>"
+#~ msgstr ""
+#~ "Ασθενεις: <b>%s</b>\n"
+#~ "Γιατρός: <b>%s</b>"
+
+#~ msgid ""
+#~ "It's not possible to remove it without removing all his patients.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Δεν μπορεί να διαγραφεί ο Γιατρός εάν δεν μετακινηθούν οι Ασθενείς του .\n"
+#~ "\n"
+
+#~ msgid "Back"
+#~ msgstr "Επιστροφή"
+
+#~ msgid "Stop"
+#~ msgstr "Διακοπή"
+
+#~ msgid "New Patient"
+#~ msgstr "Νέος Ασθενής"
+
+#~ msgid "Clinica"
+#~ msgstr "Clinica"
+
+#~ msgid "New Doctor"
+#~ msgstr "Νέος Γιατρός"
+
+#~ msgid "_Home"
+#~ msgstr "Προσωπικός _φάκελος"
+
+#~ msgid "Medicine search"
+#~ msgstr "Αναζήτηση Φαρμάκου"
+
+#~ msgid "Confirm deletion of patients"
+#~ msgstr "Επιβεβαίωση διαγραφής ασθενών"
+
+#~ msgid "The following patients will be deleted by this action:\n"
+#~ msgstr "Οι παρακάτω ασθενείς θα διαγραφούν :\n"
+
+#, c-format
+#~ msgid ""
+#~ "Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %d"
+#~ msgstr ""
+#~ "Σφάλμα κατά την αναβάθμιση της βάσης δεδομένων από την έκδοση 0.1 στην 0.2 , "
+#~ "sqlite έξοδος : %d"
+
+#~ msgid ""
+#~ "\n"
+#~ "Launchpad contributions: \n"
+#~ msgstr ""
+#~ "\n"
+#~ "Συνεισφορά στο Launchpad : \n"
diff --git a/po/es.po b/po/es.po
index 9e7cee4..c84e375 100644
--- a/po/es.po
+++ b/po/es.po
@@ -7,669 +7,1460 @@ msgid ""
 msgstr ""
 "Project-Id-Version: clinica-project\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-12-19 07:28+0100\n"
-"PO-Revision-Date: 2011-11-23 18:48+0000\n"
-"Last-Translator: Fitoschido <fitoschido at gmail.com>\n"
+"POT-Creation-Date: 2013-04-18 10:23+0200\n"
+"PO-Revision-Date: 2012-12-15 16:32+0000\n"
+"Last-Translator: Adolfo Jayme Barrientos <fitoschido at gmail.com>\n"
 "Language-Team: Spanish <es at li.org>\n"
-"Language: es\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-11-25 06:58+0000\n"
-"X-Generator: Launchpad (build 14376)\n"
+"X-Launchpad-Export-Date: 2013-05-18 05:45+0000\n"
+"X-Generator: Launchpad (build 16626)\n"
+"Language: es\n"
 
-#: ../libclinica/Doctor.vala:110
-msgid ""
-"You cannot delete a doctor with associated patients. Delete his patients "
-"first."
+#: .././plugins/AgenziaDelFarmaco.py:166
+msgid "Dosage form"
 msgstr ""
-"No puede eliminar el doctor con sus pacientes asociados. Primero, elimine a "
-"sus pacientes."
 
-#: ../libclinica/VisitListStore.vala:103
-msgid ""
-"Visit database seems corrupted. This is likely to be a bug in the application"
+#: .././plugins/AgenziaDelFarmaco.py:167
+msgid "System of supply"
 msgstr ""
 
-#: ../libclinica/UserInterface.vala:282
-#, c-format
-msgid "Cannot open the help: %s"
+#: .././plugins/AgenziaDelFarmaco.py:168
+msgid "Class of eligibility"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:169
+msgid "Firm"
 msgstr ""
 
-#: ../libclinica/PatientListPage.vala:74
+#. Title of edit doctor dialog
+#: .././libclinica/DoctorEditor.vala:88
+#, c-format
+msgid "Edit doctor named %s"
+msgstr "Editar el doctor %s"
+
+#: .././libclinica/PatientLens.vala:37
+msgid "Search for patients"
+msgstr "Buscar pacientes"
+
+#: .././libclinica/PatientLens.vala:43
+msgid "Recently visited patients"
+msgstr "Pacientes recientemente visitados"
+
+#. Create the SidebarEntry
+#: .././libclinica/PatientLens.vala:47 .././libclinica/PatientListPage.vala:64
+#: .././libclinica/PatientListPage.vala:110
 msgid "Patients"
 msgstr "Pacientes"
 
-#: ../libclinica/PatientListView.vala:76
-#: ../libclinica/MedicineTreeView.vala:18 ../libclinica/DoctorListView.vala:51
-#: ../ui/patient_editor.glade.h:10 ../ui/doctor_editor.glade.h:4
+#: .././libclinica/PatientListView.vala:76
+#: .././libclinica/DoctorListView.vala:51
+#: .././data/resources/ui/doctor_editor.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:17
+#: .././data/resources/ui/patient_editor.glade.h:2
 msgid "Name"
 msgstr "Nombre"
 
 #. ...and then the surname column
-#: ../libclinica/PatientListView.vala:80 ../libclinica/DoctorListView.vala:56
-#: ../ui/patient_editor.glade.h:13 ../ui/doctor_editor.glade.h:6
+#: .././libclinica/PatientListView.vala:80
+#: .././libclinica/DoctorListView.vala:56
+#: .././data/resources/ui/doctor_editor.glade.h:3
+#: .././data/resources/ui/patient_editor.glade.h:3
 msgid "Surname"
 msgstr "Apellidos"
 
-#: ../libclinica/PatientListView.vala:174
+#: .././libclinica/PatientListView.vala:165
 msgid "Select a patient to delete it!"
 msgstr "Seleccione un paciente para eliminarlo"
 
-#: ../libclinica/PatientListView.vala:181
-#, fuzzy
+#: .././libclinica/PatientListView.vala:172
 msgid ""
 "Really delete this patient? All information about him/her and the associated "
 "visits will be lost."
 msgstr ""
-"¿Quiere eliminar a este paciente? Se perderá toda la información sobre el "
-"mismo."
-
-#. Print the error message to stdout
-#: ../libclinica/Utils.vala:79
-msgid "ERROR => "
-msgstr ""
+"¿Está seguro de que quiere eliminar este paciente? Toda su información y las "
+"visitas asociadas se perderán."
 
-#: ../libclinica/Utils.vala:83 ../libclinica/Utils.vala:84
-msgid "Clinica encountered an error"
-msgstr "Clínica encontró un error"
+#. Set title according to the patient that we have loaded and connect
+#. * show startup signal to the focusing of the first field in the visit
+#: .././libclinica/VisitPage.vala:63
+#, c-format
+msgid "Visit of the patient %s"
+msgstr "Visita del paciente %s"
 
-#: ../libclinica/StartPage.vala:198
+#: .././libclinica/PluginManager.vala:35
 msgid ""
-"Add a new patient \n"
-" with name "
+"Clinica is extensible via plugins and you can easily enable\n"
+" and disable them using this window."
 msgstr ""
-"Añadir un paciente nuevo \n"
-" con nombre "
+"Clinica puede extenderse mediante complementos, que se\n"
+"pueden activar o desactivar utilizando esta ventana."
 
-#: ../libclinica/StartPage.vala:204
-msgid "Add a new patient"
-msgstr "Añadir un paciente nuevo"
+#: .././libclinica/VisitSchedulerDialog.vala:60
+#: .././libclinica/VisitSchedulerDialog.vala:76
+msgid "Patient not selected"
+msgstr "Paciente no seleccionado"
 
-#: ../libclinica/MedicineTreeView.vala:21
-#: ../libclinica/MedicineDetailDialog.vala:56
-msgid "Price"
-msgstr ""
+#: .././libclinica/VisitSchedulerDialog.vala:72
+#, c-format
+msgid "Schedule a vist for the patient %s"
+msgstr "Planificar una vista para el paciente %s"
 
-#: ../libclinica/PatientEditor.vala:102
-msgid "Error loading patient_editor.glade."
-msgstr ""
+#: .././libclinica/Application.vala:113
+#, c-format
+msgid "Option parsing failed: %s\n"
+msgstr "Falló el análisis de la opción: %s\n"
 
-#. Set title to edit patient * instead of create new patient
-#: ../libclinica/PatientEditor.vala:307
+#: .././libclinica/Application.vala:148
 #, c-format
-msgid "Edit patient named %s"
-msgstr "Editar el paciente %s"
+msgid "Clinica %s\n"
+msgstr "Clínica %s\n"
 
-#: ../libclinica/PatientEditor.vala:411
-msgid "You must select a doctor for this patient."
-msgstr "Seleccione un médico para este paciente."
+#. Then add add a new visit and keep a reference to new_page
+#. *  to focus it on page loading.
+#. Create a new one and connect it
+#: .././libclinica/VisitBrowser.vala:73 .././libclinica/VisitBrowser.vala:252
+msgid "New visit"
+msgstr "Nueva visita"
 
-#: ../libclinica/PatientEditor.vala:412
+#: .././libclinica/VisitBrowser.vala:152 .././libclinica/VisitBrowser.vala:209
 msgid ""
-"If you need to create a new one type his name in the entry and select Create "
-"new doctor from the completion list."
+"A visit need to be saved in order to be exported as PDF.\n"
+"Do you want to save the visit now?"
 msgstr ""
+"La visita necesita ser guardada para poder exportarse como PDF.\n"
+"¿Quiere guardar la visita ahora?"
 
-#: ../libclinica/PatientEditor.vala:446
-msgid "Date inserted is invalid, aborting patient editing"
+#: .././libclinica/VisitBrowser.vala:196
+msgid "Error while delivering the print operation"
 msgstr ""
 
-#. Set title according to the patient that we have loaded and connect
-#. * show startup signal to the focusing of the first field in the visit
-#: ../libclinica/VisitWindow.vala:62
-#, c-format
-msgid "Visits of the patient %s"
-msgstr "Visitas del paciente %s"
+#: .././libclinica/VisitDetail.vala:70
+msgid "Edit visit"
+msgstr "Editar visita"
+
+#: .././libclinica/VisitDetail.vala:80 .././libclinica/EventDetail.vala:75
+msgid "Delete event"
+msgstr "Eliminar evento"
 
-#: ../libclinica/PatientListStore.vala:86
-#: ../libclinica/PatientListStore.vala:132
+#: .././libclinica/VisitDetail.vala:104
+msgid "Show details"
+msgstr "Mostrar detalles"
+
+#: .././libclinica/VisitDetail.vala:125 .././libclinica/VisitTab.vala:269
 msgid ""
-"Patients database seems corrupted. This is likely to be a bug in the "
-"application"
+"Deleting a visit will cause all its data to be lost.\n"
+"Do you really want to continue?"
 msgstr ""
+"El eliminar una visita causará que se pierdan todos sus datos.\n"
+"¿Realmente quiere continuar?"
 
 #. Create menu items, connect them to their callback
 #. * and add it to the menu
-#: ../libclinica/DoctorContextMenu.vala:58
-#: ../libclinica/PatientContextMenu.vala:54
+#: .././libclinica/DoctorContextMenu.vala:58
+#: .././libclinica/PatientContextMenu.vala:54
 msgid "Delete"
 msgstr "Eliminar"
 
 #. Instantiate menu items
-#: ../libclinica/DoctorContextMenu.vala:59
-#: ../libclinica/PatientContextMenu.vala:51
+#: .././libclinica/DoctorContextMenu.vala:59
+#: .././libclinica/PatientContextMenu.vala:51
+#: .././libclinica/EventDetail.vala:111
 msgid "Edit"
 msgstr "Editar"
 
-#: ../libclinica/PatientContextMenu.vala:57
-msgid "Edit visits"
-msgstr "Editar visitas"
-
-#. Create the object and add the close button used
-#. * to dismiss the dialog
-#: ../libclinica/MedicineDetailDialog.vala:27
-msgid "Close"
+#: .././libclinica/MedicineEditor.vala:41
+msgid "Create a new Medicine"
 msgstr ""
 
-#: ../libclinica/MedicineDetailDialog.vala:46
-msgid "General information"
-msgstr ""
+#: .././libclinica/CalendarWindow.vala:36
+msgid "Clinica calendar"
+msgstr "Calendario de Clinica"
 
-#. And now the content for the others fields of the medicine
-#: ../libclinica/MedicineDetailDialog.vala:52
-msgid "Identification Code"
-msgstr ""
+#. Anamnesis
+#: .././libclinica/VisitTab.vala:286 .././libclinica/VisitPrinter.vala:107
+msgid "Anamnesis"
+msgstr "Anamnesis"
 
-#: ../libclinica/MedicineDetailDialog.vala:53
-msgid "Description"
+#. Physical examination
+#: .././libclinica/VisitTab.vala:289 .././libclinica/VisitPrinter.vala:112
+msgid "Physical examination"
+msgstr "Examen físico"
+
+#. Laboratory Exam
+#: .././libclinica/VisitTab.vala:292 .././libclinica/VisitPrinter.vala:117
+msgid "Laboratory exam"
+msgstr "Examen de laboratorio"
+
+#: .././libclinica/VisitTab.vala:295
+msgid "Hystopathology"
+msgstr "Histopatología"
+
+#. Diagnosis
+#: .././libclinica/VisitTab.vala:298 .././libclinica/VisitPrinter.vala:127
+msgid "Diagnosis"
+msgstr "Diagnóstico"
+
+#. Topical therapy
+#: .././libclinica/VisitTab.vala:301 .././libclinica/VisitPrinter.vala:132
+msgid "Topical therapy"
+msgstr "Terapia tópica"
+
+#. Systemic therapy
+#: .././libclinica/VisitTab.vala:304 .././libclinica/VisitPrinter.vala:137
+msgid "Systemic therapy"
+msgstr "Terapia sistémica"
+
+#. Subsequent checks
+#: .././libclinica/VisitTab.vala:307 .././libclinica/VisitPrinter.vala:142
+msgid "Subsequent checks"
+msgstr "Revisiones subsecuentes"
+
+#: .././libclinica/MedicineTreeView.vala:37
+msgid "Medicine name"
+msgstr "Nombre del medicamento"
+
+#: .././libclinica/MedicineTreeView.vala:40
+#: .././libclinica/MedicineDetailDialog.vala:75
+msgid "Price"
+msgstr "Precio"
+
+#: .././libclinica/PatientListPage.vala:81 .././libclinica/StartPage.vala:211
+msgid "Add a new patient"
+msgstr "Añadir un paciente nuevo"
+
+#: .././libclinica/PatientListPage.vala:87
+msgid "Remove the selected patient"
+msgstr "Quitar el paciente seleccionado"
+
+#: .././libclinica/PatientListPage.vala:93
+msgid "Modify the selected patient"
+msgstr "Modificar el paciente seleccionado"
+
+#: .././libclinica/PatientListPage.vala:99
+msgid "Edit visits of the selected patient"
 msgstr ""
 
-#: ../libclinica/MedicineDetailDialog.vala:54
-msgid "Active ingredient"
+#: .././libclinica/PatientListPage.vala:105
+msgid "Schedule a visit with the selected patient"
 msgstr ""
 
-#: ../libclinica/MedicineDetailDialog.vala:55
-msgid "Storage reccomendations"
+#: .././libclinica/DataServer.vala:417
+#, c-format
+msgid "Trying to removing doctor with ID = %ld failed"
 msgstr ""
 
-#: ../libclinica/MedicineDetailDialog.vala:64
-msgid "Additional notes"
+#: .././libclinica/DataServer.vala:440
+#, c-format
+msgid "Trying to removing patient with ID = %ld failed"
 msgstr ""
 
-#: ../libclinica/MedicineDetailDialog.vala:90
-#: ../libclinica/VisitPrinter.vala:168
-msgid "Field empty"
-msgstr "Campo vacío"
+#: .././libclinica/DataServer.vala:463
+#, c-format
+msgid "Trying to removing visit with ID = %ld failed"
+msgstr ""
 
-#. First add a new visit and keep a reference to new_page
-#. *  to focus it on page loading.
-#. Create a new one and connect it
-#: ../libclinica/VisitBrowser.vala:62 ../libclinica/VisitBrowser.vala:184
-msgid "New visit"
-msgstr "Nueva visita"
+#: .././libclinica/DataServer.vala:486
+#, c-format
+msgid "Trying to removing event with ID = %ld failed"
+msgstr ""
 
-#: ../libclinica/VisitBrowser.vala:141
+#: .././libclinica/Builder.vala:45
+#, c-format
 msgid ""
-"A visit need to be saved in order to be exported as PDF.\n"
-"Do you want to save the visit now?"
+"Failed to load UI file: %s. Please check your installation.\n"
+"%s"
 msgstr ""
+"Fallo al cargar el archivo de la interfaz de usuario: %s. Favor revisar su "
+"instalación.\n"
+"%s"
 
-#: ../libclinica/SettingsManager.vala:44
-msgid "Clinica settings"
+#: .././libclinica/LocalFileStore.vala:62
+#, c-format
+msgid "Unable to setup file monitors for the filestore folder: %s"
 msgstr ""
 
-#. Create the use-plugins checkbox
-#: ../libclinica/SettingsManager.vala:56
-msgid "Use plugins (need restart)"
+#: .././libclinica/LocalFileStore.vala:106
+#, c-format
+msgid "Unable to setup a file monitor on directory %s"
 msgstr ""
 
-#: ../libclinica/SettingsManager.vala:71
-msgid "General"
-msgstr ""
+#: .././libclinica/LocalFileStore.vala:141
+#, c-format
+msgid "Error while listing the files for the visit identified by id %d"
+msgstr "Error al listar los archivos para la visita identificada con id %d"
 
-#: ../libclinica/SettingsManager.vala:75
-msgid "Plugins"
+#: .././libclinica/LocalFileStore.vala:167
+msgid "Destination file already exists"
+msgstr "Archivo destino ya existe"
+
+#: .././libclinica/LocalFileStore.vala:172
+#, c-format
+msgid "Error while adding the file %s to the selected visit"
 msgstr ""
+"Ha ocurrido un error agregando el archivo %s a la visita seleccionada"
 
-#: ../libclinica/SettingsManager.vala:113
+#: .././libclinica/NetworkedDataProvider.vala:246
 msgid ""
-"Select the search engine\n"
-"used to find medicines"
+"You canceled the authentication process on the remote server.\n"
+"From now on Clinica will use the local database. If you want to connect to\n"
+"remote server please re-enable networking in the settings dialog."
 msgstr ""
 
-#: ../libclinica/DoctorListStore.vala:73
-msgid "Doctors database seems corrupted."
+#. Set title to edit patient * instead of create new patient
+#: .././libclinica/PatientEditor.vala:304
+#, c-format
+msgid "Edit patient named %s"
+msgstr "Editar el/la paciente %s"
+
+#: .././libclinica/PatientEditor.vala:408
+msgid "You must select a doctor for this patient."
+msgstr "Debe seleccionar un médico para este paciente."
+
+#: .././libclinica/PatientEditor.vala:409
+msgid ""
+"If you need to create a new one type his name in the entry and select Create "
+"new doctor from the completion list."
 msgstr ""
+"Si necesita crear uno nuevo, escriba su nombre y seleccione Crear un doctor "
+"nuevo en la lista."
+
+#: .././libclinica/PatientEditor.vala:445
+msgid "Date inserted is invalid, aborting patient editing"
+msgstr "La fecha insertada no es válida, cancelando la edición del paciente"
+
+#: .././libclinica/AuthenticationDialog.vala:40
+msgid "Authentication required"
+msgstr "Se necesita autenticación"
 
 #. Start of events
-#: ../libclinica/CalendarEventList.vala:70
+#: .././libclinica/CalendarEventList.vala:73
 msgid "Events scheduled"
-msgstr ""
+msgstr "Eventos agendados"
 
-#: ../libclinica/CalendarEventList.vala:89
+#: .././libclinica/CalendarEventList.vala:92
 msgid ""
 "No events on this day.\n"
 "You can create a new event\n"
 "by clicking on the top-left button."
 msgstr ""
+"No hay eventos este día.\n"
+"Puede crear un nuevo evento\n"
+"con el botón superior izquierdo"
 
-#: ../libclinica/CalendarEventList.vala:95
+#: .././libclinica/CalendarEventList.vala:103
 msgid "Visits performed"
-msgstr ""
+msgstr "Visitas realizadas"
 
-#: ../libclinica/CalendarEventList.vala:115
+#: .././libclinica/CalendarEventList.vala:105
+msgid "Visits scheduled"
+msgstr "Visitas agendadas"
+
+#: .././libclinica/CalendarEventList.vala:126
 msgid "No visits performed on this day"
-msgstr ""
+msgstr "No se realizaron visitas este día"
 
-#: ../libclinica/VisitToolbar.vala:90
-msgid "This patient has not a doctor"
+#: .././libclinica/ImportDialog.vala:40
+msgid "Import data from backup file"
 msgstr ""
 
-#: ../libclinica/VisitToolbar.vala:93
-#, c-format
-msgid ""
-"Patient: <b>%s</b>\n"
-"Doctor: <b>%s</b>"
-msgstr ""
-"Paciente: <b>%s</b>\n"
-"Médico: <b>%s</b>"
+#: .././libclinica/PatientContextMenu.vala:57
+msgid "Edit visits"
+msgstr "Editar visitas"
 
-#. Show more details on this patient
-#: ../libclinica/VisitActions.vala:61
-#, fuzzy
-msgid "Edit patient details"
-msgstr "Editar el paciente %s"
+#. File menu
+#: .././libclinica/UIManager.vala:44
+msgid "_File"
+msgstr "_Archivo"
 
-#. Save the visit as a PDF file
-#: ../libclinica/VisitActions.vala:71
-msgid "Save as PDF"
-msgstr ""
+#: .././libclinica/UIManager.vala:45
+msgid "New _patient"
+msgstr "Nuevo _paciente"
 
-#: ../libclinica/EventEditor.vala:93
-msgid "Create a new event"
-msgstr ""
+#: .././libclinica/UIManager.vala:46
+msgid "Create a new patient"
+msgstr "Crear un nuevo paciente"
 
-#: ../libclinica/EventEditor.vala:97
-#, c-format
-msgid "Editing event: %s"
-msgstr ""
+#: .././libclinica/UIManager.vala:47
+msgid "New _doctor"
+msgstr "Nuevo _doctor"
 
-#. Create the entry for title of the event and venue
-#: ../libclinica/EventEditor.vala:114
-msgid "Title"
-msgstr ""
+#: .././libclinica/UIManager.vala:48
+msgid "Create a new doctor"
+msgstr "Crear un nuevo médico"
 
-#: ../libclinica/EventEditor.vala:115
-msgid "Venue"
-msgstr ""
+#: .././libclinica/UIManager.vala:49
+msgid "_Quit"
+msgstr "_Salir"
 
-#: ../libclinica/EventEditor.vala:144
-msgid "Time:"
-msgstr ""
+#: .././libclinica/UIManager.vala:50
+msgid "Quit clinica"
+msgstr "Salir clinica"
 
-#: ../libclinica/EventEditor.vala:160
-msgid "Insert the description here..."
-msgstr ""
+#. View menu
+#: .././libclinica/UIManager.vala:53
+msgid "_View"
+msgstr "_Vista"
 
-#: ../libclinica/EventEditor.vala:198
-msgid "Patient"
-msgstr ""
+#: .././libclinica/UIManager.vala:54
+msgid "_Start page"
+msgstr "Página de _inicio"
 
-#: ../libclinica/EventEditor.vala:255
-msgid "Visit"
-msgstr ""
+#: .././libclinica/UIManager.vala:55
+msgid "Go to the start page of clinica"
+msgstr "Ir a la pagina inicial de Clinica"
 
-#: ../libclinica/DoctorListView.vala:175
-msgid "Select a doctor to delete it!"
-msgstr "Seleccione un médico para eliminarlo"
+#: .././libclinica/UIManager.vala:56
+msgid "_Patients"
+msgstr "_Pacientes"
 
-#: ../libclinica/DoctorListView.vala:186
-msgid ""
-"The doctor that you have selected for removal has some patients "
-"associated. \n"
+#: .././libclinica/UIManager.vala:57
+msgid "Go to the list of patients"
+msgstr "Ir a la lista de pacientes"
+
+#: .././libclinica/UIManager.vala:58
+msgid "_Doctors"
+msgstr "_Médicos"
+
+#: .././libclinica/UIManager.vala:59
+msgid "Go to the list of doctors"
+msgstr "Ir a la lista de doctores"
+
+#: .././libclinica/UIManager.vala:60
+msgid "_Search medicines"
+msgstr "_Buscar medicamentos"
+
+#: .././libclinica/UIManager.vala:61
+msgid "Search medicines online"
+msgstr "Buscar medicinas en linea"
+
+#. Tools menu
+#: .././libclinica/UIManager.vala:64
+msgid "_Tools"
+msgstr "_Herramientas"
+
+#: .././libclinica/UIManager.vala:65
+msgid "_Settings"
+msgstr "_Configuración"
+
+#: .././libclinica/UIManager.vala:66
+msgid "Customize clinica behaviour"
+msgstr "Personalizar el comportamiento de Clinica"
+
+#: .././libclinica/UIManager.vala:67
+msgid "Backup"
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:187
-msgid ""
-"It's not possible to remove it without removing all his patients.\n"
-"\n"
+#: .././libclinica/UIManager.vala:68
+msgid "Backup clinica data to file"
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:188 ../libclinica/DoctorListView.vala:221
-msgid "Do you really want to proceed?"
+#: .././libclinica/UIManager.vala:69
+msgid "Import"
+msgstr "Importar"
+
+#: .././libclinica/UIManager.vala:70
+msgid "Import data from backup files"
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:189
-msgid "Doctor has associated patients"
-msgstr "El médico tiene pacientes asociados"
+#. Help menu
+#: .././libclinica/UIManager.vala:73
+msgid "_Help"
+msgstr "Ay_uda"
 
-#: ../libclinica/DoctorListView.vala:219
-msgid "The following patients will be deleted by this action:\n"
-msgstr "Los siguientes pacientes serán eliminados:\n"
+#: .././libclinica/UIManager.vala:74
+msgid "_Contents"
+msgstr "Índ_ice"
 
-#: ../libclinica/DoctorListView.vala:222
-msgid "Confirm deletion of patients"
-msgstr "Confirmar la eliminación de pacientes"
+#: .././libclinica/UIManager.vala:75
+msgid "Open the help system"
+msgstr "Abrir el sistema de ayuda"
 
-#: ../libclinica/DoctorListView.vala:244
-#, fuzzy
-msgid "Really delete this doctor? All information about him/her will be lost."
-msgstr ""
-"¿Va a eliminar a este médico? Se perderá toda los datos sobre el mismo."
+#: .././libclinica/UIManager.vala:76
+msgid "_Report a bug"
+msgstr "_Informar de un error"
 
-#. Anamnesis
-#: ../libclinica/VisitTab.vala:258 ../libclinica/VisitPrinter.vala:68
-msgid "Anamnesis"
-msgstr "Anamnesis"
+#: .././libclinica/UIManager.vala:77
+msgid "Report a bug online"
+msgstr "Reportar un fallo online"
 
-#. Physical examination
-#: ../libclinica/VisitTab.vala:261 ../libclinica/VisitPrinter.vala:71
-msgid "Physical examination"
-msgstr "Exámen físico"
+#: .././libclinica/UIManager.vala:78
+msgid "_About"
+msgstr "_Acerca de"
 
-#. Laboratory Exam
-#: ../libclinica/VisitTab.vala:264 ../libclinica/VisitPrinter.vala:74
-msgid "Laboratory exam"
-msgstr ""
+#: .././libclinica/UIManager.vala:79
+msgid "Get to know the development team of Clinica"
+msgstr "Conoce al equipo de desarrollo de Clinica"
 
-#: ../libclinica/VisitTab.vala:267
-msgid "Hystopathology"
+#: .././libclinica/BackupEngine.vala:113
+msgid "Please select a valid backup file"
 msgstr ""
 
-#. Diagnosis
-#: ../libclinica/VisitTab.vala:270 ../libclinica/VisitPrinter.vala:80
-msgid "Diagnosis"
-msgstr "Diagnóstico"
+#: .././libclinica/BackupEngine.vala:125
+msgid "Importing data"
+msgstr "Importando datos"
 
-#. Topical therapy
-#: ../libclinica/VisitTab.vala:273 ../libclinica/VisitPrinter.vala:83
-msgid "Topical therapy"
+#: .././libclinica/BackupEngine.vala:126
+msgid "Please wait while Clinica imports the data..."
 msgstr ""
 
-#. Systemic therapy
-#: ../libclinica/VisitTab.vala:276 ../libclinica/VisitPrinter.vala:86
-msgid "Systemic therapy"
+#: .././libclinica/BackupEngine.vala:129
+msgid "Importing the JSON data.."
 msgstr ""
 
-#. Subsequent checks
-#: ../libclinica/VisitTab.vala:279 ../libclinica/VisitPrinter.vala:89
-msgid "Subsequent checks"
+#: .././libclinica/BackupEngine.vala:137
+msgid "Error while parsing the backup JSON data"
 msgstr ""
 
-#: ../libclinica/PluginManager.vala:35
-msgid ""
-"Clinica is extensible via plugins and you can easily enable\n"
-" and disable them using this window."
+#: .././libclinica/BackupEngine.vala:143 .././libclinica/BackupEngine.vala:170
+msgid "An error occurred while parsing the JSON file"
 msgstr ""
 
-#: ../libclinica/CalendarWindow.vala:36
-msgid "Clinica calendar"
+#: .././libclinica/BackupEngine.vala:165
+msgid ""
+"The doctors, patients, visits and events field in the JSON backup should be "
+"arrays, aborting."
 msgstr ""
 
-#. Histopathology
-#: ../libclinica/VisitPrinter.vala:77
-msgid "Histopathology"
+#. Clear the database and put the data back in it
+#. in such a way that won't break relationships.
+#: .././libclinica/BackupEngine.vala:188
+msgid "Clearing the old data in the database..."
 msgstr ""
 
-#: ../libclinica/EventListStore.vala:93
-msgid ""
-"Events database seems corrupted. This is likely to be a bug in the "
-"application"
+#: .././libclinica/BackupEngine.vala:192
+msgid "Loading doctors..."
 msgstr ""
 
-#. Set title of edit doctor dialog, space is important!
-#: ../libclinica/DoctorEditor.vala:91
+#: .././libclinica/BackupEngine.vala:201
 #, c-format
-msgid "Edit doctor named %s"
-msgstr "Editar el doctor %s"
+msgid "- %d doctors have been imported\n"
+msgstr ""
 
-#: ../libclinica/ResourceManager.vala:184
-#, c-format
-msgid "Error creating some configuration files, check permission on %s"
+#: .././libclinica/BackupEngine.vala:203
+msgid "Loading patients..."
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:192
+#: .././libclinica/BackupEngine.vala:216
 #, c-format
-msgid "Error reading some configuration files, check permission on %s"
+msgid "- %d patients have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:218
+msgid "Loading visits..."
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:211
+#: .././libclinica/BackupEngine.vala:231
 #, c-format
-msgid "Failure while settings new database version to %s"
+msgid "- %d visits have been imported\n"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:214
-msgid "Failure while upgrading database"
+#: .././libclinica/BackupEngine.vala:233
+msgid "Loading events..."
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:218
-msgid "Version of the database is not compatible"
-msgstr "La versión de la base de datos no es compatible"
+#: .././libclinica/BackupEngine.vala:249
+#, c-format
+msgid "- %d events have been imported\n"
+msgstr ""
 
-#: ../libclinica/ResourceManager.vala:293
+#: .././libclinica/BackupEngine.vala:258
 msgid ""
-"This is a version of Clinica newer than the one that created the\n"
+"- A FileStore was found but is not available in the current provider\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:283
+#, c-format
+msgid "- %d files have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:287
+msgid "- No FileStore was found in the backup\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:298
+msgid "The import of the data has been completed successfully"
+msgstr ""
+
+#: .././libclinica/PatientListStore.vala:128
+#: .././libclinica/PatientListStore.vala:150
+msgid ""
+"Patients database seems corrupted. This is likely to be a bug in the "
+"application"
+msgstr ""
+"La base de datos de pacientes parece estar dañada. Esto seguramente indica "
+"un error en la aplicación"
+
+#. Print the error message to stdout
+#: .././libclinica/Utils.vala:79
+msgid "ERROR => "
+msgstr "ERROR => "
+
+#: .././libclinica/Utils.vala:83 .././libclinica/Utils.vala:84
+msgid "Clinica encountered an error"
+msgstr "Clinica encontró un error"
+
+#: .././libclinica/LocalMedicinesDatabase.vala:90
+#, c-format
+msgid "Medicine with id = %lld not found in DB: %s"
+msgstr ""
+
+#: .././libclinica/LocalMedicinesDatabase.vala:119
+#, c-format
+msgid "Error inserting medicine in the database: %s"
+msgstr ""
+
+#: .././libclinica/EventEditor.vala:93
+msgid "Create a new event"
+msgstr "Crear un evento nuevo"
+
+#: .././libclinica/EventEditor.vala:97
+#, c-format
+msgid "Editing event: %s"
+msgstr "Editando el evento: %s"
+
+#. Create the entry for title of the event and venue
+#: .././libclinica/EventEditor.vala:115
+msgid "Title"
+msgstr "Título"
+
+#: .././libclinica/EventEditor.vala:116
+msgid "Venue"
+msgstr "Lugar"
+
+#: .././libclinica/EventEditor.vala:151
+msgid "Time:"
+msgstr "Hora:"
+
+#: .././libclinica/EventEditor.vala:167
+msgid "Insert the description here..."
+msgstr "Inserte la descripción aquí…"
+
+#: .././libclinica/EventEditor.vala:205 .././libclinica/VisitToolbar.vala:96
+#, c-format
+msgid "Patient"
+msgstr "Paciente"
+
+#: .././libclinica/EventEditor.vala:264
+msgid "Visit"
+msgstr "Visita"
+
+#: .././libclinica/VisitListStore.vala:99
+msgid ""
+"Visit database seems corrupted. This is likely to be a bug in the application"
+msgstr ""
+"La base de datos de visitas parece estar dañada. Esto seguramente indica un "
+"error en la aplicación"
+
+#: .././libclinica/MedicineSearchPage.vala:76
+#: .././data/resources/ui/start_page.glade.h:5
+msgid "Search medicines"
+msgstr "Buscar medicinas"
+
+#: .././libclinica/MedicineSearchPage.vala:100
+msgid "No search engine available"
+msgstr "No hay ningún motor de búsqueda disponible"
+
+#: .././libclinica/MedicineSearchPage.vala:108
+#, c-format
+msgid "Searching for %s..."
+msgstr "Buscando %s..."
+
+#: .././libclinica/MedicineSearchPage.vala:133
+msgid "Medicines"
+msgstr "Medicamentos"
+
+#: .././libclinica/MedicineSearchPage.vala:96
+msgid "It's not possible to perform a search for medicine"
+msgstr "No se puede realizar una búsqueda por medicina"
+
+#: .././libclinica/SqliteDataProvider.vala:143
+#, c-format
+msgid "Error creating some configuration files, check permission on %s"
+msgstr ""
+"Ocurrió un error al crear algunos archivos de configuración, revise los "
+"permisos en %s"
+
+#: .././libclinica/SqliteDataProvider.vala:151
+#, c-format
+msgid "Error reading some configuration files, check permission on %s"
+msgstr ""
+"Ocurrió un error al leer algunos archivos de configuración, revise los "
+"permisos en %s"
+
+#: .././libclinica/SqliteDataProvider.vala:170
+#, c-format
+msgid "Failure while settings new database version to %s"
+msgstr "Falló al establecer la nueva versión de la base de datos a %s"
+
+#: .././libclinica/SqliteDataProvider.vala:173
+msgid "Failure while upgrading database"
+msgstr "Error actualizando la base de datos"
+
+#: .././libclinica/SqliteDataProvider.vala:177
+msgid "Version of the database is not compatible"
+msgstr "La versión de la base de datos no es compatible"
+
+#: .././libclinica/SqliteDataProvider.vala:199
+msgid ""
+"This is a version of Clinica newer than the one that created the\n"
 "patients database installed on the system.\n"
 "Using this version requires upgrading the database, and\n"
 "<b>the old version will not be able to use it anymore</b>.\n"
 "Do you wish to perform this one-time upgrade?\n"
 msgstr ""
+"Esta es una versión de Clínica mayor a la que creó la base de datos de "
+"pacientes en el sistema,\n"
+"Para utilizar esta versión es requerido actualizar la base de datos y\n"
+"<b>la vieja versión de base de datos no se podrá utilizar nunca más</b>.\n"
+"La actualización sólo se realiza una vez.\n"
+"¿Desea realizar esta actualización?\n"
 
-#: ../libclinica/ResourceManager.vala:294
+#: .././libclinica/SqliteDataProvider.vala:200
 msgid "Upgrade database"
+msgstr "Actualizar base de datos"
+
+#: .././libclinica/SqliteDataProvider.vala:225
+msgid "Database needs to be moved"
+msgstr "La base de datos necesita moverse"
+
+#: .././libclinica/SqliteDataProvider.vala:226
+msgid ""
+"An older version of clinica has been detected and the old database has to be "
+"moved\n"
+"to a new location to continue.\n"
+"<b>The older version of clinica won't work anymore with this setup</b>.\n"
+"Do you still want to continue?"
+msgstr ""
+"Se detectó una versión anterior de clinica, cuya base de datos tiene que ser "
+"movida\n"
+"a una nueva ubicación para continuar.\n"
+"<b>La versión anterior de clinica no funcionará más con esta "
+"configuración</b>.\n"
+"¿Quiere continuar?"
+
+#: .././libclinica/SqliteDataProvider.vala:239
+msgid ""
+"Error while transferring the database to the new default location for "
+"clinica >= 0.2.9"
 msgstr ""
+"Ocurrió un error al transferir la base de datos a la ubicación "
+"predeterminada para clinica >= 0.2.9"
 
-#: ../libclinica/ResourceManager.vala:375
+#: .././libclinica/SqliteDataProvider.vala:251
 msgid "Error upgrading database, please check your installation"
 msgstr ""
+"Error actualizando la base de datos, por favor, compruebe su instalación"
 
-#: ../libclinica/ResourceManager.vala:390
+#: .././libclinica/SqliteDataProvider.vala:266
 #, c-format
 msgid ""
-"Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %d"
+"Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %s"
 msgstr ""
+"Error actualizando la base de datos desde la versión 0.1 a la 0.2, código "
+"error sqlite: %s"
 
-#: ../libclinica/AboutDialog.vala:40
-msgid "Medical records manager"
+#: .././libclinica/SqliteDataProvider.vala:359
+#, c-format
+msgid "Error while retrieving the doctor with id = %s"
 msgstr ""
 
-#: ../libclinica/AboutDialog.vala:42
-msgid "About Clinica"
-msgstr "Sobre Clínica"
+#: .././libclinica/SqliteDataProvider.vala:399
+#, c-format
+msgid "An error occurred while saving the doctor with id %d: %s"
+msgstr "Ha ocurrido un error mientras se grababa el doctor numero %d: %s"
 
-#: ../libclinica/AboutDialog.vala:51
-msgid "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+#: .././libclinica/SqliteDataProvider.vala:468
+#, c-format
+msgid "Error while retrieving the patient with id = %s"
 msgstr ""
 
-#: ../libclinica/AboutDialog.vala:52
-msgid "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+#: .././libclinica/SqliteDataProvider.vala:517
+#: .././libclinica/SqliteDataProvider.vala:652
+#, c-format
+msgid "An error occurred while saving the doctor with id %s: %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:597
+#, c-format
+msgid "Error while retrieving the visit with id = %s"
 msgstr ""
 
-#. Start of LAUNCHPAD contributions. Each one is indented
-#. * of two spaces
-#: ../libclinica/AboutDialog.vala:56
+#: .././libclinica/SqliteDataProvider.vala:686
+#, c-format
+msgid "Error while retrieving the event with id = %d"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:728
+#, c-format
+msgid "An error occurred while saving the event with id %s: %s"
+msgstr "Ha ocurrido un error mientras se guardaba el evento numero %s: %s"
+
+#: .././libclinica/SettingsManager.vala:40
+msgid "Clinica settings"
+msgstr "Configuración de Clinica"
+
+#: .././libclinica/SettingsManager.vala:52
+msgid "Clinica has been built without plugins support"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:135
+msgid "Please use the Network tab to enable the Networked data provider"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:136
+msgid "Use the Network tab"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Disconnect"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Connect"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:191
+#, c-format
+msgid "Connection to the given host failed. Please check your settings."
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:192
+msgid "Connection failed"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:206
+#: .././libclinica/ResourceManager.vala:284
+#, c-format
+msgid "Username or password are wrong. Disconnecting from the server."
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:207
+msgid "Wrong authentication data has been provided"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:60
+msgid "Edit details of patient"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:67
+msgid "Remove this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:74
+msgid "Export this visit as PDF"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:81
+msgid "Print a report of this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:88
+msgid "Save this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:99
+msgid "Close the visits of this patient"
+msgstr ""
+
+#: .././libclinica/VisitToolbar.vala:93
+msgid "This patient has not a doctor"
+msgstr "Este paciente no tiene médico"
+
+#: .././libclinica/VisitToolbar.vala:97
+msgid "Doctor"
+msgstr ""
+
+#: .././libclinica/DateTimePicker.vala:56
+msgid "Hour"
+msgstr "Hora"
+
+#: .././libclinica/DateTimePicker.vala:58
+msgid "Minute"
+msgstr "Minuto"
+
+#: .././libclinica/DoctorListStore.vala:75
+msgid "Doctors database seems corrupted."
+msgstr "La base de datos de médicos parece estar dañada."
+
+#: .././libclinica/DoctorListView.vala:175
+msgid "Select a doctor to delete it!"
+msgstr "Seleccione un médico para eliminarlo"
+
+#: .././libclinica/DoctorListView.vala:186
+msgid ""
+"The doctor that you have selected for removal has some patients associated. "
+"\n"
+msgstr ""
+"El doctor que ha elegido para ser eliminado tiene algunos pacientes "
+"asignados. \n"
+
+#: .././libclinica/DoctorListView.vala:187
 msgid ""
+"It's not possible to remove it without disassociating all his patients.\n"
+"\n"
+msgstr ""
+"No es posible eliminarlo sin antes disasociar todos sus pacientes\n"
 "\n"
-"Launchpad contributions: \n"
+
+#: .././libclinica/DoctorListView.vala:188
+#: .././libclinica/DoctorListView.vala:217
+msgid "Do you really want to proceed?"
+msgstr "¿Realmente quiere proceder?"
+
+#: .././libclinica/DoctorListView.vala:189
+msgid "Doctor has associated patients"
+msgstr "El médico tiene pacientes asociados"
+
+#: .././libclinica/DoctorListView.vala:215
+msgid ""
+"The following patients will be disassociated from this doctor by this "
+"action:\n"
+msgstr ""
+"Los siguientes pacientes serán dísasociados del doctor por la siguiente "
+"acción\n"
+
+#: .././libclinica/DoctorListView.vala:218
+msgid "Confirm disassociation of patients"
+msgstr "Confirmar la disociación de los pacientes"
+
+#: .././libclinica/DoctorListView.vala:235
+msgid ""
+"Really delete this doctor? All information about him/her will be lost."
+msgstr ""
+"¿Seguro de eliminar este médico? Toda la información del médico será perdida."
+
+#. Ask the user where he would like to backup its files.
+#: .././libclinica/UserInterface.vala:360
+msgid "Select the folder where the data should be saved"
+msgstr ""
+
+#. In this string %s refers to the path where the backup has been performed.
+#: .././libclinica/UserInterface.vala:386
+#, c-format
+msgid "Backup completed successfully in the folder %s"
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:387
+msgid "Backup completed"
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:389
+msgid ""
+"Please take care of copying the folder in a safe place for future restore of "
+"the data."
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:416
+#, c-format
+msgid "Cannot open the help: %s"
+msgstr "No se puede abrir la ayuda: %s"
+
+#: .././libclinica/UserInterface.vala:441
+msgid ""
+"An error occurred while opening the bug system. Please go to\n"
+"http://launchpad.net/clinica-project/ to file a bug"
+msgstr ""
+"Ocurrió un error al abrir el sistema de informe de errores. Vaya a\n"
+"http://launchpad.net/clinica-project/ para abrir un informe"
+
+#: .././libclinica/EventDetail.vala:65
+msgid "Edit event"
+msgstr "Editar evento"
+
+#: .././libclinica/EventDetail.vala:112
+msgid "Remove"
+msgstr "Quitar"
+
+#: .././libclinica/EventDetail.vala:145
+msgid "Really delete this event?"
+msgstr "Realmente quiere borrar este evento?"
+
+#: .././libclinica/Sidebar.vala:68
+msgid "Pages"
+msgstr "Páginas"
+
+#: .././libclinica/StartPage.vala:93
+msgid "Dashboard"
+msgstr ""
+
+#: .././libclinica/StartPage.vala:205
+msgid ""
+"Add a new patient \n"
+" with name "
+msgstr ""
+"Añadir un paciente nuevo \n"
+" con nombre "
+
+#: .././libclinica/EventListStore.vala:121
+msgid ""
+"Events database seems corrupted. This is likely to be a bug in the "
+"application"
 msgstr ""
+"La base de datos de eventos parece estar dañada. Esto seguramente indica un "
+"error en la aplicación"
 
-#: ../libclinica/DoctorListPage.vala:70
+#: .././libclinica/DoctorListPage.vala:60
+#: .././libclinica/DoctorListPage.vala:93
 msgid "Doctors"
 msgstr "Médicos"
 
-#. And the button to go back
-#: ../libclinica/MedicineSearchPage.vala:42
-#: ../libclinica/MedicineSearchPage.vala:72
-msgid "Back"
+#: .././libclinica/DoctorListPage.vala:76
+msgid "Add a doctor"
 msgstr ""
 
-#: ../libclinica/MedicineSearchPage.vala:94
-msgid "No search engine available"
+#: .././libclinica/DoctorListPage.vala:82
+msgid "Edit the selected doctor"
+msgstr ""
+
+#: .././libclinica/DoctorListPage.vala:88
+msgid "Remove the selected doctor"
 msgstr ""
 
-#: ../libclinica/MedicineSearchPage.vala:102
+#: .././libclinica/ResourceManager.vala:285
+msgid "Error while authenticating on the server"
+msgstr ""
+
+#: .././libclinica/AboutDialog.vala:41
+msgid "Medical records manager"
+msgstr "Administrador de registros médicos"
+
+#: .././libclinica/AboutDialog.vala:43
+msgid "About Clinica"
+msgstr "Sobre Clínica"
+
+#: .././libclinica/AboutDialog.vala:52
+msgid "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+msgstr "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+
+#: .././libclinica/AboutDialog.vala:53
+msgid "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+msgstr "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+
+#. Histopathology
+#: .././libclinica/VisitPrinter.vala:122
+msgid "Histopathology"
+msgstr "Histopatología"
+
+#. Now write the date of the visit after that
+#: .././libclinica/VisitPrinter.vala:285
 #, c-format
-msgid "Searching for %s..."
+msgid "Report of the visit of %s"
 msgstr ""
 
-#: ../libclinica/MedicineSearchPage.vala:104
-msgid "Stop"
+#: .././libclinica/VisitPrinter.vala:316
+#: .././libclinica/MedicineDetailDialog.vala:109
+msgid "Field empty"
+msgstr "Campo vacío"
+
+#. Add a Attach button
+#: .././libclinica/VisitFileManager.vala:89
+msgid "Attach file"
+msgstr "Adjuntar archivo"
+
+#: .././libclinica/VisitFileManager.vala:97
+msgid "Browse files"
+msgstr "Examinar archivos"
+
+#: .././libclinica/VisitFileManager.vala:113
+msgid "Select a file to attach"
+msgstr "Seleccione un archivo para adjuntar"
+
+#: .././libclinica/VisitFileManager.vala:133
+msgid "Unable to open the browser on the filestore position"
 msgstr ""
+"No se pudo abrir el explorador en la posición del almacén de archivos"
 
-#: ../libclinica/MedicineSearchPage.vala:127
-msgid "Medicine search"
+#: .././libclinica/VisitFileManager.vala:163
+msgid ""
+"Save the visit\n"
+" to attach files"
 msgstr ""
+"Grabar la visita\n"
+" en archivos adjuntos"
 
-#: ../libclinica/MedicineSearchPage.vala:90
-msgid "It's not possible to perform a search for medicine"
+#: .././libclinica/VisitFileManager.vala:170
+msgid "Attach files"
+msgstr "Archivos adjuntos"
+
+#: .././libclinica/SidebarCalendarEntry.vala:30
+msgid "Calendar"
+msgstr ""
+
+#. Create the object and add the close button used
+#. * to dismiss the dialog
+#: .././libclinica/MedicineDetailDialog.vala:46
+msgid "Close"
+msgstr "Cerrar"
+
+#: .././libclinica/MedicineDetailDialog.vala:65
+msgid "General information"
+msgstr "Información general"
+
+#. And now the content for the others fields of the medicine
+#: .././libclinica/MedicineDetailDialog.vala:71
+msgid "Identification Code"
+msgstr "Código de identificación"
+
+#: .././libclinica/MedicineDetailDialog.vala:72
+msgid "Description"
+msgstr "Descripción"
+
+#: .././libclinica/MedicineDetailDialog.vala:73
+msgid "Active ingredient"
+msgstr "Ingrediente activo"
+
+#: .././libclinica/MedicineDetailDialog.vala:74
+msgid "Storage reccomendations"
+msgstr "Recomendaciones de almacenaje"
+
+#: .././libclinica/MedicineDetailDialog.vala:83
+msgid "Additional notes"
+msgstr "Notas adicionales"
+
+#. Nothing to do for now.
+#: .././libclinica/FileDetail.vala:89
+#, c-format
+msgid "Error while loading icon for file %s: %s"
+msgstr "Error cargando icono para el archivo %s: %s"
+
+#: .././libclinica/FileDetail.vala:98
+msgid "Open file"
+msgstr "Abrir archivo"
+
+#: .././libclinica/FileDetail.vala:110
+msgid "Delete file"
+msgstr "Eliminar archivo"
+
+#: .././libclinica/FileDetail.vala:122
+#, c-format
+msgid ""
+"Do you really want to delete the file %s?\n"
+"If you proceed it will be definitively lost."
 msgstr ""
+"Esta seguro de querer borrar el archivo %s?\n"
+"En caso de proceder este se perdera definitivamente."
 
-#: ../clinica/Clinica.vala:57
+#: .././libclinica/FileDetail.vala:135
 #, c-format
-msgid "Clinica %s\n"
-msgstr "Clínica %s\n"
+msgid "Error while opening the file %s"
+msgstr "Error mientras se intentaba abrir el archivo %s"
 
-#: ../ui/new_button.glade.h:1
+#: .././data/resources/ui/start_page.glade.h:1
+msgid "Browse the patients to start a visit"
+msgstr "Buscar en la lista de pacientes para comenzar una visita"
+
+#: .././data/resources/ui/start_page.glade.h:2
 msgid "Add new patient"
 msgstr "Añadir un nuevo  paciente"
 
-#: ../ui/new_button.glade.h:2
-msgid "Browse the patients to start a visit"
-msgstr "Buscar en la lista de pacientes para comenzar una visita"
+#: .././data/resources/ui/start_page.glade.h:3
+msgid "Patient list"
+msgstr "Lista de pacientes"
 
-#: ../ui/new_button.glade.h:3
+#: .././data/resources/ui/start_page.glade.h:4
 msgid "Doctor list"
-msgstr ""
+msgstr "Lista de doctores"
 
-#: ../ui/new_button.glade.h:4
+#: .././data/resources/ui/start_page.glade.h:6
 msgid "Open calendar"
+msgstr "Abrir calendario"
+
+#: .././data/resources/ui/authentication_dialog.glade.h:1
+msgid "The server requires authentication. Please insert your credentials:"
 msgstr ""
 
-#: ../ui/new_button.glade.h:5
-msgid "Patient list"
+#: .././data/resources/ui/authentication_dialog.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:11
+msgid "Username"
 msgstr ""
 
-#: ../ui/new_button.glade.h:6
-msgid "Search medicines"
+#: .././data/resources/ui/authentication_dialog.glade.h:3
+#: .././data/resources/ui/settings_window.glade.h:12
+msgid "Password"
 msgstr ""
 
-#: ../ui/window.glade.h:1
-msgid "Clinica"
-msgstr "Clínica"
+#: .././data/resources/ui/medicine_editor.glade.h:1
+msgid "Name:"
+msgstr ""
 
-#: ../ui/window.glade.h:2
-msgid "New Doctor"
-msgstr "Nuevo médico"
+#: .././data/resources/ui/medicine_editor.glade.h:2
+msgid "Description:"
+msgstr ""
 
-#: ../ui/window.glade.h:3
-msgid "New Patient"
-msgstr "Nuevo paciente"
+#: .././data/resources/ui/medicine_editor.glade.h:3
+msgid "Active ingredient:"
+msgstr ""
 
-#: ../ui/window.glade.h:4
-msgid "_About"
+#: .././data/resources/ui/medicine_editor.glade.h:4
+msgid "Storage reccomendations:"
 msgstr ""
 
-#: ../ui/window.glade.h:5
-msgid "_Contents"
-msgstr "Índ_ice"
+#: .././data/resources/ui/medicine_editor.glade.h:5
+msgid "Price:"
+msgstr ""
 
-#: ../ui/window.glade.h:6
-msgid "_Doctors"
-msgstr "_Médicos"
+#: .././data/resources/ui/medicine_editor.glade.h:6
+msgid "Other notes:"
+msgstr ""
 
-#: ../ui/window.glade.h:7
-msgid "_File"
-msgstr "_Archivo"
+#: .././data/resources/ui/import_dialog.glade.h:1
+msgid "Source:\t"
+msgstr ""
 
-#: ../ui/window.glade.h:8
-msgid "_Help"
-msgstr "Ay_uda"
+#: .././data/resources/ui/import_dialog.glade.h:2
+msgid "Select the backup folder"
+msgstr ""
 
-#: ../ui/window.glade.h:9
-msgid "_Home"
-msgstr "_Inicio"
+#: .././data/resources/ui/import_dialog.glade.h:3
+msgid ""
+"<b>Warning:</b> Please note that the current data in the database <b>will be "
+"definitely lost</b>. Consider performing a backup of the current data before "
+"importing the old one."
+msgstr ""
 
-#: ../ui/window.glade.h:10
-msgid "_Patients"
-msgstr "_Pacientes"
+#: .././data/resources/ui/doctor_editor.glade.h:1
+#: .././data/resources/ui/patient_editor.glade.h:12
+msgid "Doctor:"
+msgstr "Médico"
 
-#: ../ui/window.glade.h:11
-msgid "_Quit"
+#: .././data/resources/ui/doctor_editor.glade.h:4
+#: .././data/resources/ui/patient_editor.glade.h:11
+msgid "Phone:"
+msgstr "Teléfono:"
+
+#: .././data/resources/ui/doctor_editor.glade.h:5
+msgid "Mobile:"
+msgstr "Móvil:"
+
+#: .././data/resources/ui/wait_dialog.glade.h:1
+msgid "label"
 msgstr ""
 
-#: ../ui/window.glade.h:12
-msgid "_Search medicines"
-msgstr "_Buscar medicamentos"
+#: .././data/resources/ui/settings_window.glade.h:1
+msgid "Use plugins (restart required)"
+msgstr ""
 
-#: ../ui/window.glade.h:13
-msgid "_Settings"
-msgstr "_Configuración"
+#: .././data/resources/ui/settings_window.glade.h:2
+msgid "Allow to browse files in visits"
+msgstr "Permitir navegar los archivos en las visitas"
 
-#: ../ui/window.glade.h:14
-msgid "_Tools"
-msgstr "_Herramientas"
+#: .././data/resources/ui/settings_window.glade.h:3
+msgid "Medicines search engine"
+msgstr ""
 
-#: ../ui/window.glade.h:15
-msgid "_View"
-msgstr "_Vista"
+#: .././data/resources/ui/settings_window.glade.h:4
+msgid "Data source"
+msgstr ""
 
-#: ../ui/patient_editor.glade.h:1
-msgid "/"
+#: .././data/resources/ui/settings_window.glade.h:5
+msgid "General"
+msgstr "General"
+
+#: .././data/resources/ui/settings_window.glade.h:6
+msgid "Host"
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:2
-msgid "Address:"
-msgstr "Dirección:"
+#: .././data/resources/ui/settings_window.glade.h:7
+msgid "Port"
+msgstr ""
 
-#: ../ui/patient_editor.glade.h:3
-msgid "Codice fiscale:"
+#: .././data/resources/ui/settings_window.glade.h:8
+msgid "button"
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:4
-msgid "Create a new patient"
-msgstr "Crear un nuevo paciente"
+#: .././data/resources/ui/settings_window.glade.h:9
+msgid "Connection to a remote Clinica instance"
+msgstr ""
 
-#: ../ui/patient_editor.glade.h:5
-msgid "Date of birth:"
-msgstr "Fecha de nacimiento:"
+#: .././data/resources/ui/settings_window.glade.h:10
+msgid "Allow connections of other clinica from the LAN"
+msgstr "Permitir conexiones de otros Clinica desde una red local"
 
-#: ../ui/patient_editor.glade.h:6 ../ui/doctor_editor.glade.h:2
-msgid "Doctor:"
-msgstr "Médico"
+#: .././data/resources/ui/settings_window.glade.h:13
+msgid "Built-in server"
+msgstr ""
 
-#: ../ui/patient_editor.glade.h:7
-msgid "Female"
+#: .././data/resources/ui/settings_window.glade.h:14
+msgid "Network"
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:8
-msgid "Gender:"
+#: .././data/resources/ui/settings_window.glade.h:15
+msgid ""
+"The details that are inserted here will be used when generating\n"
+"the automatic visit reports. "
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:9
-msgid "Male"
+#: .././data/resources/ui/settings_window.glade.h:18
+msgid "Address"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:19
+msgid "Institution"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:20
+msgid "Email"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:21
+msgid "Personal details"
 msgstr ""
 
-#: ../ui/patient_editor.glade.h:11
+#: .././data/resources/ui/settings_window.glade.h:22
+msgid "Plugins"
+msgstr "Complementos"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:1
+msgid "Visits"
+msgstr "Visitas"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:2
+msgid "Schedule a visit"
+msgstr "Programe una visita"
+
+#: .././data/resources/ui/patient_editor.glade.h:1
 msgid "Patient:"
 msgstr "Paciente:"
 
-#: ../ui/patient_editor.glade.h:12 ../ui/doctor_editor.glade.h:5
-msgid "Phone:"
-msgstr "Teléfono:"
+#: .././data/resources/ui/patient_editor.glade.h:4
+msgid "Gender:"
+msgstr "Género:"
+
+#: .././data/resources/ui/patient_editor.glade.h:5
+msgid "Date of birth:"
+msgstr "Fecha de nacimiento:"
 
-#: ../ui/patient_editor.glade.h:14
+#: .././data/resources/ui/patient_editor.glade.h:6
 msgid "dd"
-msgstr ""
+msgstr "dd"
 
-#: ../ui/patient_editor.glade.h:15
+#: .././data/resources/ui/patient_editor.glade.h:7
+msgid "/"
+msgstr "/"
+
+#: .././data/resources/ui/patient_editor.glade.h:8
 msgid "mm"
-msgstr ""
+msgstr "mm"
 
-#: ../ui/patient_editor.glade.h:16
+#: .././data/resources/ui/patient_editor.glade.h:9
 msgid "yyyy"
-msgstr ""
+msgstr "aaaa"
 
-#: ../ui/patient_list_sidebar.glade.h:1
-msgid "Visits"
+#: .././data/resources/ui/patient_editor.glade.h:10
+msgid "Address:"
+msgstr "Dirección:"
+
+#: .././data/resources/ui/patient_editor.glade.h:13
+msgid "Codice fiscale:"
+msgstr "Clave fiscal:"
+
+#: .././data/resources/ui/patient_editor.glade.h:14
+msgid "Male"
+msgstr "Masculino"
+
+#: .././data/resources/ui/patient_editor.glade.h:15
+msgid "Female"
+msgstr "Femenino"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:1
+msgid "Select the date on which you'd like to schedule the visit."
+msgstr "Seleccione la fecha en la que le gustaría programar la visita."
+
+#: .././data/resources/ui/visit_scheduler.glade.h:2
+msgid "Selected patient"
+msgstr "Paciente seleccionado"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:3
+msgid ""
+"<b>Tip:</b> Once created this visit will be visible in the visit editor of "
+"this patient."
 msgstr ""
+"<b>Tip:</b> Una vez creada esta visita, será visible en el editor de visitas "
+"de éste paciente."
 
-#: ../ui/doctor_editor.glade.h:1
-msgid "Create a new doctor"
-msgstr "Crear un nuevo médico"
+#~ msgid "New Patient"
+#~ msgstr "Nuevo paciente"
 
-#: ../ui/doctor_editor.glade.h:3
-msgid "Mobile:"
-msgstr "Móvil:"
+#~ msgid "Clinica"
+#~ msgstr "Clínica"
+
+#~ msgid "New Doctor"
+#~ msgstr "Nuevo médico"
+
+#~ msgid "_Home"
+#~ msgstr "_Inicio"
 
-#~ msgid "Show details of patient"
-#~ msgstr "Mostrar la información del paciente"
+#~ msgid "Confirm deletion of patients"
+#~ msgstr "Confirmar la eliminación de pacientes"
 
-#~ msgid "Hide details of patient"
-#~ msgstr "Ocultar la información del paciente"
+#~ msgid "The following patients will be deleted by this action:\n"
+#~ msgstr "Los siguientes pacientes serán eliminados:\n"
 
-#~ msgid "Browse patient list"
-#~ msgstr "Buscar en la lista de pacientes"
+#~ msgid "Save as PDF"
+#~ msgstr "Guardar como PDF"
 
-#~ msgid "Browse doctor list"
-#~ msgstr "Buscar en la lista de médicos"
+#, c-format
+#~ msgid ""
+#~ "Patient: <b>%s</b>\n"
+#~ "Doctor: <b>%s</b>"
+#~ msgstr ""
+#~ "Paciente: <b>%s</b>\n"
+#~ "Médico: <b>%s</b>"
+
+#, c-format
+#~ msgid "Visits of the patient %s"
+#~ msgstr "Visitas del paciente %s"
+
+#~ msgid ""
+#~ "Select the search engine\n"
+#~ "used to find medicines"
+#~ msgstr ""
+#~ "Elija el motor de búsqueda\n"
+#~ "empleado para buscar medicinas"
+
+#~ msgid "Edit patient details"
+#~ msgstr "Editar los detalles del paciente"
+
+#~ msgid ""
+#~ "It's not possible to remove it without removing all his patients.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "No es posible eliminarlo sin borrar también todos sus pacientes.\n"
+#~ "\n"
+
+#~ msgid "Back"
+#~ msgstr "Atrás"
+
+#~ msgid "Error loading patient_editor.glade."
+#~ msgstr "Error al cargar patient_editor.glade"
+
+#~ msgid "Use plugins (need restart)"
+#~ msgstr "Usar complementos (necesita reiniciar)"
+
+#, c-format
+#~ msgid ""
+#~ "Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %d"
+#~ msgstr ""
+#~ "Error actualizando la base de datos versión 0.1 a 0.2, sqlite retornó: %d"
+
+#~ msgid "Medicine search"
+#~ msgstr "Búsqueda médica"
+
+#~ msgid "Stop"
+#~ msgstr "Detener"
+
+#~ msgid ""
+#~ "\n"
+#~ "Launchpad contributions: \n"
+#~ msgstr ""
+#~ "\n"
+#~ "Contribuciones de Launchpad: \n"
+
+#~ msgid ""
+#~ "You cannot delete a doctor with associated patients. Delete his patients "
+#~ "first."
+#~ msgstr ""
+#~ "No puede eliminar un doctor con pacientes asociados. Primero, elimine a sus "
+#~ "pacientes."
diff --git a/po/id.po b/po/id.po
new file mode 100644
index 0000000..036350a
--- /dev/null
+++ b/po/id.po
@@ -0,0 +1,1437 @@
+# Indonesian translation for clinica-project
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the clinica-project package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: clinica-project\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-04-18 10:23+0200\n"
+"PO-Revision-Date: 2012-04-14 15:48+0000\n"
+"Last-Translator: Arif Rahman Hakim <Unknown>\n"
+"Language-Team: Indonesian <id at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-05-18 05:45+0000\n"
+"X-Generator: Launchpad (build 16626)\n"
+"Language: id\n"
+
+#: .././plugins/AgenziaDelFarmaco.py:166
+msgid "Dosage form"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:167
+msgid "System of supply"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:168
+msgid "Class of eligibility"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:169
+msgid "Firm"
+msgstr ""
+
+#. Title of edit doctor dialog
+#: .././libclinica/DoctorEditor.vala:88
+#, c-format
+msgid "Edit doctor named %s"
+msgstr "Sunting dokter bernama %s"
+
+#: .././libclinica/PatientLens.vala:37
+msgid "Search for patients"
+msgstr ""
+
+#: .././libclinica/PatientLens.vala:43
+msgid "Recently visited patients"
+msgstr ""
+
+#. Create the SidebarEntry
+#: .././libclinica/PatientLens.vala:47 .././libclinica/PatientListPage.vala:64
+#: .././libclinica/PatientListPage.vala:110
+msgid "Patients"
+msgstr "Pasien"
+
+#: .././libclinica/PatientListView.vala:76
+#: .././libclinica/DoctorListView.vala:51
+#: .././data/resources/ui/doctor_editor.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:17
+#: .././data/resources/ui/patient_editor.glade.h:2
+msgid "Name"
+msgstr "Nama"
+
+#. ...and then the surname column
+#: .././libclinica/PatientListView.vala:80
+#: .././libclinica/DoctorListView.vala:56
+#: .././data/resources/ui/doctor_editor.glade.h:3
+#: .././data/resources/ui/patient_editor.glade.h:3
+msgid "Surname"
+msgstr "Nama marga"
+
+#: .././libclinica/PatientListView.vala:165
+msgid "Select a patient to delete it!"
+msgstr "Pilih seorang pasien untuk menghapusnya"
+
+#: .././libclinica/PatientListView.vala:172
+msgid ""
+"Really delete this patient? All information about him/her and the associated "
+"visits will be lost."
+msgstr ""
+"Benar hapus pasien ini? Semua informasi tentangnya dan visit yang "
+"berhubungan akan hilang."
+
+#. Set title according to the patient that we have loaded and connect
+#. * show startup signal to the focusing of the first field in the visit
+#: .././libclinica/VisitPage.vala:63
+#, c-format
+msgid "Visit of the patient %s"
+msgstr ""
+
+#: .././libclinica/PluginManager.vala:35
+msgid ""
+"Clinica is extensible via plugins and you can easily enable\n"
+" and disable them using this window."
+msgstr ""
+"Clinica dapat diekstensikan via plugin dan Anda dengan mudah dapat\n"
+" menghidupkan dan mematikannya menggunakan jendela ini"
+
+#: .././libclinica/VisitSchedulerDialog.vala:60
+#: .././libclinica/VisitSchedulerDialog.vala:76
+msgid "Patient not selected"
+msgstr ""
+
+#: .././libclinica/VisitSchedulerDialog.vala:72
+#, c-format
+msgid "Schedule a vist for the patient %s"
+msgstr ""
+
+#: .././libclinica/Application.vala:113
+#, c-format
+msgid "Option parsing failed: %s\n"
+msgstr ""
+
+#: .././libclinica/Application.vala:148
+#, c-format
+msgid "Clinica %s\n"
+msgstr "Clinica %s\n"
+
+#. Then add add a new visit and keep a reference to new_page
+#. *  to focus it on page loading.
+#. Create a new one and connect it
+#: .././libclinica/VisitBrowser.vala:73 .././libclinica/VisitBrowser.vala:252
+msgid "New visit"
+msgstr "Visit baru"
+
+#: .././libclinica/VisitBrowser.vala:152 .././libclinica/VisitBrowser.vala:209
+msgid ""
+"A visit need to be saved in order to be exported as PDF.\n"
+"Do you want to save the visit now?"
+msgstr ""
+"Visit perlu disimpan untuk diekspor sebagai PDF.\n"
+"Apakah Anda ingin menyimpan visit sekarang?"
+
+#: .././libclinica/VisitBrowser.vala:196
+msgid "Error while delivering the print operation"
+msgstr ""
+
+#: .././libclinica/VisitDetail.vala:70
+msgid "Edit visit"
+msgstr ""
+
+#: .././libclinica/VisitDetail.vala:80 .././libclinica/EventDetail.vala:75
+msgid "Delete event"
+msgstr ""
+
+#: .././libclinica/VisitDetail.vala:104
+msgid "Show details"
+msgstr ""
+
+#: .././libclinica/VisitDetail.vala:125 .././libclinica/VisitTab.vala:269
+msgid ""
+"Deleting a visit will cause all its data to be lost.\n"
+"Do you really want to continue?"
+msgstr ""
+"Menghapus visit akan menyebabkan semua datanya hilang.\n"
+"Apakah Anda benar-benar ingin melanjutkan?"
+
+#. Create menu items, connect them to their callback
+#. * and add it to the menu
+#: .././libclinica/DoctorContextMenu.vala:58
+#: .././libclinica/PatientContextMenu.vala:54
+msgid "Delete"
+msgstr "Hapus"
+
+#. Instantiate menu items
+#: .././libclinica/DoctorContextMenu.vala:59
+#: .././libclinica/PatientContextMenu.vala:51
+#: .././libclinica/EventDetail.vala:111
+msgid "Edit"
+msgstr "Sunting"
+
+#: .././libclinica/MedicineEditor.vala:41
+msgid "Create a new Medicine"
+msgstr ""
+
+#: .././libclinica/CalendarWindow.vala:36
+msgid "Clinica calendar"
+msgstr "Kalender Clinica"
+
+#. Anamnesis
+#: .././libclinica/VisitTab.vala:286 .././libclinica/VisitPrinter.vala:107
+msgid "Anamnesis"
+msgstr "Anamnesis"
+
+#. Physical examination
+#: .././libclinica/VisitTab.vala:289 .././libclinica/VisitPrinter.vala:112
+msgid "Physical examination"
+msgstr "Pemeriksaan fisik"
+
+#. Laboratory Exam
+#: .././libclinica/VisitTab.vala:292 .././libclinica/VisitPrinter.vala:117
+msgid "Laboratory exam"
+msgstr "Pemeriksaan laboratorium"
+
+#: .././libclinica/VisitTab.vala:295
+msgid "Hystopathology"
+msgstr "Patologi anatomi"
+
+#. Diagnosis
+#: .././libclinica/VisitTab.vala:298 .././libclinica/VisitPrinter.vala:127
+msgid "Diagnosis"
+msgstr "Diagnosis"
+
+#. Topical therapy
+#: .././libclinica/VisitTab.vala:301 .././libclinica/VisitPrinter.vala:132
+msgid "Topical therapy"
+msgstr "Terapi topikal"
+
+#. Systemic therapy
+#: .././libclinica/VisitTab.vala:304 .././libclinica/VisitPrinter.vala:137
+msgid "Systemic therapy"
+msgstr "Terapi sistemik"
+
+#. Subsequent checks
+#: .././libclinica/VisitTab.vala:307 .././libclinica/VisitPrinter.vala:142
+msgid "Subsequent checks"
+msgstr "Rencana pemeriksaan"
+
+#: .././libclinica/MedicineTreeView.vala:37
+msgid "Medicine name"
+msgstr ""
+
+#: .././libclinica/MedicineTreeView.vala:40
+#: .././libclinica/MedicineDetailDialog.vala:75
+msgid "Price"
+msgstr "Harga"
+
+#: .././libclinica/PatientListPage.vala:81 .././libclinica/StartPage.vala:211
+msgid "Add a new patient"
+msgstr "Tambah pasien baru"
+
+#: .././libclinica/PatientListPage.vala:87
+msgid "Remove the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:93
+msgid "Modify the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:99
+msgid "Edit visits of the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:105
+msgid "Schedule a visit with the selected patient"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:417
+#, c-format
+msgid "Trying to removing doctor with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:440
+#, c-format
+msgid "Trying to removing patient with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:463
+#, c-format
+msgid "Trying to removing visit with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:486
+#, c-format
+msgid "Trying to removing event with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/Builder.vala:45
+#, c-format
+msgid ""
+"Failed to load UI file: %s. Please check your installation.\n"
+"%s"
+msgstr ""
+
+#: .././libclinica/LocalFileStore.vala:62
+#, c-format
+msgid "Unable to setup file monitors for the filestore folder: %s"
+msgstr ""
+
+#: .././libclinica/LocalFileStore.vala:106
+#, c-format
+msgid "Unable to setup a file monitor on directory %s"
+msgstr ""
+
+#: .././libclinica/LocalFileStore.vala:141
+#, c-format
+msgid "Error while listing the files for the visit identified by id %d"
+msgstr ""
+
+#: .././libclinica/LocalFileStore.vala:167
+msgid "Destination file already exists"
+msgstr ""
+
+#: .././libclinica/LocalFileStore.vala:172
+#, c-format
+msgid "Error while adding the file %s to the selected visit"
+msgstr ""
+
+#: .././libclinica/NetworkedDataProvider.vala:246
+msgid ""
+"You canceled the authentication process on the remote server.\n"
+"From now on Clinica will use the local database. If you want to connect to\n"
+"remote server please re-enable networking in the settings dialog."
+msgstr ""
+
+#. Set title to edit patient * instead of create new patient
+#: .././libclinica/PatientEditor.vala:304
+#, c-format
+msgid "Edit patient named %s"
+msgstr "Sunting pasien bernama %s"
+
+#: .././libclinica/PatientEditor.vala:408
+msgid "You must select a doctor for this patient."
+msgstr "Anda harus memilih dokter untuk pasien ini."
+
+#: .././libclinica/PatientEditor.vala:409
+msgid ""
+"If you need to create a new one type his name in the entry and select Create "
+"new doctor from the completion list."
+msgstr ""
+"Jika Anda perlu membuat baru, ketik namanya dalam entri dan pilih Buat "
+"dokter baru dari daftar pelengkap."
+
+#: .././libclinica/PatientEditor.vala:445
+msgid "Date inserted is invalid, aborting patient editing"
+msgstr ""
+"Tanggal yang dimasukkan tidak valid, menghentikan penyuntingan pasien"
+
+#: .././libclinica/AuthenticationDialog.vala:40
+msgid "Authentication required"
+msgstr ""
+
+#. Start of events
+#: .././libclinica/CalendarEventList.vala:73
+msgid "Events scheduled"
+msgstr "Even terjadwal"
+
+#: .././libclinica/CalendarEventList.vala:92
+msgid ""
+"No events on this day.\n"
+"You can create a new event\n"
+"by clicking on the top-left button."
+msgstr ""
+"Tidak ada even hari ini.\n"
+"Anda dapat membuat even baru\n"
+"dengan mengklik tombol atas-kanan."
+
+#: .././libclinica/CalendarEventList.vala:103
+msgid "Visits performed"
+msgstr "Visit yang dilakukan"
+
+#: .././libclinica/CalendarEventList.vala:105
+msgid "Visits scheduled"
+msgstr "Visit terjadwal"
+
+#: .././libclinica/CalendarEventList.vala:126
+msgid "No visits performed on this day"
+msgstr "Tidak ada visit yang dilakukan hari ini"
+
+#: .././libclinica/ImportDialog.vala:40
+msgid "Import data from backup file"
+msgstr ""
+
+#: .././libclinica/PatientContextMenu.vala:57
+msgid "Edit visits"
+msgstr "Sunting visit"
+
+#. File menu
+#: .././libclinica/UIManager.vala:44
+msgid "_File"
+msgstr "_Berkas"
+
+#: .././libclinica/UIManager.vala:45
+msgid "New _patient"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:46
+msgid "Create a new patient"
+msgstr "Buat pasien baru"
+
+#: .././libclinica/UIManager.vala:47
+msgid "New _doctor"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:48
+msgid "Create a new doctor"
+msgstr "Buat dokter baru"
+
+#: .././libclinica/UIManager.vala:49
+msgid "_Quit"
+msgstr "_Keluar"
+
+#: .././libclinica/UIManager.vala:50
+msgid "Quit clinica"
+msgstr ""
+
+#. View menu
+#: .././libclinica/UIManager.vala:53
+msgid "_View"
+msgstr "_Tampilan"
+
+#: .././libclinica/UIManager.vala:54
+msgid "_Start page"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:55
+msgid "Go to the start page of clinica"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:56
+msgid "_Patients"
+msgstr "_Pasien"
+
+#: .././libclinica/UIManager.vala:57
+msgid "Go to the list of patients"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:58
+msgid "_Doctors"
+msgstr "_Dokter"
+
+#: .././libclinica/UIManager.vala:59
+msgid "Go to the list of doctors"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:60
+msgid "_Search medicines"
+msgstr "_Cari obat"
+
+#: .././libclinica/UIManager.vala:61
+msgid "Search medicines online"
+msgstr ""
+
+#. Tools menu
+#: .././libclinica/UIManager.vala:64
+msgid "_Tools"
+msgstr "_Perkakas"
+
+#: .././libclinica/UIManager.vala:65
+msgid "_Settings"
+msgstr "_Pengaturan"
+
+#: .././libclinica/UIManager.vala:66
+msgid "Customize clinica behaviour"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:67
+msgid "Backup"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:68
+msgid "Backup clinica data to file"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:69
+msgid "Import"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:70
+msgid "Import data from backup files"
+msgstr ""
+
+#. Help menu
+#: .././libclinica/UIManager.vala:73
+msgid "_Help"
+msgstr "_Bantuan"
+
+#: .././libclinica/UIManager.vala:74
+msgid "_Contents"
+msgstr "_Konten"
+
+#: .././libclinica/UIManager.vala:75
+msgid "Open the help system"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:76
+msgid "_Report a bug"
+msgstr "_Laporkan bug"
+
+#: .././libclinica/UIManager.vala:77
+msgid "Report a bug online"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:78
+msgid "_About"
+msgstr "_Tentang"
+
+#: .././libclinica/UIManager.vala:79
+msgid "Get to know the development team of Clinica"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:113
+msgid "Please select a valid backup file"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:125
+msgid "Importing data"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:126
+msgid "Please wait while Clinica imports the data..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:129
+msgid "Importing the JSON data.."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:137
+msgid "Error while parsing the backup JSON data"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:143 .././libclinica/BackupEngine.vala:170
+msgid "An error occurred while parsing the JSON file"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:165
+msgid ""
+"The doctors, patients, visits and events field in the JSON backup should be "
+"arrays, aborting."
+msgstr ""
+
+#. Clear the database and put the data back in it
+#. in such a way that won't break relationships.
+#: .././libclinica/BackupEngine.vala:188
+msgid "Clearing the old data in the database..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:192
+msgid "Loading doctors..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:201
+#, c-format
+msgid "- %d doctors have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:203
+msgid "Loading patients..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:216
+#, c-format
+msgid "- %d patients have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:218
+msgid "Loading visits..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:231
+#, c-format
+msgid "- %d visits have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:233
+msgid "Loading events..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:249
+#, c-format
+msgid "- %d events have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:258
+msgid ""
+"- A FileStore was found but is not available in the current provider\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:283
+#, c-format
+msgid "- %d files have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:287
+msgid "- No FileStore was found in the backup\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:298
+msgid "The import of the data has been completed successfully"
+msgstr ""
+
+#: .././libclinica/PatientListStore.vala:128
+#: .././libclinica/PatientListStore.vala:150
+msgid ""
+"Patients database seems corrupted. This is likely to be a bug in the "
+"application"
+msgstr ""
+"Basisdata pasien tampaknya rusak. Hal ini sepertinya adalah bug dalam "
+"aplikasi."
+
+#. Print the error message to stdout
+#: .././libclinica/Utils.vala:79
+msgid "ERROR => "
+msgstr "[31;1mERROR => "
+
+#: .././libclinica/Utils.vala:83 .././libclinica/Utils.vala:84
+msgid "Clinica encountered an error"
+msgstr "Clinica menghadapi galat"
+
+#: .././libclinica/LocalMedicinesDatabase.vala:90
+#, c-format
+msgid "Medicine with id = %lld not found in DB: %s"
+msgstr ""
+
+#: .././libclinica/LocalMedicinesDatabase.vala:119
+#, c-format
+msgid "Error inserting medicine in the database: %s"
+msgstr ""
+
+#: .././libclinica/EventEditor.vala:93
+msgid "Create a new event"
+msgstr "Buat even baruen"
+
+#: .././libclinica/EventEditor.vala:97
+#, c-format
+msgid "Editing event: %s"
+msgstr "Sunting even: %s"
+
+#. Create the entry for title of the event and venue
+#: .././libclinica/EventEditor.vala:115
+msgid "Title"
+msgstr "Judul"
+
+#: .././libclinica/EventEditor.vala:116
+msgid "Venue"
+msgstr "Tempat"
+
+#: .././libclinica/EventEditor.vala:151
+msgid "Time:"
+msgstr "Waktu:"
+
+#: .././libclinica/EventEditor.vala:167
+msgid "Insert the description here..."
+msgstr "Sisipkan gambaran di sini..."
+
+#: .././libclinica/EventEditor.vala:205 .././libclinica/VisitToolbar.vala:96
+#, c-format
+msgid "Patient"
+msgstr "Pasien"
+
+#: .././libclinica/EventEditor.vala:264
+msgid "Visit"
+msgstr "Visit"
+
+#: .././libclinica/VisitListStore.vala:99
+msgid ""
+"Visit database seems corrupted. This is likely to be a bug in the application"
+msgstr "Basisdata visit rusak. Hal ini tampaknya adalah bug dalam aplikasi."
+
+#: .././libclinica/MedicineSearchPage.vala:76
+#: .././data/resources/ui/start_page.glade.h:5
+msgid "Search medicines"
+msgstr "Cari obat"
+
+#: .././libclinica/MedicineSearchPage.vala:100
+msgid "No search engine available"
+msgstr "Tidak ada mesin pencari yang tersedia"
+
+#: .././libclinica/MedicineSearchPage.vala:108
+#, c-format
+msgid "Searching for %s..."
+msgstr "Mencari %s..."
+
+#: .././libclinica/MedicineSearchPage.vala:133
+msgid "Medicines"
+msgstr ""
+
+#: .././libclinica/MedicineSearchPage.vala:96
+msgid "It's not possible to perform a search for medicine"
+msgstr "Tidak mungkin untuk melakukan pencarian obat"
+
+#: .././libclinica/SqliteDataProvider.vala:143
+#, c-format
+msgid "Error creating some configuration files, check permission on %s"
+msgstr "Galat membuat beberapa berkas konfigurasi, periksa izin pada %s"
+
+#: .././libclinica/SqliteDataProvider.vala:151
+#, c-format
+msgid "Error reading some configuration files, check permission on %s"
+msgstr "Galat membaca beberapa berkas konfigurasi, periksa izin pada %s"
+
+#: .././libclinica/SqliteDataProvider.vala:170
+#, c-format
+msgid "Failure while settings new database version to %s"
+msgstr "Kegagalan saat mengatur versi basisdata baru ke %s"
+
+#: .././libclinica/SqliteDataProvider.vala:173
+msgid "Failure while upgrading database"
+msgstr "Kegagalan saat memutakhirkan basisdata"
+
+#: .././libclinica/SqliteDataProvider.vala:177
+msgid "Version of the database is not compatible"
+msgstr "Versi basisdata tidak cocok"
+
+#: .././libclinica/SqliteDataProvider.vala:199
+msgid ""
+"This is a version of Clinica newer than the one that created the\n"
+"patients database installed on the system.\n"
+"Using this version requires upgrading the database, and\n"
+"<b>the old version will not be able to use it anymore</b>.\n"
+"Do you wish to perform this one-time upgrade?\n"
+msgstr ""
+"Ini adalah versi Clinica yang lebih baru daripada yang membuat\n"
+"basisdata pasien yang terpasang dalam sistem.\n"
+"Menggunakan versi ini memerlukan pemutakhiran basisdata, dan\n"
+"<b>versi lama tidak akan dapat menggunakannya lagi</b>.\n"
+"Apakah Anda ingin melakukan pemutakhiran sekali-waktu ini?\n"
+
+#: .././libclinica/SqliteDataProvider.vala:200
+msgid "Upgrade database"
+msgstr "Mutakhirkan basisdata"
+
+#: .././libclinica/SqliteDataProvider.vala:225
+msgid "Database needs to be moved"
+msgstr "Basisdata perlu dipindah"
+
+#: .././libclinica/SqliteDataProvider.vala:226
+msgid ""
+"An older version of clinica has been detected and the old database has to be "
+"moved\n"
+"to a new location to continue.\n"
+"<b>The older version of clinica won't work anymore with this setup</b>.\n"
+"Do you still want to continue?"
+msgstr ""
+"Versi lama Clinica terdeteksi dan basisdata lama harus dipindah\n"
+"ke lokasi baru untuk melanjutkan.\n"
+"<b>Versi lama Clinica tidak akan bekerja lagi dengan pengaturan ini</b>.\n"
+"Apakah Anda masih ingin melanjutkan?"
+
+#: .././libclinica/SqliteDataProvider.vala:239
+msgid ""
+"Error while transferring the database to the new default location for "
+"clinica >= 0.2.9"
+msgstr ""
+"Galat saat memindah basisdata ke lokasi baru default untuk Clinica >= 0.2.9"
+
+#: .././libclinica/SqliteDataProvider.vala:251
+msgid "Error upgrading database, please check your installation"
+msgstr "Galat pemutakhiran basisdata, silakan periksa penginstalan Anda"
+
+#: .././libclinica/SqliteDataProvider.vala:266
+#, c-format
+msgid ""
+"Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:359
+#, c-format
+msgid "Error while retrieving the doctor with id = %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:399
+#, c-format
+msgid "An error occurred while saving the doctor with id %d: %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:468
+#, c-format
+msgid "Error while retrieving the patient with id = %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:517
+#: .././libclinica/SqliteDataProvider.vala:652
+#, c-format
+msgid "An error occurred while saving the doctor with id %s: %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:597
+#, c-format
+msgid "Error while retrieving the visit with id = %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:686
+#, c-format
+msgid "Error while retrieving the event with id = %d"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:728
+#, c-format
+msgid "An error occurred while saving the event with id %s: %s"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:40
+msgid "Clinica settings"
+msgstr "Pengaturan Clinica"
+
+#: .././libclinica/SettingsManager.vala:52
+msgid "Clinica has been built without plugins support"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:135
+msgid "Please use the Network tab to enable the Networked data provider"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:136
+msgid "Use the Network tab"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Disconnect"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Connect"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:191
+#, c-format
+msgid "Connection to the given host failed. Please check your settings."
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:192
+msgid "Connection failed"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:206
+#: .././libclinica/ResourceManager.vala:284
+#, c-format
+msgid "Username or password are wrong. Disconnecting from the server."
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:207
+msgid "Wrong authentication data has been provided"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:60
+msgid "Edit details of patient"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:67
+msgid "Remove this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:74
+msgid "Export this visit as PDF"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:81
+msgid "Print a report of this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:88
+msgid "Save this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:99
+msgid "Close the visits of this patient"
+msgstr ""
+
+#: .././libclinica/VisitToolbar.vala:93
+msgid "This patient has not a doctor"
+msgstr "Pasien ini tidak mempunyai dokter"
+
+#: .././libclinica/VisitToolbar.vala:97
+msgid "Doctor"
+msgstr ""
+
+#: .././libclinica/DateTimePicker.vala:56
+msgid "Hour"
+msgstr ""
+
+#: .././libclinica/DateTimePicker.vala:58
+msgid "Minute"
+msgstr ""
+
+#: .././libclinica/DoctorListStore.vala:75
+msgid "Doctors database seems corrupted."
+msgstr "Basisdata dokter tampaknya rusak."
+
+#: .././libclinica/DoctorListView.vala:175
+msgid "Select a doctor to delete it!"
+msgstr "Pilih dokter untuk menghapusnya!"
+
+#: .././libclinica/DoctorListView.vala:186
+msgid ""
+"The doctor that you have selected for removal has some patients associated. "
+"\n"
+msgstr ""
+"Dokter yang telah Anda pilih untuk penghapusan mempunyai beberapa pasien "
+"yang berhubungan. \n"
+
+#: .././libclinica/DoctorListView.vala:187
+msgid ""
+"It's not possible to remove it without disassociating all his patients.\n"
+"\n"
+msgstr ""
+
+#: .././libclinica/DoctorListView.vala:188
+#: .././libclinica/DoctorListView.vala:217
+msgid "Do you really want to proceed?"
+msgstr "Apakah Anda benar-benar ingin melanjutkan?"
+
+#: .././libclinica/DoctorListView.vala:189
+msgid "Doctor has associated patients"
+msgstr "Dokter mempunyai pasien yang berhubungan"
+
+#: .././libclinica/DoctorListView.vala:215
+msgid ""
+"The following patients will be disassociated from this doctor by this "
+"action:\n"
+msgstr ""
+
+#: .././libclinica/DoctorListView.vala:218
+msgid "Confirm disassociation of patients"
+msgstr ""
+
+#: .././libclinica/DoctorListView.vala:235
+msgid ""
+"Really delete this doctor? All information about him/her will be lost."
+msgstr "Benar hapus dokter ini? Semua informasi tentangnya akan hilang."
+
+#. Ask the user where he would like to backup its files.
+#: .././libclinica/UserInterface.vala:360
+msgid "Select the folder where the data should be saved"
+msgstr ""
+
+#. In this string %s refers to the path where the backup has been performed.
+#: .././libclinica/UserInterface.vala:386
+#, c-format
+msgid "Backup completed successfully in the folder %s"
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:387
+msgid "Backup completed"
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:389
+msgid ""
+"Please take care of copying the folder in a safe place for future restore of "
+"the data."
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:416
+#, c-format
+msgid "Cannot open the help: %s"
+msgstr "Tidak dapat membuka bantuan: %s"
+
+#: .././libclinica/UserInterface.vala:441
+msgid ""
+"An error occurred while opening the bug system. Please go to\n"
+"http://launchpad.net/clinica-project/ to file a bug"
+msgstr ""
+"Galat terjadi saat membuka sistem bug. Silakan pergi ke\n"
+"http://launchpad.net/clinica-project/ untuk mencatatkan bug"
+
+#: .././libclinica/EventDetail.vala:65
+msgid "Edit event"
+msgstr ""
+
+#: .././libclinica/EventDetail.vala:112
+msgid "Remove"
+msgstr ""
+
+#: .././libclinica/EventDetail.vala:145
+msgid "Really delete this event?"
+msgstr ""
+
+#: .././libclinica/Sidebar.vala:68
+msgid "Pages"
+msgstr ""
+
+#: .././libclinica/StartPage.vala:93
+msgid "Dashboard"
+msgstr ""
+
+#: .././libclinica/StartPage.vala:205
+msgid ""
+"Add a new patient \n"
+" with name "
+msgstr ""
+"Tambah pasien baru \n"
+" dengan nama "
+
+#: .././libclinica/EventListStore.vala:121
+msgid ""
+"Events database seems corrupted. This is likely to be a bug in the "
+"application"
+msgstr ""
+"Basisdata even tampaknya rusak. Hal ini sepertinya adalah bug dalam aplikasi."
+
+#: .././libclinica/DoctorListPage.vala:60
+#: .././libclinica/DoctorListPage.vala:93
+msgid "Doctors"
+msgstr "Dokter"
+
+#: .././libclinica/DoctorListPage.vala:76
+msgid "Add a doctor"
+msgstr ""
+
+#: .././libclinica/DoctorListPage.vala:82
+msgid "Edit the selected doctor"
+msgstr ""
+
+#: .././libclinica/DoctorListPage.vala:88
+msgid "Remove the selected doctor"
+msgstr ""
+
+#: .././libclinica/ResourceManager.vala:285
+msgid "Error while authenticating on the server"
+msgstr ""
+
+#: .././libclinica/AboutDialog.vala:41
+msgid "Medical records manager"
+msgstr "Pengatur rekam medis"
+
+#: .././libclinica/AboutDialog.vala:43
+msgid "About Clinica"
+msgstr "Tentang Clinica"
+
+#: .././libclinica/AboutDialog.vala:52
+msgid "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+msgstr "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+
+#: .././libclinica/AboutDialog.vala:53
+msgid "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+msgstr "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+
+#. Histopathology
+#: .././libclinica/VisitPrinter.vala:122
+msgid "Histopathology"
+msgstr "Patologi anatomi"
+
+#. Now write the date of the visit after that
+#: .././libclinica/VisitPrinter.vala:285
+#, c-format
+msgid "Report of the visit of %s"
+msgstr ""
+
+#: .././libclinica/VisitPrinter.vala:316
+#: .././libclinica/MedicineDetailDialog.vala:109
+msgid "Field empty"
+msgstr "Isian kosong"
+
+#. Add a Attach button
+#: .././libclinica/VisitFileManager.vala:89
+msgid "Attach file"
+msgstr ""
+
+#: .././libclinica/VisitFileManager.vala:97
+msgid "Browse files"
+msgstr ""
+
+#: .././libclinica/VisitFileManager.vala:113
+msgid "Select a file to attach"
+msgstr ""
+
+#: .././libclinica/VisitFileManager.vala:133
+msgid "Unable to open the browser on the filestore position"
+msgstr ""
+
+#: .././libclinica/VisitFileManager.vala:163
+msgid ""
+"Save the visit\n"
+" to attach files"
+msgstr ""
+
+#: .././libclinica/VisitFileManager.vala:170
+msgid "Attach files"
+msgstr ""
+
+#: .././libclinica/SidebarCalendarEntry.vala:30
+msgid "Calendar"
+msgstr ""
+
+#. Create the object and add the close button used
+#. * to dismiss the dialog
+#: .././libclinica/MedicineDetailDialog.vala:46
+msgid "Close"
+msgstr "Tutup"
+
+#: .././libclinica/MedicineDetailDialog.vala:65
+msgid "General information"
+msgstr "Informasi umum"
+
+#. And now the content for the others fields of the medicine
+#: .././libclinica/MedicineDetailDialog.vala:71
+msgid "Identification Code"
+msgstr "Kode Identifikasi"
+
+#: .././libclinica/MedicineDetailDialog.vala:72
+msgid "Description"
+msgstr "Gambaran"
+
+#: .././libclinica/MedicineDetailDialog.vala:73
+msgid "Active ingredient"
+msgstr "Bahan aktif"
+
+#: .././libclinica/MedicineDetailDialog.vala:74
+msgid "Storage reccomendations"
+msgstr "Rekomendasi penyimpanan"
+
+#: .././libclinica/MedicineDetailDialog.vala:83
+msgid "Additional notes"
+msgstr "Catatan tambahan"
+
+#. Nothing to do for now.
+#: .././libclinica/FileDetail.vala:89
+#, c-format
+msgid "Error while loading icon for file %s: %s"
+msgstr ""
+
+#: .././libclinica/FileDetail.vala:98
+msgid "Open file"
+msgstr ""
+
+#: .././libclinica/FileDetail.vala:110
+msgid "Delete file"
+msgstr ""
+
+#: .././libclinica/FileDetail.vala:122
+#, c-format
+msgid ""
+"Do you really want to delete the file %s?\n"
+"If you proceed it will be definitively lost."
+msgstr ""
+
+#: .././libclinica/FileDetail.vala:135
+#, c-format
+msgid "Error while opening the file %s"
+msgstr ""
+
+#: .././data/resources/ui/start_page.glade.h:1
+msgid "Browse the patients to start a visit"
+msgstr "Rambah pasien untuk memulai visit"
+
+#: .././data/resources/ui/start_page.glade.h:2
+msgid "Add new patient"
+msgstr "Tambah pasien baru"
+
+#: .././data/resources/ui/start_page.glade.h:3
+msgid "Patient list"
+msgstr "Daftar pasien"
+
+#: .././data/resources/ui/start_page.glade.h:4
+msgid "Doctor list"
+msgstr "Daftar dokter"
+
+#: .././data/resources/ui/start_page.glade.h:6
+msgid "Open calendar"
+msgstr "Buka kalender"
+
+#: .././data/resources/ui/authentication_dialog.glade.h:1
+msgid "The server requires authentication. Please insert your credentials:"
+msgstr ""
+
+#: .././data/resources/ui/authentication_dialog.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:11
+msgid "Username"
+msgstr ""
+
+#: .././data/resources/ui/authentication_dialog.glade.h:3
+#: .././data/resources/ui/settings_window.glade.h:12
+msgid "Password"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:1
+msgid "Name:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:2
+msgid "Description:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:3
+msgid "Active ingredient:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:4
+msgid "Storage reccomendations:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:5
+msgid "Price:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:6
+msgid "Other notes:"
+msgstr ""
+
+#: .././data/resources/ui/import_dialog.glade.h:1
+msgid "Source:\t"
+msgstr ""
+
+#: .././data/resources/ui/import_dialog.glade.h:2
+msgid "Select the backup folder"
+msgstr ""
+
+#: .././data/resources/ui/import_dialog.glade.h:3
+msgid ""
+"<b>Warning:</b> Please note that the current data in the database <b>will be "
+"definitely lost</b>. Consider performing a backup of the current data before "
+"importing the old one."
+msgstr ""
+
+#: .././data/resources/ui/doctor_editor.glade.h:1
+#: .././data/resources/ui/patient_editor.glade.h:12
+msgid "Doctor:"
+msgstr "Dokter:"
+
+#: .././data/resources/ui/doctor_editor.glade.h:4
+#: .././data/resources/ui/patient_editor.glade.h:11
+msgid "Phone:"
+msgstr "Telepon:"
+
+#: .././data/resources/ui/doctor_editor.glade.h:5
+msgid "Mobile:"
+msgstr "Telepon genggam:"
+
+#: .././data/resources/ui/wait_dialog.glade.h:1
+msgid "label"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:1
+msgid "Use plugins (restart required)"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:2
+msgid "Allow to browse files in visits"
+msgstr "Izinkan merambah berkas dalam visit"
+
+#: .././data/resources/ui/settings_window.glade.h:3
+msgid "Medicines search engine"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:4
+msgid "Data source"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:5
+msgid "General"
+msgstr "Umum"
+
+#: .././data/resources/ui/settings_window.glade.h:6
+msgid "Host"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:7
+msgid "Port"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:8
+msgid "button"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:9
+msgid "Connection to a remote Clinica instance"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:10
+msgid "Allow connections of other clinica from the LAN"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:13
+msgid "Built-in server"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:14
+msgid "Network"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:15
+msgid ""
+"The details that are inserted here will be used when generating\n"
+"the automatic visit reports. "
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:18
+msgid "Address"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:19
+msgid "Institution"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:20
+msgid "Email"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:21
+msgid "Personal details"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:22
+msgid "Plugins"
+msgstr "Plugin"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:1
+msgid "Visits"
+msgstr "Visit"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:2
+msgid "Schedule a visit"
+msgstr ""
+
+#: .././data/resources/ui/patient_editor.glade.h:1
+msgid "Patient:"
+msgstr "Pasien:"
+
+#: .././data/resources/ui/patient_editor.glade.h:4
+msgid "Gender:"
+msgstr "Jenis kelamin:"
+
+#: .././data/resources/ui/patient_editor.glade.h:5
+msgid "Date of birth:"
+msgstr "Tanggal lahir:"
+
+#: .././data/resources/ui/patient_editor.glade.h:6
+msgid "dd"
+msgstr "tt"
+
+#: .././data/resources/ui/patient_editor.glade.h:7
+msgid "/"
+msgstr "-"
+
+#: .././data/resources/ui/patient_editor.glade.h:8
+msgid "mm"
+msgstr "bb"
+
+#: .././data/resources/ui/patient_editor.glade.h:9
+msgid "yyyy"
+msgstr "hhhh"
+
+#: .././data/resources/ui/patient_editor.glade.h:10
+msgid "Address:"
+msgstr "Alamat:"
+
+#: .././data/resources/ui/patient_editor.glade.h:13
+msgid "Codice fiscale:"
+msgstr "NPWP:"
+
+#: .././data/resources/ui/patient_editor.glade.h:14
+msgid "Male"
+msgstr "Laki-laki"
+
+#: .././data/resources/ui/patient_editor.glade.h:15
+msgid "Female"
+msgstr "Perempuan"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:1
+msgid "Select the date on which you'd like to schedule the visit."
+msgstr ""
+
+#: .././data/resources/ui/visit_scheduler.glade.h:2
+msgid "Selected patient"
+msgstr ""
+
+#: .././data/resources/ui/visit_scheduler.glade.h:3
+msgid ""
+"<b>Tip:</b> Once created this visit will be visible in the visit editor of "
+"this patient."
+msgstr ""
+
+#~ msgid ""
+#~ "You cannot delete a doctor with associated patients. Delete his patients "
+#~ "first."
+#~ msgstr ""
+#~ "Anda tidak dapat menghapus dokter yang mempunyai pasien. Hapus pasiennya "
+#~ "terlebih dahulu."
+
+#, c-format
+#~ msgid "Visits of the patient %s"
+#~ msgstr "Visit pasien %s"
+
+#~ msgid ""
+#~ "Select the search engine\n"
+#~ "used to find medicines"
+#~ msgstr ""
+#~ "Pilih mesin pencari yang\n"
+#~ "digunakan untuk mencari obat"
+
+#~ msgid "Use plugins (need restart)"
+#~ msgstr "Gunakan plugin (perlu restart)"
+
+#~ msgid "Edit patient details"
+#~ msgstr "Sunting rincian pasien"
+
+#~ msgid "Save as PDF"
+#~ msgstr "Simpan sebagai PDF"
+
+#, c-format
+#~ msgid ""
+#~ "Patient: <b>%s</b>\n"
+#~ "Doctor: <b>%s</b>"
+#~ msgstr ""
+#~ "Pasien: <b>%s</b>\n"
+#~ "Dokter: <b>%s</b>"
+
+#~ msgid ""
+#~ "It's not possible to remove it without removing all his patients.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Tidak mungkin untuk menghapusnya tanpa menghapus semua pasiennya.\n"
+#~ "\n"
+
+#~ msgid "Confirm deletion of patients"
+#~ msgstr "Konfirmasi penghapusan pasien"
+
+#~ msgid "The following patients will be deleted by this action:\n"
+#~ msgstr "Pasien-pasien berikut akan dihapus dengan aksi ini:\n"
+
+#, c-format
+#~ msgid ""
+#~ "Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %d"
+#~ msgstr ""
+#~ "Galat pemutakhiran basisdata dari versi 0.1 ke 0.2, kode keluar sqlite: %d"
+
+#~ msgid "Stop"
+#~ msgstr "Berhenti"
+
+#~ msgid "Medicine search"
+#~ msgstr "Pencarian obat"
+
+#~ msgid "Clinica"
+#~ msgstr "Clinica"
+
+#~ msgid "New Patient"
+#~ msgstr "Pasien Baru"
+
+#~ msgid "New Doctor"
+#~ msgstr "Dokter Baru"
+
+#~ msgid "_Home"
+#~ msgstr "_Beranda"
+
+#~ msgid "Back"
+#~ msgstr "Kembali"
+
+#~ msgid "Error loading patient_editor.glade."
+#~ msgstr "Galat memuat patient_editor.glade."
+
+#~ msgid ""
+#~ "\n"
+#~ "Launchpad contributions: \n"
+#~ msgstr ""
+#~ "\n"
+#~ "Kontributor Launchpad: \n"
diff --git a/po/it.po b/po/it.po
index c9ec3f5..2d0e150 100644
--- a/po/it.po
+++ b/po/it.po
@@ -6,238 +6,344 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Clinica 0.1\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-12-19 07:28+0100\n"
-"PO-Revision-Date: 2011-11-11 09:45+0000\n"
-"Last-Translator: Fidel Nadera <Unknown>\n"
+"POT-Creation-Date: 2013-04-18 10:23+0200\n"
+"PO-Revision-Date: 2013-05-09 09:54+0000\n"
+"Last-Translator: Leonardo Robol <Unknown>\n"
 "Language-Team: Clinica Development team\n"
-"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-11-20 06:07+0000\n"
-"X-Generator: Launchpad (build 14299)\n"
+"X-Launchpad-Export-Date: 2013-05-18 05:45+0000\n"
+"X-Generator: Launchpad (build 16626)\n"
+"Language: \n"
 
-#: ../libclinica/Doctor.vala:110
-msgid ""
-"You cannot delete a doctor with associated patients. Delete his patients "
-"first."
-msgstr ""
-"Non puoi cancellare un dottore con pazienti associati. Prima cancella i suoi "
-"pazienti."
+#: .././plugins/AgenziaDelFarmaco.py:166
+msgid "Dosage form"
+msgstr "Forma farmaceutica"
 
-#: ../libclinica/VisitListStore.vala:103
-msgid ""
-"Visit database seems corrupted. This is likely to be a bug in the application"
-msgstr ""
-"Il database delle visite sembra danneggiato. Questo potrebbe essere un "
-"problema dell'applicazione"
+#: .././plugins/AgenziaDelFarmaco.py:167
+msgid "System of supply"
+msgstr "Regime di fornitura"
+
+#: .././plugins/AgenziaDelFarmaco.py:168
+msgid "Class of eligibility"
+msgstr "Classe di rimborsabilità"
 
-#: ../libclinica/UserInterface.vala:282
+#: .././plugins/AgenziaDelFarmaco.py:169
+msgid "Firm"
+msgstr "Ditta"
+
+#. Title of edit doctor dialog
+#: .././libclinica/DoctorEditor.vala:88
 #, c-format
-msgid "Cannot open the help: %s"
-msgstr "Impossibile aprire l'aiuto: %s"
+msgid "Edit doctor named %s"
+msgstr "Modifica il dottore %s"
+
+#: .././libclinica/PatientLens.vala:37
+msgid "Search for patients"
+msgstr "Cerca fra i pazienti"
 
-#: ../libclinica/PatientListPage.vala:74
+#: .././libclinica/PatientLens.vala:43
+msgid "Recently visited patients"
+msgstr "Pazienti visitati recentemente"
+
+#. Create the SidebarEntry
+#: .././libclinica/PatientLens.vala:47 .././libclinica/PatientListPage.vala:64
+#: .././libclinica/PatientListPage.vala:110
 msgid "Patients"
 msgstr "Pazienti"
 
-#: ../libclinica/PatientListView.vala:76
-#: ../libclinica/MedicineTreeView.vala:18 ../libclinica/DoctorListView.vala:51
-#: ../ui/patient_editor.glade.h:10 ../ui/doctor_editor.glade.h:4
+#: .././libclinica/PatientListView.vala:76
+#: .././libclinica/DoctorListView.vala:51
+#: .././data/resources/ui/doctor_editor.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:17
+#: .././data/resources/ui/patient_editor.glade.h:2
 msgid "Name"
 msgstr "Nome"
 
 #. ...and then the surname column
-#: ../libclinica/PatientListView.vala:80 ../libclinica/DoctorListView.vala:56
-#: ../ui/patient_editor.glade.h:13 ../ui/doctor_editor.glade.h:6
+#: .././libclinica/PatientListView.vala:80
+#: .././libclinica/DoctorListView.vala:56
+#: .././data/resources/ui/doctor_editor.glade.h:3
+#: .././data/resources/ui/patient_editor.glade.h:3
 msgid "Surname"
 msgstr "Cognome"
 
-#: ../libclinica/PatientListView.vala:174
+#: .././libclinica/PatientListView.vala:165
 msgid "Select a patient to delete it!"
 msgstr "Seleziona un paziente per eliminarlo!"
 
-#: ../libclinica/PatientListView.vala:181
-#, fuzzy
+#: .././libclinica/PatientListView.vala:172
 msgid ""
 "Really delete this patient? All information about him/her and the associated "
 "visits will be lost."
 msgstr ""
-"Vuoi davvero cancellare questo paziente? Tutte le informazioni su di lui/lei "
-"e le visite associate saranno perse."
-
-#. Print the error message to stdout
-#: ../libclinica/Utils.vala:79
-msgid "ERROR => "
-msgstr "ERRORE => "
+"Si è sicuri di voler rimuovere il paziente? Tutte le informazioni su di lui "
+"o lei saranno perse."
 
-#: ../libclinica/Utils.vala:83 ../libclinica/Utils.vala:84
-msgid "Clinica encountered an error"
-msgstr "Si  verificato un errore in Clinica"
+#. Set title according to the patient that we have loaded and connect
+#. * show startup signal to the focusing of the first field in the visit
+#: .././libclinica/VisitPage.vala:63
+#, c-format
+msgid "Visit of the patient %s"
+msgstr "Visita del paziente %s"
 
-#: ../libclinica/StartPage.vala:198
+#: .././libclinica/PluginManager.vala:35
 msgid ""
-"Add a new patient \n"
-" with name "
+"Clinica is extensible via plugins and you can easily enable\n"
+" and disable them using this window."
 msgstr ""
-"Aggiungi un nuovo paziente \n"
-"di nome "
+"Clinica si può estendere attraverso plugins. Utilizzare\n"
+" questa finestra per abilitarli e disabilitarli."
 
-#: ../libclinica/StartPage.vala:204
-msgid "Add a new patient"
-msgstr "Aggiungi nuovo paziente"
+#: .././libclinica/VisitSchedulerDialog.vala:60
+#: .././libclinica/VisitSchedulerDialog.vala:76
+msgid "Patient not selected"
+msgstr "Paziente non selezionato"
 
-#: ../libclinica/MedicineTreeView.vala:21
-#: ../libclinica/MedicineDetailDialog.vala:56
-msgid "Price"
-msgstr "Prezzo"
+#: .././libclinica/VisitSchedulerDialog.vala:72
+#, c-format
+msgid "Schedule a vist for the patient %s"
+msgstr "Fissa una visita per il paziente %s"
 
-#: ../libclinica/PatientEditor.vala:102
-msgid "Error loading patient_editor.glade."
-msgstr "Errore durante il caricamento di patient_editor.glade."
+#: .././libclinica/Application.vala:113
+#, c-format
+msgid "Option parsing failed: %s\n"
+msgstr "Analisi dell'opzione fallita: %s\n"
 
-#. Set title to edit patient * instead of create new patient
-#: ../libclinica/PatientEditor.vala:307
+#: .././libclinica/Application.vala:148
 #, c-format
-msgid "Edit patient named %s"
-msgstr "Modifica il paziente %s"
+msgid "Clinica %s\n"
+msgstr "Clinica %s\n"
 
-#: ../libclinica/PatientEditor.vala:411
-msgid "You must select a doctor for this patient."
-msgstr "È necessario selezionare un medico per questo paziente."
+#. Then add add a new visit and keep a reference to new_page
+#. *  to focus it on page loading.
+#. Create a new one and connect it
+#: .././libclinica/VisitBrowser.vala:73 .././libclinica/VisitBrowser.vala:252
+msgid "New visit"
+msgstr "Nuova visita"
 
-#: ../libclinica/PatientEditor.vala:412
+#: .././libclinica/VisitBrowser.vala:152 .././libclinica/VisitBrowser.vala:209
 msgid ""
-"If you need to create a new one type his name in the entry and select Create "
-"new doctor from the completion list."
+"A visit need to be saved in order to be exported as PDF.\n"
+"Do you want to save the visit now?"
 msgstr ""
-"Se si desidera crearne uno nuovo digitare il nome nel campo di testo e "
-"selezionare l'azione Crea nuovo dottore dalla lista dei suggerimenti."
+"Una visita deve essere salvata prima di essere esportata in PDF.\n"
+"Vuoi salvare la visita adesso?"
 
-#: ../libclinica/PatientEditor.vala:446
-msgid "Date inserted is invalid, aborting patient editing"
-msgstr "La data inserita non è valida: non è possibile modificare il paziente"
+#: .././libclinica/VisitBrowser.vala:196
+msgid "Error while delivering the print operation"
+msgstr "Errore durante l'operazione di stampa"
 
-#. Set title according to the patient that we have loaded and connect
-#. * show startup signal to the focusing of the first field in the visit
-#: ../libclinica/VisitWindow.vala:62
-#, c-format
-msgid "Visits of the patient %s"
-msgstr "Visite del paziente %s"
+#: .././libclinica/VisitDetail.vala:70
+msgid "Edit visit"
+msgstr "Modifica visita"
+
+#: .././libclinica/VisitDetail.vala:80 .././libclinica/EventDetail.vala:75
+msgid "Delete event"
+msgstr "Cancella evento"
 
-#: ../libclinica/PatientListStore.vala:86
-#: ../libclinica/PatientListStore.vala:132
+#: .././libclinica/VisitDetail.vala:104
+msgid "Show details"
+msgstr "Mostra i dettagli"
+
+#: .././libclinica/VisitDetail.vala:125 .././libclinica/VisitTab.vala:269
 msgid ""
-"Patients database seems corrupted. This is likely to be a bug in the "
-"application"
+"Deleting a visit will cause all its data to be lost.\n"
+"Do you really want to continue?"
 msgstr ""
-"Il database dei pazienti sembra danneggiato. Questo potrebbe essere un "
-"problema dell'applicazione"
+"Cancellare una visita causerà la perdita di tutti i suoi dati.\n"
+"Si è sicuri di voler continuare?"
 
 #. Create menu items, connect them to their callback
 #. * and add it to the menu
-#: ../libclinica/DoctorContextMenu.vala:58
-#: ../libclinica/PatientContextMenu.vala:54
+#: .././libclinica/DoctorContextMenu.vala:58
+#: .././libclinica/PatientContextMenu.vala:54
 msgid "Delete"
 msgstr "Elimina"
 
 #. Instantiate menu items
-#: ../libclinica/DoctorContextMenu.vala:59
-#: ../libclinica/PatientContextMenu.vala:51
+#: .././libclinica/DoctorContextMenu.vala:59
+#: .././libclinica/PatientContextMenu.vala:51
+#: .././libclinica/EventDetail.vala:111
 msgid "Edit"
 msgstr "Modifica"
 
-#: ../libclinica/PatientContextMenu.vala:57
-msgid "Edit visits"
-msgstr "Modifica visite"
+#: .././libclinica/MedicineEditor.vala:41
+msgid "Create a new Medicine"
+msgstr "Aggiungi un nuovo farmaco"
 
-#. Create the object and add the close button used
-#. * to dismiss the dialog
-#: ../libclinica/MedicineDetailDialog.vala:27
-msgid "Close"
-msgstr "Chiudi"
+#: .././libclinica/CalendarWindow.vala:36
+msgid "Clinica calendar"
+msgstr "Calendario di Clinica"
 
-#: ../libclinica/MedicineDetailDialog.vala:46
-#, fuzzy
-msgid "General information"
-msgstr "Informazioni generali"
+#. Anamnesis
+#: .././libclinica/VisitTab.vala:286 .././libclinica/VisitPrinter.vala:107
+msgid "Anamnesis"
+msgstr "Anamnesi"
 
-#. And now the content for the others fields of the medicine
-#: ../libclinica/MedicineDetailDialog.vala:52
-msgid "Identification Code"
-msgstr "Codice"
+#. Physical examination
+#: .././libclinica/VisitTab.vala:289 .././libclinica/VisitPrinter.vala:112
+msgid "Physical examination"
+msgstr "Esame obiettivo"
 
-#: ../libclinica/MedicineDetailDialog.vala:53
-msgid "Description"
-msgstr "Descrizione"
+#. Laboratory Exam
+#: .././libclinica/VisitTab.vala:292 .././libclinica/VisitPrinter.vala:117
+msgid "Laboratory exam"
+msgstr "Esame di laboratorio"
 
-#: ../libclinica/MedicineDetailDialog.vala:54
-msgid "Active ingredient"
-msgstr "Principio attivo"
+#: .././libclinica/VisitTab.vala:295
+msgid "Hystopathology"
+msgstr "Istopatologia"
 
-#: ../libclinica/MedicineDetailDialog.vala:55
-msgid "Storage reccomendations"
-msgstr "Indicazione per la conservazione"
+#. Diagnosis
+#: .././libclinica/VisitTab.vala:298 .././libclinica/VisitPrinter.vala:127
+msgid "Diagnosis"
+msgstr "Diagnosi"
 
-#: ../libclinica/MedicineDetailDialog.vala:64
-msgid "Additional notes"
-msgstr "Note aggiuntive"
+#. Topical therapy
+#: .././libclinica/VisitTab.vala:301 .././libclinica/VisitPrinter.vala:132
+msgid "Topical therapy"
+msgstr "Terapia topica"
 
-#: ../libclinica/MedicineDetailDialog.vala:90
-#: ../libclinica/VisitPrinter.vala:168
-msgid "Field empty"
-msgstr "Campo vuoto"
+#. Systemic therapy
+#: .././libclinica/VisitTab.vala:304 .././libclinica/VisitPrinter.vala:137
+msgid "Systemic therapy"
+msgstr "Terapia sistemica"
 
-#. First add a new visit and keep a reference to new_page
-#. *  to focus it on page loading.
-#. Create a new one and connect it
-#: ../libclinica/VisitBrowser.vala:62 ../libclinica/VisitBrowser.vala:184
-msgid "New visit"
-msgstr "Nuova visita"
+#. Subsequent checks
+#: .././libclinica/VisitTab.vala:307 .././libclinica/VisitPrinter.vala:142
+msgid "Subsequent checks"
+msgstr "Controlli successivi"
+
+#: .././libclinica/MedicineTreeView.vala:37
+msgid "Medicine name"
+msgstr "Nome del farmaco"
+
+#: .././libclinica/MedicineTreeView.vala:40
+#: .././libclinica/MedicineDetailDialog.vala:75
+msgid "Price"
+msgstr "Prezzo"
+
+#: .././libclinica/PatientListPage.vala:81 .././libclinica/StartPage.vala:211
+msgid "Add a new patient"
+msgstr "Aggiungi nuovo paziente"
+
+#: .././libclinica/PatientListPage.vala:87
+msgid "Remove the selected patient"
+msgstr "Rimuovere il paziente selezionato"
+
+#: .././libclinica/PatientListPage.vala:93
+msgid "Modify the selected patient"
+msgstr "Modificare il paziente selezionato"
 
-#: ../libclinica/VisitBrowser.vala:141
+#: .././libclinica/PatientListPage.vala:99
+msgid "Edit visits of the selected patient"
+msgstr "Modifica le visite del paziente selezionato"
+
+#: .././libclinica/PatientListPage.vala:105
+msgid "Schedule a visit with the selected patient"
+msgstr "Programma una visita del paziente selezionato"
+
+#: .././libclinica/DataServer.vala:417
+#, c-format
+msgid "Trying to removing doctor with ID = %ld failed"
+msgstr "Il tentativo di rimuovere il dottore con ID = %ld è fallito"
+
+#: .././libclinica/DataServer.vala:440
+#, c-format
+msgid "Trying to removing patient with ID = %ld failed"
+msgstr "Il tentativo di rimuovere il paziente con ID = %ld è fallito"
+
+#: .././libclinica/DataServer.vala:463
+#, c-format
+msgid "Trying to removing visit with ID = %ld failed"
+msgstr "Il tentativo di rimuovere la visita con ID = %ld è fallito"
+
+#: .././libclinica/DataServer.vala:486
+#, c-format
+msgid "Trying to removing event with ID = %ld failed"
+msgstr "Il tentativo di rimuovere l'evento con ID = %ld è fallito"
+
+#: .././libclinica/Builder.vala:45
+#, c-format
 msgid ""
-"A visit need to be saved in order to be exported as PDF.\n"
-"Do you want to save the visit now?"
+"Failed to load UI file: %s. Please check your installation.\n"
+"%s"
 msgstr ""
-"Una visita deve essere salvata prima di essere esportata in PDF.\n"
-"Vuoi salvare la visita adesso?"
+"Errore durante il caricamento del file dell'interfaccia: %s. Controllare la "
+"correttezza dell'installazione.\n"
+"%s"
 
-#: ../libclinica/SettingsManager.vala:44
-msgid "Clinica settings"
-msgstr "Impostazioni di Clinica"
+#: .././libclinica/LocalFileStore.vala:62
+#, c-format
+msgid "Unable to setup file monitors for the filestore folder: %s"
+msgstr "Impossibile impostare il file monitor per la cartella: %s"
 
-#. Create the use-plugins checkbox
-#: ../libclinica/SettingsManager.vala:56
-msgid "Use plugins (need restart)"
-msgstr "Utilizzare i plugins (riavvio richiesto)"
+#: .././libclinica/LocalFileStore.vala:106
+#, c-format
+msgid "Unable to setup a file monitor on directory %s"
+msgstr "Impossibile impostare il file monitor sulla cartella %s"
 
-#: ../libclinica/SettingsManager.vala:71
-msgid "General"
-msgstr "Generale"
+#: .././libclinica/LocalFileStore.vala:141
+#, c-format
+msgid "Error while listing the files for the visit identified by id %d"
+msgstr ""
+"Errore durante l'analisi dei file per la visita identificata dall'id %d"
 
-#: ../libclinica/SettingsManager.vala:75
-msgid "Plugins"
-msgstr "Plugins"
+#: .././libclinica/LocalFileStore.vala:167
+msgid "Destination file already exists"
+msgstr "Il file di destinazione è già esistente"
+
+#: .././libclinica/LocalFileStore.vala:172
+#, c-format
+msgid "Error while adding the file %s to the selected visit"
+msgstr "Errore durante l'aggiunta del file %s alla visita selezionata"
 
-#: ../libclinica/SettingsManager.vala:113
+#: .././libclinica/NetworkedDataProvider.vala:246
 msgid ""
-"Select the search engine\n"
-"used to find medicines"
+"You canceled the authentication process on the remote server.\n"
+"From now on Clinica will use the local database. If you want to connect to\n"
+"remote server please re-enable networking in the settings dialog."
 msgstr ""
-"Selezionare il motore di\n"
-"ricerca per i farmaci"
+"L'operazione di autenticazione sul server è stata annullata.\n"
+"Da ora in poi Clinica utilizzerà il database locale. Se desideri "
+"connetterti\n"
+"al server remote riabilita l'utilizzo della rete nelle impostazioni."
 
-#: ../libclinica/DoctorListStore.vala:73
-msgid "Doctors database seems corrupted."
-msgstr "Il database dei dottori sembra danneggiato."
+#. Set title to edit patient * instead of create new patient
+#: .././libclinica/PatientEditor.vala:304
+#, c-format
+msgid "Edit patient named %s"
+msgstr "Modifica il paziente %s"
+
+#: .././libclinica/PatientEditor.vala:408
+msgid "You must select a doctor for this patient."
+msgstr "È necessario selezionare un medico per questo paziente."
+
+#: .././libclinica/PatientEditor.vala:409
+msgid ""
+"If you need to create a new one type his name in the entry and select Create "
+"new doctor from the completion list."
+msgstr ""
+"Se si desidera crearne uno nuovo digitare il nome nel campo di testo e "
+"selezionare l'azione Crea nuovo dottore dalla lista dei suggerimenti."
+
+#: .././libclinica/PatientEditor.vala:445
+msgid "Date inserted is invalid, aborting patient editing"
+msgstr ""
+"La data inserita non è valida: non è possibile modificare il paziente"
+
+#: .././libclinica/AuthenticationDialog.vala:40
+msgid "Authentication required"
+msgstr "Autenticazione richiesta"
 
 #. Start of events
-#: ../libclinica/CalendarEventList.vala:70
+#: .././libclinica/CalendarEventList.vala:73
 msgid "Events scheduled"
 msgstr "Eventi in programma"
 
-#: ../libclinica/CalendarEventList.vala:89
+#: .././libclinica/CalendarEventList.vala:92
 msgid ""
 "No events on this day.\n"
 "You can create a new event\n"
@@ -247,213 +353,362 @@ msgstr ""
 "Puoi creare un nuovo evento\n"
 "cliccando il bottone in alto a sinistra."
 
-#: ../libclinica/CalendarEventList.vala:95
+#: .././libclinica/CalendarEventList.vala:103
 msgid "Visits performed"
 msgstr "Visite effettuate"
 
-#: ../libclinica/CalendarEventList.vala:115
+#: .././libclinica/CalendarEventList.vala:105
+msgid "Visits scheduled"
+msgstr "Visita programmata"
+
+#: .././libclinica/CalendarEventList.vala:126
 msgid "No visits performed on this day"
 msgstr "Nessuna visita effettuata questo giorno."
 
-#: ../libclinica/VisitToolbar.vala:90
-msgid "This patient has not a doctor"
-msgstr "Questo paziente non ha associato un medico."
-
-#: ../libclinica/VisitToolbar.vala:93
-#, c-format
-msgid ""
-"Patient: <b>%s</b>\n"
-"Doctor: <b>%s</b>"
-msgstr ""
-"Paziente: <b>%s</b>\n"
-"Dottore: <b>%s</b>"
+#: .././libclinica/ImportDialog.vala:40
+msgid "Import data from backup file"
+msgstr "Importa i dati da un file di backup"
 
-#. Show more details on this patient
-#: ../libclinica/VisitActions.vala:61
-#, fuzzy
-msgid "Edit patient details"
-msgstr "Modifica il paziente %s"
+#: .././libclinica/PatientContextMenu.vala:57
+msgid "Edit visits"
+msgstr "Modifica visite"
 
-#. Save the visit as a PDF file
-#: ../libclinica/VisitActions.vala:71
-msgid "Save as PDF"
-msgstr "Salva come PDF"
+#. File menu
+#: .././libclinica/UIManager.vala:44
+msgid "_File"
+msgstr "_File"
 
-#: ../libclinica/EventEditor.vala:93
-msgid "Create a new event"
-msgstr "Crea un nuovo evento"
+#: .././libclinica/UIManager.vala:45
+msgid "New _patient"
+msgstr "Nuovo _paziente"
 
-#: ../libclinica/EventEditor.vala:97
-#, c-format
-msgid "Editing event: %s"
-msgstr "Modifica l'evento: %s"
+#: .././libclinica/UIManager.vala:46
+msgid "Create a new patient"
+msgstr "Crea un nuovo paziente"
 
-#. Create the entry for title of the event and venue
-#: ../libclinica/EventEditor.vala:114
-msgid "Title"
-msgstr "Nome"
+#: .././libclinica/UIManager.vala:47
+msgid "New _doctor"
+msgstr "Nuovo _dottore"
 
-#: ../libclinica/EventEditor.vala:115
-msgid "Venue"
-msgstr "Luogo"
+#: .././libclinica/UIManager.vala:48
+msgid "Create a new doctor"
+msgstr "Crea un nuovo medico"
 
-#: ../libclinica/EventEditor.vala:144
-msgid "Time:"
-msgstr "Ora:"
+#: .././libclinica/UIManager.vala:49
+msgid "_Quit"
+msgstr "_Esci"
 
-#: ../libclinica/EventEditor.vala:160
-msgid "Insert the description here..."
-msgstr "Inserisci una descrizione qui..."
+#: .././libclinica/UIManager.vala:50
+msgid "Quit clinica"
+msgstr "Esci da clinica"
 
-#: ../libclinica/EventEditor.vala:198
-msgid "Patient"
-msgstr "Paziente"
+#. View menu
+#: .././libclinica/UIManager.vala:53
+msgid "_View"
+msgstr "_Visualizza"
 
-#: ../libclinica/EventEditor.vala:255
-msgid "Visit"
-msgstr "Visita"
+#: .././libclinica/UIManager.vala:54
+msgid "_Start page"
+msgstr "_Pagina iniziale"
 
-#: ../libclinica/DoctorListView.vala:175
-msgid "Select a doctor to delete it!"
-msgstr "Selezionare un medico per eliminarlo!"
+#: .././libclinica/UIManager.vala:55
+msgid "Go to the start page of clinica"
+msgstr "Vai alla pagina iniziale di clinica"
 
-#: ../libclinica/DoctorListView.vala:186
-msgid ""
-"The doctor that you have selected for removal has some patients "
-"associated. \n"
-msgstr ""
-"Il dottore che è stato selezionato per la rimozione è associato a dei "
-"pazienti. \n"
+#: .././libclinica/UIManager.vala:56
+msgid "_Patients"
+msgstr "_Pazienti"
 
-#: ../libclinica/DoctorListView.vala:187
-msgid ""
-"It's not possible to remove it without removing all his patients.\n"
-"\n"
-msgstr ""
-"Non è possibile rimuoverlo senza rimuovere anche tutti i suoi pazienti.\n"
-"\n"
+#: .././libclinica/UIManager.vala:57
+msgid "Go to the list of patients"
+msgstr "Vai alla lista dei pazienti"
 
-#: ../libclinica/DoctorListView.vala:188 ../libclinica/DoctorListView.vala:221
-msgid "Do you really want to proceed?"
-msgstr "Si è sicuri di voler continuare?"
+#: .././libclinica/UIManager.vala:58
+msgid "_Doctors"
+msgstr "Me_dici"
 
-#: ../libclinica/DoctorListView.vala:189
-msgid "Doctor has associated patients"
-msgstr "Il dottore è associato a dei pazienti"
+#: .././libclinica/UIManager.vala:59
+msgid "Go to the list of doctors"
+msgstr "Vai alla lista dei dottori"
 
-#: ../libclinica/DoctorListView.vala:219
-msgid "The following patients will be deleted by this action:\n"
-msgstr ""
-"I seguenti pazienti verrebbero eliminati dal completamento di questa "
-"operazione:\n"
+#: .././libclinica/UIManager.vala:60
+msgid "_Search medicines"
+msgstr "_Cerca farmaci"
 
-#: ../libclinica/DoctorListView.vala:222
-msgid "Confirm deletion of patients"
-msgstr "Conferma la rimozione dei pazienti"
+#: .././libclinica/UIManager.vala:61
+msgid "Search medicines online"
+msgstr "Cerca farmaci online"
 
-#: ../libclinica/DoctorListView.vala:244
-#, fuzzy
-msgid "Really delete this doctor? All information about him/her will be lost."
-msgstr ""
-"Si è sicuri di voler eliminare il medico? Tutte le informazioni "
-"precedentemente inserite saranno perse."
+#. Tools menu
+#: .././libclinica/UIManager.vala:64
+msgid "_Tools"
+msgstr "_Strumenti"
 
-#. Anamnesis
-#: ../libclinica/VisitTab.vala:258 ../libclinica/VisitPrinter.vala:68
-msgid "Anamnesis"
-msgstr "Anamnesi"
+#: .././libclinica/UIManager.vala:65
+msgid "_Settings"
+msgstr "_Impostazioni"
 
-#. Physical examination
-#: ../libclinica/VisitTab.vala:261 ../libclinica/VisitPrinter.vala:71
-msgid "Physical examination"
-msgstr "Esame obiettivo"
+#: .././libclinica/UIManager.vala:66
+msgid "Customize clinica behaviour"
+msgstr "Personalizza il comportamento di clinica"
 
-#. Laboratory Exam
-#: ../libclinica/VisitTab.vala:264 ../libclinica/VisitPrinter.vala:74
-msgid "Laboratory exam"
-msgstr "Esame di laboratorio"
+#: .././libclinica/UIManager.vala:67
+msgid "Backup"
+msgstr "Backup"
 
-#: ../libclinica/VisitTab.vala:267
-msgid "Hystopathology"
-msgstr "Istopatologia"
+#: .././libclinica/UIManager.vala:68
+msgid "Backup clinica data to file"
+msgstr "Backup dei dati di clinica su file"
 
-#. Diagnosis
-#: ../libclinica/VisitTab.vala:270 ../libclinica/VisitPrinter.vala:80
-msgid "Diagnosis"
-msgstr "Diagnosi"
+#: .././libclinica/UIManager.vala:69
+msgid "Import"
+msgstr "Importa"
 
-#. Topical therapy
-#: ../libclinica/VisitTab.vala:273 ../libclinica/VisitPrinter.vala:83
-msgid "Topical therapy"
-msgstr "Terapia topica"
+#: .././libclinica/UIManager.vala:70
+msgid "Import data from backup files"
+msgstr "Importa dati da un file di backup"
 
-#. Systemic therapy
-#: ../libclinica/VisitTab.vala:276 ../libclinica/VisitPrinter.vala:86
-msgid "Systemic therapy"
-msgstr "Terapia sistemica"
+#. Help menu
+#: .././libclinica/UIManager.vala:73
+msgid "_Help"
+msgstr "_Aiuto"
 
-#. Subsequent checks
-#: ../libclinica/VisitTab.vala:279 ../libclinica/VisitPrinter.vala:89
-msgid "Subsequent checks"
-msgstr "Controlli successivi"
+#: .././libclinica/UIManager.vala:74
+msgid "_Contents"
+msgstr "_Sommario"
+
+#: .././libclinica/UIManager.vala:75
+msgid "Open the help system"
+msgstr "Apri il sistema di aiuto"
+
+#: .././libclinica/UIManager.vala:76
+msgid "_Report a bug"
+msgstr "_Segnala un problema"
+
+#: .././libclinica/UIManager.vala:77
+msgid "Report a bug online"
+msgstr "Riporta un bug online"
 
-#: ../libclinica/PluginManager.vala:35
+#: .././libclinica/UIManager.vala:78
+msgid "_About"
+msgstr "_Informazioni"
+
+#: .././libclinica/UIManager.vala:79
+msgid "Get to know the development team of Clinica"
+msgstr "Scopri il team di sviluppo di Clinica"
+
+#: .././libclinica/BackupEngine.vala:113
+msgid "Please select a valid backup file"
+msgstr "Seleziona un file di backup valido"
+
+#: .././libclinica/BackupEngine.vala:125
+msgid "Importing data"
+msgstr "Importazione dati in corso"
+
+#: .././libclinica/BackupEngine.vala:126
+msgid "Please wait while Clinica imports the data..."
+msgstr "Attendere mentre Clinica importa i dati..."
+
+#: .././libclinica/BackupEngine.vala:129
+msgid "Importing the JSON data.."
+msgstr "Importazione dei dati JSON"
+
+#: .././libclinica/BackupEngine.vala:137
+msgid "Error while parsing the backup JSON data"
+msgstr "Errore durante l'importazione dei dati JSON"
+
+#: .././libclinica/BackupEngine.vala:143 .././libclinica/BackupEngine.vala:170
+msgid "An error occurred while parsing the JSON file"
+msgstr "Si è verificato un errore durante l'importazione dei dati JSON"
+
+#: .././libclinica/BackupEngine.vala:165
 msgid ""
-"Clinica is extensible via plugins and you can easily enable\n"
-" and disable them using this window."
+"The doctors, patients, visits and events field in the JSON backup should be "
+"arrays, aborting."
 msgstr ""
-"Clinica si può estendere attraverso plugins. Utilizzare\n"
-" questa finestra per abilitarli e disabilitarli."
+"I dottori, pazienti, visite ed eventi nel file JSON dovrebbero essere array, "
+"annullo l'operazione."
 
-#: ../libclinica/CalendarWindow.vala:36
-msgid "Clinica calendar"
-msgstr "Calendario di Clinica"
+#. Clear the database and put the data back in it
+#. in such a way that won't break relationships.
+#: .././libclinica/BackupEngine.vala:188
+msgid "Clearing the old data in the database..."
+msgstr "Rimozione dei dati nel database..."
 
-#. Histopathology
-#: ../libclinica/VisitPrinter.vala:77
-msgid "Histopathology"
-msgstr "Istopatologia"
+#: .././libclinica/BackupEngine.vala:192
+msgid "Loading doctors..."
+msgstr "Caricamento dottori..."
+
+#: .././libclinica/BackupEngine.vala:201
+#, c-format
+msgid "- %d doctors have been imported\n"
+msgstr "- %d dottori sono stati importati\n"
+
+#: .././libclinica/BackupEngine.vala:203
+msgid "Loading patients..."
+msgstr "Caricamento dei pazienti..."
+
+#: .././libclinica/BackupEngine.vala:216
+#, c-format
+msgid "- %d patients have been imported\n"
+msgstr "- %d pazienti sono stati importati\n"
+
+#: .././libclinica/BackupEngine.vala:218
+msgid "Loading visits..."
+msgstr "Caricamento delle visite..."
+
+#: .././libclinica/BackupEngine.vala:231
+#, c-format
+msgid "- %d visits have been imported\n"
+msgstr "- %d visite sono state importate\n"
 
-#: ../libclinica/EventListStore.vala:93
+#: .././libclinica/BackupEngine.vala:233
+msgid "Loading events..."
+msgstr "Caricamento degli eventi..."
+
+#: .././libclinica/BackupEngine.vala:249
+#, c-format
+msgid "- %d events have been imported\n"
+msgstr "- %d eventi sono stati importati\n"
+
+#: .././libclinica/BackupEngine.vala:258
 msgid ""
-"Events database seems corrupted. This is likely to be a bug in the "
+"- A FileStore was found but is not available in the current provider\n"
+msgstr ""
+"- È stato trovato un FileStore ma non è disponibile nel data provider "
+"corrente\n"
+
+#: .././libclinica/BackupEngine.vala:283
+#, c-format
+msgid "- %d files have been imported\n"
+msgstr "- %d files sono stati importati\n"
+
+#: .././libclinica/BackupEngine.vala:287
+msgid "- No FileStore was found in the backup\n"
+msgstr "- Nessun FileStore trovato nel backup\n"
+
+#: .././libclinica/BackupEngine.vala:298
+msgid "The import of the data has been completed successfully"
+msgstr "L'importazione dei dati è stata completata correttamente"
+
+#: .././libclinica/PatientListStore.vala:128
+#: .././libclinica/PatientListStore.vala:150
+msgid ""
+"Patients database seems corrupted. This is likely to be a bug in the "
 "application"
 msgstr ""
-"Il database degli eventi sembra corrotto. Questo potrebbe essere un errore "
-"dell'applicazione."
+"Il database dei pazienti sembra danneggiato. Questo potrebbe essere un "
+"problema dell'applicazione"
 
-#. Set title of edit doctor dialog, space is important!
-#: ../libclinica/DoctorEditor.vala:91
+#. Print the error message to stdout
+#: .././libclinica/Utils.vala:79
+msgid "ERROR => "
+msgstr "ERRORE => "
+
+#: .././libclinica/Utils.vala:83 .././libclinica/Utils.vala:84
+msgid "Clinica encountered an error"
+msgstr "Si  verificato un errore in Clinica"
+
+#: .././libclinica/LocalMedicinesDatabase.vala:90
 #, c-format
-msgid "Edit doctor named %s"
-msgstr "Modifica il dottore %s"
+msgid "Medicine with id = %lld not found in DB: %s"
+msgstr "Farmaco con id = %lld non trovato nel database: %s"
 
-#: ../libclinica/ResourceManager.vala:184
+#: .././libclinica/LocalMedicinesDatabase.vala:119
+#, c-format
+msgid "Error inserting medicine in the database: %s"
+msgstr "Errore durante l'inserimento del farmaco nel database: %s"
+
+#: .././libclinica/EventEditor.vala:93
+msgid "Create a new event"
+msgstr "Crea un nuovo evento"
+
+#: .././libclinica/EventEditor.vala:97
+#, c-format
+msgid "Editing event: %s"
+msgstr "Modifica l'evento: %s"
+
+#. Create the entry for title of the event and venue
+#: .././libclinica/EventEditor.vala:115
+msgid "Title"
+msgstr "Nome"
+
+#: .././libclinica/EventEditor.vala:116
+msgid "Venue"
+msgstr "Luogo"
+
+#: .././libclinica/EventEditor.vala:151
+msgid "Time:"
+msgstr "Ora:"
+
+#: .././libclinica/EventEditor.vala:167
+msgid "Insert the description here..."
+msgstr "Inserisci una descrizione qui..."
+
+#: .././libclinica/EventEditor.vala:205 .././libclinica/VisitToolbar.vala:96
+#, c-format
+msgid "Patient"
+msgstr "Paziente"
+
+#: .././libclinica/EventEditor.vala:264
+msgid "Visit"
+msgstr "Visita"
+
+#: .././libclinica/VisitListStore.vala:99
+msgid ""
+"Visit database seems corrupted. This is likely to be a bug in the application"
+msgstr ""
+"Il database delle visite sembra danneggiato. Questo potrebbe essere un "
+"problema dell'applicazione"
+
+#: .././libclinica/MedicineSearchPage.vala:76
+#: .././data/resources/ui/start_page.glade.h:5
+msgid "Search medicines"
+msgstr "Cerca farmaci"
+
+#: .././libclinica/MedicineSearchPage.vala:100
+msgid "No search engine available"
+msgstr "Nessun motore di ricerca disponibile"
+
+#: .././libclinica/MedicineSearchPage.vala:108
+#, c-format
+msgid "Searching for %s..."
+msgstr "Ricerca di %s in corso..."
+
+#: .././libclinica/MedicineSearchPage.vala:133
+msgid "Medicines"
+msgstr "Farmaci"
+
+#: .././libclinica/MedicineSearchPage.vala:96
+msgid "It's not possible to perform a search for medicine"
+msgstr "Non è possibile effettuare la ricerca del medicinale"
+
+#: .././libclinica/SqliteDataProvider.vala:143
 #, c-format
 msgid "Error creating some configuration files, check permission on %s"
 msgstr ""
 "Errore creando alcuni file di configurazione, controlla i permessi su %s"
 
-#: ../libclinica/ResourceManager.vala:192
+#: .././libclinica/SqliteDataProvider.vala:151
 #, c-format
 msgid "Error reading some configuration files, check permission on %s"
 msgstr ""
 "Errore leggendo alcuni file di configurazione, controlla i permessi su %s"
 
-#: ../libclinica/ResourceManager.vala:211
+#: .././libclinica/SqliteDataProvider.vala:170
 #, c-format
 msgid "Failure while settings new database version to %s"
 msgstr "Errore impostando il nuovo database alla versione %s"
 
-#: ../libclinica/ResourceManager.vala:214
+#: .././libclinica/SqliteDataProvider.vala:173
 msgid "Failure while upgrading database"
 msgstr "Errore aggiornando il database"
 
-#: ../libclinica/ResourceManager.vala:218
+#: .././libclinica/SqliteDataProvider.vala:177
 msgid "Version of the database is not compatible"
 msgstr "La versione del database non è compatibile"
 
-#: ../libclinica/ResourceManager.vala:293
+#: .././libclinica/SqliteDataProvider.vala:199
 msgid ""
 "This is a version of Clinica newer than the one that created the\n"
 "patients database installed on the system.\n"
@@ -467,249 +722,764 @@ msgstr ""
 "<b>la vecchia versione non sarà più disponibile</b>.\n"
 "Si desidera effettuare questo aggiornamento?\n"
 
-#: ../libclinica/ResourceManager.vala:294
+#: .././libclinica/SqliteDataProvider.vala:200
 msgid "Upgrade database"
 msgstr "Aggiorno il database"
 
-#: ../libclinica/ResourceManager.vala:375
+#: .././libclinica/SqliteDataProvider.vala:225
+msgid "Database needs to be moved"
+msgstr "Il database necessita di essere spostato"
+
+#: .././libclinica/SqliteDataProvider.vala:226
+msgid ""
+"An older version of clinica has been detected and the old database has to be "
+"moved\n"
+"to a new location to continue.\n"
+"<b>The older version of clinica won't work anymore with this setup</b>.\n"
+"Do you still want to continue?"
+msgstr ""
+"È stata trovata una versione meno recente di Clinica e per continuare è "
+"necessario spostare il vecchio database in una nuova posizione.\n"
+"<b>La vecchia versione di Clinica non funzionerà più con questa "
+"configurazione</b>.\n"
+"Vuoi continuare con l'operazione?"
+
+#: .././libclinica/SqliteDataProvider.vala:239
+msgid ""
+"Error while transferring the database to the new default location for "
+"clinica >= 0.2.9"
+msgstr ""
+"Errore nel trasferire il database nella nuova locazione di default per "
+"clinica >= 0.2.9"
+
+#: .././libclinica/SqliteDataProvider.vala:251
 msgid "Error upgrading database, please check your installation"
 msgstr ""
 "Errore aggiornando il database, si prega di controllare l'installazione"
 
-#: ../libclinica/ResourceManager.vala:390
+#: .././libclinica/SqliteDataProvider.vala:266
 #, c-format
 msgid ""
-"Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %d"
+"Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %s"
 msgstr ""
-"Errore aggiornando il database dalla versione 0.1 alla 0.2, sqlite exit "
-"code: %d"
+"Errore durante l'upgrade del database dalla versione 0.1 alle 0.2, codice di "
+"uscita di sqlite: %s"
+
+#: .././libclinica/SqliteDataProvider.vala:359
+#, c-format
+msgid "Error while retrieving the doctor with id = %s"
+msgstr "Errore durante l'accesso al dottore con id = %s"
+
+#: .././libclinica/SqliteDataProvider.vala:399
+#, c-format
+msgid "An error occurred while saving the doctor with id %d: %s"
+msgstr ""
+"È avvenuto un errore durante il salvataggio del dottore con id = %d: %s"
+
+#: .././libclinica/SqliteDataProvider.vala:468
+#, c-format
+msgid "Error while retrieving the patient with id = %s"
+msgstr "Errore durante l'accesso al paziente con id = %s"
+
+#: .././libclinica/SqliteDataProvider.vala:517
+#: .././libclinica/SqliteDataProvider.vala:652
+#, c-format
+msgid "An error occurred while saving the doctor with id %s: %s"
+msgstr ""
+"È avvenuto un errore durante il salvataggio del dottore con id %s: %s"
+
+#: .././libclinica/SqliteDataProvider.vala:597
+#, c-format
+msgid "Error while retrieving the visit with id = %s"
+msgstr "Errore durante l'accesso alla visita con id = %s"
+
+#: .././libclinica/SqliteDataProvider.vala:686
+#, c-format
+msgid "Error while retrieving the event with id = %d"
+msgstr "È avvenuto un errore durante il caricamento delle evento con id = %d"
+
+#: .././libclinica/SqliteDataProvider.vala:728
+#, c-format
+msgid "An error occurred while saving the event with id %s: %s"
+msgstr ""
+"È avvenuto un errore durante il salvataggio del dottore con id %s: %s"
+
+#: .././libclinica/SettingsManager.vala:40
+msgid "Clinica settings"
+msgstr "Impostazioni di Clinica"
+
+#: .././libclinica/SettingsManager.vala:52
+msgid "Clinica has been built without plugins support"
+msgstr "Clinica è stato compilato senza supporto per i plugin"
+
+#: .././libclinica/SettingsManager.vala:135
+msgid "Please use the Network tab to enable the Networked data provider"
+msgstr "Utilizza la sezione Rete per riabilitare il data provider remoto"
+
+#: .././libclinica/SettingsManager.vala:136
+msgid "Use the Network tab"
+msgstr "Usa la sezione Rete"
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Disconnect"
+msgstr "Disconnetti"
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Connect"
+msgstr "Connetti"
+
+#: .././libclinica/SettingsManager.vala:191
+#, c-format
+msgid "Connection to the given host failed. Please check your settings."
+msgstr "Connessione all'host fallita. Controlla le impostazioni"
+
+#: .././libclinica/SettingsManager.vala:192
+msgid "Connection failed"
+msgstr "Connessione non riuscita"
+
+#: .././libclinica/SettingsManager.vala:206
+#: .././libclinica/ResourceManager.vala:284
+#, c-format
+msgid "Username or password are wrong. Disconnecting from the server."
+msgstr "Utente e password non sono corretti. Mi disconnetto dal server."
+
+#: .././libclinica/SettingsManager.vala:207
+msgid "Wrong authentication data has been provided"
+msgstr "I dati di autenticazione non sono validi"
+
+#: .././libclinica/VisitActions.vala:60
+msgid "Edit details of patient"
+msgstr "Modifica i dettagli del paziente"
+
+#: .././libclinica/VisitActions.vala:67
+msgid "Remove this visit"
+msgstr "Rimuovi questa visita"
 
-#: ../libclinica/AboutDialog.vala:40
+#: .././libclinica/VisitActions.vala:74
+msgid "Export this visit as PDF"
+msgstr "Esporta la visita come PDF"
+
+#: .././libclinica/VisitActions.vala:81
+msgid "Print a report of this visit"
+msgstr "Stampa un riassunto di questa visita"
+
+#: .././libclinica/VisitActions.vala:88
+msgid "Save this visit"
+msgstr "Salva questa visita"
+
+#: .././libclinica/VisitActions.vala:99
+msgid "Close the visits of this patient"
+msgstr "Chiudi le visite di questo paziente"
+
+#: .././libclinica/VisitToolbar.vala:93
+msgid "This patient has not a doctor"
+msgstr "Questo paziente non ha associato un medico."
+
+#: .././libclinica/VisitToolbar.vala:97
+msgid "Doctor"
+msgstr "Dottore"
+
+#: .././libclinica/DateTimePicker.vala:56
+msgid "Hour"
+msgstr "Ora"
+
+#: .././libclinica/DateTimePicker.vala:58
+msgid "Minute"
+msgstr "Minuto"
+
+#: .././libclinica/DoctorListStore.vala:75
+msgid "Doctors database seems corrupted."
+msgstr "Il database dei dottori sembra danneggiato."
+
+#: .././libclinica/DoctorListView.vala:175
+msgid "Select a doctor to delete it!"
+msgstr "Selezionare un medico per eliminarlo!"
+
+#: .././libclinica/DoctorListView.vala:186
+msgid ""
+"The doctor that you have selected for removal has some patients associated. "
+"\n"
+msgstr ""
+"Il dottore che è stato selezionato per la rimozione è associato a dei "
+"pazienti. \n"
+
+#: .././libclinica/DoctorListView.vala:187
+msgid ""
+"It's not possible to remove it without disassociating all his patients.\n"
+"\n"
+msgstr ""
+"Non è possibile rimuoverlo senza deassociarlo dai suoi pazienti\n"
+"\n"
+
+#: .././libclinica/DoctorListView.vala:188
+#: .././libclinica/DoctorListView.vala:217
+msgid "Do you really want to proceed?"
+msgstr "Si è sicuri di voler continuare?"
+
+#: .././libclinica/DoctorListView.vala:189
+msgid "Doctor has associated patients"
+msgstr "Il dottore è associato a dei pazienti"
+
+#: .././libclinica/DoctorListView.vala:215
+msgid ""
+"The following patients will be disassociated from this doctor by this "
+"action:\n"
+msgstr ""
+"I seguenti pazienti saranno deassociati da questo dottore dopo questa "
+"azione:\n"
+
+#: .././libclinica/DoctorListView.vala:218
+msgid "Confirm disassociation of patients"
+msgstr "Confermare la deassociazione dei pazienti"
+
+#: .././libclinica/DoctorListView.vala:235
+msgid ""
+"Really delete this doctor? All information about him/her will be lost."
+msgstr ""
+"Si è sicuri di voler rimuovere il medico? Tutte le informazioni su di lui o "
+"lei saranno perse."
+
+#. Ask the user where he would like to backup its files.
+#: .././libclinica/UserInterface.vala:360
+msgid "Select the folder where the data should be saved"
+msgstr "Seleziona la cartella dove salvare i dati"
+
+#. In this string %s refers to the path where the backup has been performed.
+#: .././libclinica/UserInterface.vala:386
+#, c-format
+msgid "Backup completed successfully in the folder %s"
+msgstr "Backup completato con successo nella cartella %s"
+
+#: .././libclinica/UserInterface.vala:387
+msgid "Backup completed"
+msgstr "Backup completato"
+
+#: .././libclinica/UserInterface.vala:389
+msgid ""
+"Please take care of copying the folder in a safe place for future restore of "
+"the data."
+msgstr ""
+"Si consiglia di copiare la cartella in un posto sicuro in vista di un futuro "
+"ripristino dei dati."
+
+#: .././libclinica/UserInterface.vala:416
+#, c-format
+msgid "Cannot open the help: %s"
+msgstr "Impossibile aprire l'aiuto: %s"
+
+#: .././libclinica/UserInterface.vala:441
+msgid ""
+"An error occurred while opening the bug system. Please go to\n"
+"http://launchpad.net/clinica-project/ to file a bug"
+msgstr ""
+"È avvenuto un errore mentre si apriva il bug system. Perfavore visita\n"
+"http://launchpad.net/clinica-project/ per segnalare un bug"
+
+#: .././libclinica/EventDetail.vala:65
+msgid "Edit event"
+msgstr "Modifica l'evento"
+
+#: .././libclinica/EventDetail.vala:112
+msgid "Remove"
+msgstr "Rimuovi"
+
+#: .././libclinica/EventDetail.vala:145
+msgid "Really delete this event?"
+msgstr "Cancellare questo evento?"
+
+#: .././libclinica/Sidebar.vala:68
+msgid "Pages"
+msgstr "Pagine"
+
+#: .././libclinica/StartPage.vala:93
+msgid "Dashboard"
+msgstr "Pannello di controllo"
+
+#: .././libclinica/StartPage.vala:205
+msgid ""
+"Add a new patient \n"
+" with name "
+msgstr ""
+"Aggiungi un nuovo paziente \n"
+"di nome "
+
+#: .././libclinica/EventListStore.vala:121
+msgid ""
+"Events database seems corrupted. This is likely to be a bug in the "
+"application"
+msgstr ""
+"Il database degli eventi sembra corrotto. Questo potrebbe essere un errore "
+"dell'applicazione."
+
+#: .././libclinica/DoctorListPage.vala:60
+#: .././libclinica/DoctorListPage.vala:93
+msgid "Doctors"
+msgstr "Medici"
+
+#: .././libclinica/DoctorListPage.vala:76
+msgid "Add a doctor"
+msgstr "Aggiungi un dottore"
+
+#: .././libclinica/DoctorListPage.vala:82
+msgid "Edit the selected doctor"
+msgstr "Modifica il dottore selezionato"
+
+#: .././libclinica/DoctorListPage.vala:88
+msgid "Remove the selected doctor"
+msgstr "Rimuovi il dottore selezionato"
+
+#: .././libclinica/ResourceManager.vala:285
+msgid "Error while authenticating on the server"
+msgstr "Errore durante l'autenticazione sul server"
+
+#: .././libclinica/AboutDialog.vala:41
 msgid "Medical records manager"
 msgstr "Gestore cartelle cliniche"
 
-#: ../libclinica/AboutDialog.vala:42
+#: .././libclinica/AboutDialog.vala:43
 msgid "About Clinica"
 msgstr "Informazioni su Clinica"
 
-#: ../libclinica/AboutDialog.vala:51
+#: .././libclinica/AboutDialog.vala:52
 msgid "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
 msgstr "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
 
-#: ../libclinica/AboutDialog.vala:52
+#: .././libclinica/AboutDialog.vala:53
 msgid "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
 msgstr "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
 
-#. Start of LAUNCHPAD contributions. Each one is indented
-#. * of two spaces
-#: ../libclinica/AboutDialog.vala:56
+#. Histopathology
+#: .././libclinica/VisitPrinter.vala:122
+msgid "Histopathology"
+msgstr "Istopatologia"
+
+#. Now write the date of the visit after that
+#: .././libclinica/VisitPrinter.vala:285
+#, c-format
+msgid "Report of the visit of %s"
+msgstr "Report della visita di %s"
+
+#: .././libclinica/VisitPrinter.vala:316
+#: .././libclinica/MedicineDetailDialog.vala:109
+msgid "Field empty"
+msgstr "Campo vuoto"
+
+#. Add a Attach button
+#: .././libclinica/VisitFileManager.vala:89
+msgid "Attach file"
+msgstr "Allega File"
+
+#: .././libclinica/VisitFileManager.vala:97
+msgid "Browse files"
+msgstr "Sfoglia file"
+
+#: .././libclinica/VisitFileManager.vala:113
+msgid "Select a file to attach"
+msgstr "Selezionare un file da allegare"
+
+#: .././libclinica/VisitFileManager.vala:133
+msgid "Unable to open the browser on the filestore position"
+msgstr "Impossibile aprire il file manager nelle cartella del deposito file"
+
+#: .././libclinica/VisitFileManager.vala:163
 msgid ""
-"\n"
-"Launchpad contributions: \n"
+"Save the visit\n"
+" to attach files"
 msgstr ""
-"\n"
-"Contributi su Launchpad: \n"
+"Salvare la visita\n"
+"per allegare dei file"
 
-#: ../libclinica/DoctorListPage.vala:70
-msgid "Doctors"
-msgstr "Medici"
+#: .././libclinica/VisitFileManager.vala:170
+msgid "Attach files"
+msgstr "Allega files"
 
-#. And the button to go back
-#: ../libclinica/MedicineSearchPage.vala:42
-#: ../libclinica/MedicineSearchPage.vala:72
-msgid "Back"
-msgstr "Indietro"
+#: .././libclinica/SidebarCalendarEntry.vala:30
+msgid "Calendar"
+msgstr "Calendario"
 
-#: ../libclinica/MedicineSearchPage.vala:94
-msgid "No search engine available"
-msgstr "Nessun motore di ricerca disponibile"
+#. Create the object and add the close button used
+#. * to dismiss the dialog
+#: .././libclinica/MedicineDetailDialog.vala:46
+msgid "Close"
+msgstr "Chiudi"
 
-#: ../libclinica/MedicineSearchPage.vala:102
-#, c-format
-msgid "Searching for %s..."
-msgstr "Ricerca di %s in corso..."
+#: .././libclinica/MedicineDetailDialog.vala:65
+msgid "General information"
+msgstr "Informazioni generali"
+
+#. And now the content for the others fields of the medicine
+#: .././libclinica/MedicineDetailDialog.vala:71
+msgid "Identification Code"
+msgstr "Codice"
 
-#: ../libclinica/MedicineSearchPage.vala:104
-msgid "Stop"
+#: .././libclinica/MedicineDetailDialog.vala:72
+msgid "Description"
+msgstr "Descrizione"
+
+#: .././libclinica/MedicineDetailDialog.vala:73
+msgid "Active ingredient"
+msgstr "Principio attivo"
+
+#: .././libclinica/MedicineDetailDialog.vala:74
+msgid "Storage reccomendations"
+msgstr "Indicazione per la conservazione"
+
+#: .././libclinica/MedicineDetailDialog.vala:83
+msgid "Additional notes"
+msgstr "Note aggiuntive"
+
+#. Nothing to do for now.
+#: .././libclinica/FileDetail.vala:89
+#, c-format
+msgid "Error while loading icon for file %s: %s"
 msgstr ""
+"È avvenuto un errore durante il caricamento delle icone per il file %s: %s"
 
-#: ../libclinica/MedicineSearchPage.vala:127
-msgid "Medicine search"
-msgstr "Cerca farmaci"
+#: .././libclinica/FileDetail.vala:98
+msgid "Open file"
+msgstr "Apri file"
 
-#: ../libclinica/MedicineSearchPage.vala:90
-msgid "It's not possible to perform a search for medicine"
-msgstr "Non è possibile effettuare la ricerca del medicinale"
+#: .././libclinica/FileDetail.vala:110
+msgid "Delete file"
+msgstr "Elimina file"
 
-#: ../clinica/Clinica.vala:57
+#: .././libclinica/FileDetail.vala:122
 #, c-format
-msgid "Clinica %s\n"
-msgstr "Clinica %s\n"
+msgid ""
+"Do you really want to delete the file %s?\n"
+"If you proceed it will be definitively lost."
+msgstr ""
+"Cancellare il file %s?\n"
+"Continuando verrà perso definitivamente."
 
-#: ../ui/new_button.glade.h:1
-msgid "Add new patient"
-msgstr "Aggiungi nuovo paziente"
+#: .././libclinica/FileDetail.vala:135
+#, c-format
+msgid "Error while opening the file %s"
+msgstr "Errore durante l'apertura del file %s"
 
-#: ../ui/new_button.glade.h:2
+#: .././data/resources/ui/start_page.glade.h:1
 msgid "Browse the patients to start a visit"
 msgstr "Cerca tra i pazienti per iniziare una visita"
 
-#: ../ui/new_button.glade.h:3
+#: .././data/resources/ui/start_page.glade.h:2
+msgid "Add new patient"
+msgstr "Aggiungi nuovo paziente"
+
+#: .././data/resources/ui/start_page.glade.h:3
+msgid "Patient list"
+msgstr "Lista dei Pazienti"
+
+#: .././data/resources/ui/start_page.glade.h:4
 msgid "Doctor list"
 msgstr "Lista dei Medici"
 
-#: ../ui/new_button.glade.h:4
+#: .././data/resources/ui/start_page.glade.h:6
 msgid "Open calendar"
 msgstr "Calendario"
 
-#: ../ui/new_button.glade.h:5
-msgid "Patient list"
-msgstr "Lista dei Pazienti"
+#: .././data/resources/ui/authentication_dialog.glade.h:1
+msgid "The server requires authentication. Please insert your credentials:"
+msgstr ""
+"Il server richiede l'autenticazione. Inserire le proprie creadenziali:"
 
-#: ../ui/new_button.glade.h:6
-msgid "Search medicines"
-msgstr "Cerca farmaci"
+#: .././data/resources/ui/authentication_dialog.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:11
+msgid "Username"
+msgstr "Nome utente"
 
-#: ../ui/window.glade.h:1
-msgid "Clinica"
-msgstr "Clinica"
+#: .././data/resources/ui/authentication_dialog.glade.h:3
+#: .././data/resources/ui/settings_window.glade.h:12
+msgid "Password"
+msgstr "Password"
 
-#: ../ui/window.glade.h:2
-msgid "New Doctor"
-msgstr "Nuovo Medico"
+#: .././data/resources/ui/medicine_editor.glade.h:1
+msgid "Name:"
+msgstr "Nome:"
 
-#: ../ui/window.glade.h:3
-msgid "New Patient"
-msgstr "Nuovo Paziente"
+#: .././data/resources/ui/medicine_editor.glade.h:2
+msgid "Description:"
+msgstr "Descrizione:"
 
-#: ../ui/window.glade.h:4
-msgid "_About"
+#: .././data/resources/ui/medicine_editor.glade.h:3
+msgid "Active ingredient:"
+msgstr "Principio attivo:"
+
+#: .././data/resources/ui/medicine_editor.glade.h:4
+msgid "Storage reccomendations:"
+msgstr "Note per la conservazione:"
+
+#: .././data/resources/ui/medicine_editor.glade.h:5
+msgid "Price:"
+msgstr "Prezzo:"
+
+#: .././data/resources/ui/medicine_editor.glade.h:6
+msgid "Other notes:"
+msgstr "Altre note:"
+
+#: .././data/resources/ui/import_dialog.glade.h:1
+msgid "Source:\t"
+msgstr "Sorgente:\t"
+
+#: .././data/resources/ui/import_dialog.glade.h:2
+msgid "Select the backup folder"
+msgstr "Seleziona la cartella del backup"
+
+#: .././data/resources/ui/import_dialog.glade.h:3
+msgid ""
+"<b>Warning:</b> Please note that the current data in the database <b>will be "
+"definitely lost</b>. Consider performing a backup of the current data before "
+"importing the old one."
 msgstr ""
+"<b>Attenzione:</b> I dati attualmente nel database saranno "
+"<b>definitivamente persi</b>. Considerare l'idea di effettuare un backup dei "
+"dati correnti prima di importare quelli vecchi."
 
-#: ../ui/window.glade.h:5
-msgid "_Contents"
-msgstr "_Sommario"
+#: .././data/resources/ui/doctor_editor.glade.h:1
+#: .././data/resources/ui/patient_editor.glade.h:12
+msgid "Doctor:"
+msgstr "Medico:"
 
-#: ../ui/window.glade.h:6
-msgid "_Doctors"
-msgstr "Me_dici"
+#: .././data/resources/ui/doctor_editor.glade.h:4
+#: .././data/resources/ui/patient_editor.glade.h:11
+msgid "Phone:"
+msgstr "Telefono fisso:"
 
-#: ../ui/window.glade.h:7
-msgid "_File"
-msgstr "_File"
+#: .././data/resources/ui/doctor_editor.glade.h:5
+msgid "Mobile:"
+msgstr "Telefono cellulare:"
 
-#: ../ui/window.glade.h:8
-msgid "_Help"
-msgstr "_Aiuto"
+#: .././data/resources/ui/wait_dialog.glade.h:1
+msgid "label"
+msgstr "etichetta"
 
-#: ../ui/window.glade.h:9
-msgid "_Home"
-msgstr "_Pagina iniziale"
+#: .././data/resources/ui/settings_window.glade.h:1
+msgid "Use plugins (restart required)"
+msgstr "Utilizza i plugin"
 
-#: ../ui/window.glade.h:10
-msgid "_Patients"
-msgstr "_Pazienti"
+#: .././data/resources/ui/settings_window.glade.h:2
+msgid "Allow to browse files in visits"
+msgstr "Permetti di navigare i file delle visite"
 
-#: ../ui/window.glade.h:11
-msgid "_Quit"
-msgstr ""
+#: .././data/resources/ui/settings_window.glade.h:3
+msgid "Medicines search engine"
+msgstr "Motore di ricerca per i farmaci"
 
-#: ../ui/window.glade.h:12
-msgid "_Search medicines"
-msgstr "_Cerca farmaci"
+#: .././data/resources/ui/settings_window.glade.h:4
+msgid "Data source"
+msgstr "Sorgente dati"
 
-#: ../ui/window.glade.h:13
-msgid "_Settings"
-msgstr "_Impostazioni"
+#: .././data/resources/ui/settings_window.glade.h:5
+msgid "General"
+msgstr "Generale"
 
-#: ../ui/window.glade.h:14
-msgid "_Tools"
-msgstr "_Strumenti"
+#: .././data/resources/ui/settings_window.glade.h:6
+msgid "Host"
+msgstr "Host"
 
-#: ../ui/window.glade.h:15
-msgid "_View"
-msgstr "_Visualizza"
+#: .././data/resources/ui/settings_window.glade.h:7
+msgid "Port"
+msgstr "Porta"
 
-#: ../ui/patient_editor.glade.h:1
-msgid "/"
-msgstr "/"
+#: .././data/resources/ui/settings_window.glade.h:8
+msgid "button"
+msgstr "bottone"
 
-#: ../ui/patient_editor.glade.h:2
-msgid "Address:"
-msgstr "Indirizzo:"
+#: .././data/resources/ui/settings_window.glade.h:9
+msgid "Connection to a remote Clinica instance"
+msgstr "Connessione ad un'istanza remota di Clinica"
 
-#: ../ui/patient_editor.glade.h:3
-msgid "Codice fiscale:"
-msgstr "Codice fiscale:"
+#: .././data/resources/ui/settings_window.glade.h:10
+msgid "Allow connections of other clinica from the LAN"
+msgstr "Permetti connessioni da altri clinica nella LAN"
 
-#: ../ui/patient_editor.glade.h:4
-msgid "Create a new patient"
-msgstr "Crea un nuovo paziente"
+#: .././data/resources/ui/settings_window.glade.h:13
+msgid "Built-in server"
+msgstr "Server integrato"
 
-#: ../ui/patient_editor.glade.h:5
-msgid "Date of birth:"
-msgstr "Data di nascita"
+#: .././data/resources/ui/settings_window.glade.h:14
+msgid "Network"
+msgstr "Rete"
 
-#: ../ui/patient_editor.glade.h:6 ../ui/doctor_editor.glade.h:2
-msgid "Doctor:"
-msgstr "Medico:"
+#: .././data/resources/ui/settings_window.glade.h:15
+msgid ""
+"The details that are inserted here will be used when generating\n"
+"the automatic visit reports. "
+msgstr ""
+"I dettagli che sono stati inseriti qui verranno utilizzati\n"
+"per la generazione dei report delle visite. "
 
-#: ../ui/patient_editor.glade.h:7
-msgid "Female"
-msgstr "Femmina"
+#: .././data/resources/ui/settings_window.glade.h:18
+msgid "Address"
+msgstr "Indrizzo"
 
-#: ../ui/patient_editor.glade.h:8
-msgid "Gender:"
-msgstr "Sesso:"
+#: .././data/resources/ui/settings_window.glade.h:19
+msgid "Institution"
+msgstr "Istituzione"
 
-#: ../ui/patient_editor.glade.h:9
-msgid "Male"
-msgstr "Maschio"
+#: .././data/resources/ui/settings_window.glade.h:20
+msgid "Email"
+msgstr "Email"
 
-#: ../ui/patient_editor.glade.h:11
+#: .././data/resources/ui/settings_window.glade.h:21
+msgid "Personal details"
+msgstr "Dettagli personali"
+
+#: .././data/resources/ui/settings_window.glade.h:22
+msgid "Plugins"
+msgstr "Plugins"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:1
+msgid "Visits"
+msgstr "Visite"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:2
+msgid "Schedule a visit"
+msgstr "Programma una visita"
+
+#: .././data/resources/ui/patient_editor.glade.h:1
 msgid "Patient:"
 msgstr "Paziente:"
 
-#: ../ui/patient_editor.glade.h:12 ../ui/doctor_editor.glade.h:5
-msgid "Phone:"
-msgstr "Telefono fisso:"
+#: .././data/resources/ui/patient_editor.glade.h:4
+msgid "Gender:"
+msgstr "Sesso:"
 
-#: ../ui/patient_editor.glade.h:14
+#: .././data/resources/ui/patient_editor.glade.h:5
+msgid "Date of birth:"
+msgstr "Data di nascita"
+
+#: .././data/resources/ui/patient_editor.glade.h:6
 msgid "dd"
 msgstr "gg"
 
-#: ../ui/patient_editor.glade.h:15
+#: .././data/resources/ui/patient_editor.glade.h:7
+msgid "/"
+msgstr "/"
+
+#: .././data/resources/ui/patient_editor.glade.h:8
 msgid "mm"
 msgstr "mm"
 
-#: ../ui/patient_editor.glade.h:16
+#: .././data/resources/ui/patient_editor.glade.h:9
 msgid "yyyy"
 msgstr "aaaa"
 
-#: ../ui/patient_list_sidebar.glade.h:1
-#, fuzzy
-msgid "Visits"
-msgstr "Visita"
+#: .././data/resources/ui/patient_editor.glade.h:10
+msgid "Address:"
+msgstr "Indirizzo:"
 
-#: ../ui/doctor_editor.glade.h:1
-msgid "Create a new doctor"
-msgstr "Crea un nuovo medico"
+#: .././data/resources/ui/patient_editor.glade.h:13
+msgid "Codice fiscale:"
+msgstr "Codice fiscale:"
 
-#: ../ui/doctor_editor.glade.h:3
-msgid "Mobile:"
-msgstr "Telefono cellulare:"
+#: .././data/resources/ui/patient_editor.glade.h:14
+msgid "Male"
+msgstr "Maschio"
 
-#~ msgid "Show details of patient"
-#~ msgstr "Mostra dettagli del paziente"
+#: .././data/resources/ui/patient_editor.glade.h:15
+msgid "Female"
+msgstr "Femmina"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:1
+msgid "Select the date on which you'd like to schedule the visit."
+msgstr "Seleziona la data in cui programmare la visita"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:2
+msgid "Selected patient"
+msgstr "Paziente selezionato"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:3
+msgid ""
+"<b>Tip:</b> Once created this visit will be visible in the visit editor of "
+"this patient."
+msgstr ""
+"<b>Consiglio:</b> Una volta creata questa visita sarà visibile all'interno "
+"delle visite del paziente."
 
-#~ msgid "Hide details of patient"
-#~ msgstr "Nascondi dettagli del paziente"
+#~ msgid "Clinica"
+#~ msgstr "Clinica"
 
-#~ msgid "Browse doctor list"
-#~ msgstr "Mostra la lista dei medici"
+#~ msgid "New Doctor"
+#~ msgstr "Nuovo Medico"
+
+#~ msgid "New Patient"
+#~ msgstr "Nuovo Paziente"
+
+#~ msgid ""
+#~ "You cannot delete a doctor with associated patients. Delete his patients "
+#~ "first."
+#~ msgstr ""
+#~ "Non puoi cancellare un dottore con pazienti associati. Prima cancella i suoi "
+#~ "pazienti."
+
+#~ msgid "The following patients will be deleted by this action:\n"
+#~ msgstr ""
+#~ "I seguenti pazienti verrebbero eliminati dal completamento di questa "
+#~ "operazione:\n"
+
+#~ msgid "Confirm deletion of patients"
+#~ msgstr "Conferma la rimozione dei pazienti"
+
+#~ msgid ""
+#~ "It's not possible to remove it without removing all his patients.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Non è possibile rimuoverlo senza rimuovere anche tutti i suoi pazienti.\n"
+#~ "\n"
+
+#~ msgid "Error loading patient_editor.glade."
+#~ msgstr "Errore durante il caricamento di patient_editor.glade."
+
+#, c-format
+#~ msgid "Visits of the patient %s"
+#~ msgstr "Visite del paziente %s"
+
+#, c-format
+#~ msgid ""
+#~ "Patient: <b>%s</b>\n"
+#~ "Doctor: <b>%s</b>"
+#~ msgstr ""
+#~ "Paziente: <b>%s</b>\n"
+#~ "Dottore: <b>%s</b>"
+
+#~ msgid "_Home"
+#~ msgstr "_Pagina iniziale"
+
+#~ msgid ""
+#~ "\n"
+#~ "Launchpad contributions: \n"
+#~ msgstr ""
+#~ "\n"
+#~ "Contributi su Launchpad: \n"
+
+#~ msgid "Use plugins (need restart)"
+#~ msgstr "Utilizzare i plugins (riavvio richiesto)"
+
+#~ msgid "Save as PDF"
+#~ msgstr "Salva come PDF"
+
+#~ msgid ""
+#~ "Select the search engine\n"
+#~ "used to find medicines"
+#~ msgstr ""
+#~ "Selezionare il motore di\n"
+#~ "ricerca per i farmaci"
+
+#~ msgid "Back"
+#~ msgstr "Indietro"
+
+#~ msgid "Medicine search"
+#~ msgstr "Cerca farmaci"
+
+#, c-format
+#~ msgid ""
+#~ "Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %d"
+#~ msgstr ""
+#~ "Errore aggiornando il database dalla versione 0.1 alla 0.2, sqlite exit "
+#~ "code: %d"
 
-#~ msgid "Browse patient list"
-#~ msgstr "Mostra la lista dei pazienti"
+#~ msgid "Edit patient details"
+#~ msgstr "Modifica i dettagli del paziente"
 
-#~ msgid "  zeugma https://launchpad.net/~sunder67\n"
-#~ msgstr "  zeugma https://launchpad.net/~sunder67\n"
+#~ msgid "Stop"
+#~ msgstr "Interrompi"
diff --git a/po/ja.po b/po/ja.po
new file mode 100644
index 0000000..d953d96
--- /dev/null
+++ b/po/ja.po
@@ -0,0 +1,1336 @@
+# Japanese translation for clinica-project
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the clinica-project package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: clinica-project\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-04-18 10:23+0200\n"
+"PO-Revision-Date: 2012-07-18 14:26+0000\n"
+"Last-Translator: Ryuta K <yamazatonotanuki at yahoo.co.jp>\n"
+"Language-Team: Japanese <ja at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-05-18 05:45+0000\n"
+"X-Generator: Launchpad (build 16626)\n"
+"Language: ja\n"
+
+#: .././plugins/AgenziaDelFarmaco.py:166
+msgid "Dosage form"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:167
+msgid "System of supply"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:168
+msgid "Class of eligibility"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:169
+msgid "Firm"
+msgstr ""
+
+#. Title of edit doctor dialog
+#: .././libclinica/DoctorEditor.vala:88
+#, c-format
+msgid "Edit doctor named %s"
+msgstr "医師の編集:%s"
+
+#: .././libclinica/PatientLens.vala:37
+msgid "Search for patients"
+msgstr "患者検索"
+
+#: .././libclinica/PatientLens.vala:43
+msgid "Recently visited patients"
+msgstr ""
+
+#. Create the SidebarEntry
+#: .././libclinica/PatientLens.vala:47 .././libclinica/PatientListPage.vala:64
+#: .././libclinica/PatientListPage.vala:110
+msgid "Patients"
+msgstr "患者"
+
+#: .././libclinica/PatientListView.vala:76
+#: .././libclinica/DoctorListView.vala:51
+#: .././data/resources/ui/doctor_editor.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:17
+#: .././data/resources/ui/patient_editor.glade.h:2
+msgid "Name"
+msgstr "姓"
+
+#. ...and then the surname column
+#: .././libclinica/PatientListView.vala:80
+#: .././libclinica/DoctorListView.vala:56
+#: .././data/resources/ui/doctor_editor.glade.h:3
+#: .././data/resources/ui/patient_editor.glade.h:3
+msgid "Surname"
+msgstr "名"
+
+#: .././libclinica/PatientListView.vala:165
+msgid "Select a patient to delete it!"
+msgstr "削除する患者を選択してください"
+
+#: .././libclinica/PatientListView.vala:172
+msgid ""
+"Really delete this patient? All information about him/her and the associated "
+"visits will be lost."
+msgstr "選択した患者に関するすべての情報を消去します"
+
+#. Set title according to the patient that we have loaded and connect
+#. * show startup signal to the focusing of the first field in the visit
+#: .././libclinica/VisitPage.vala:63
+#, c-format
+msgid "Visit of the patient %s"
+msgstr "患者:%s"
+
+#: .././libclinica/PluginManager.vala:35
+msgid ""
+"Clinica is extensible via plugins and you can easily enable\n"
+" and disable them using this window."
+msgstr ""
+"Clinica はプラグインによって拡張できます\n"
+" プラグインのon/offを切り替えます"
+
+#: .././libclinica/VisitSchedulerDialog.vala:60
+#: .././libclinica/VisitSchedulerDialog.vala:76
+msgid "Patient not selected"
+msgstr "患者が選択されていません"
+
+#: .././libclinica/VisitSchedulerDialog.vala:72
+#, c-format
+msgid "Schedule a vist for the patient %s"
+msgstr ""
+
+#: .././libclinica/Application.vala:113
+#, c-format
+msgid "Option parsing failed: %s\n"
+msgstr ""
+
+#: .././libclinica/Application.vala:148
+#, c-format
+msgid "Clinica %s\n"
+msgstr ""
+
+#. Then add add a new visit and keep a reference to new_page
+#. *  to focus it on page loading.
+#. Create a new one and connect it
+#: .././libclinica/VisitBrowser.vala:73 .././libclinica/VisitBrowser.vala:252
+msgid "New visit"
+msgstr "新患"
+
+#: .././libclinica/VisitBrowser.vala:152 .././libclinica/VisitBrowser.vala:209
+msgid ""
+"A visit need to be saved in order to be exported as PDF.\n"
+"Do you want to save the visit now?"
+msgstr ""
+"PDFで書き出すためにはカルテを保存する必要があります。\n"
+"カルテを保存しますか?"
+
+#: .././libclinica/VisitBrowser.vala:196
+msgid "Error while delivering the print operation"
+msgstr ""
+
+#: .././libclinica/VisitDetail.vala:70
+msgid "Edit visit"
+msgstr "カルテの編集"
+
+#: .././libclinica/VisitDetail.vala:80 .././libclinica/EventDetail.vala:75
+msgid "Delete event"
+msgstr "イベントの削除"
+
+#: .././libclinica/VisitDetail.vala:104
+msgid "Show details"
+msgstr "詳細表示"
+
+#: .././libclinica/VisitDetail.vala:125 .././libclinica/VisitTab.vala:269
+msgid ""
+"Deleting a visit will cause all its data to be lost.\n"
+"Do you really want to continue?"
+msgstr ""
+"カルテのデータを破棄します。\n"
+"続けますか?"
+
+#. Create menu items, connect them to their callback
+#. * and add it to the menu
+#: .././libclinica/DoctorContextMenu.vala:58
+#: .././libclinica/PatientContextMenu.vala:54
+msgid "Delete"
+msgstr "削除"
+
+#. Instantiate menu items
+#: .././libclinica/DoctorContextMenu.vala:59
+#: .././libclinica/PatientContextMenu.vala:51
+#: .././libclinica/EventDetail.vala:111
+msgid "Edit"
+msgstr "編集"
+
+#: .././libclinica/MedicineEditor.vala:41
+msgid "Create a new Medicine"
+msgstr ""
+
+#: .././libclinica/CalendarWindow.vala:36
+msgid "Clinica calendar"
+msgstr "Clinica カレンダー"
+
+#. Anamnesis
+#: .././libclinica/VisitTab.vala:286 .././libclinica/VisitPrinter.vala:107
+msgid "Anamnesis"
+msgstr "既往歴"
+
+#. Physical examination
+#: .././libclinica/VisitTab.vala:289 .././libclinica/VisitPrinter.vala:112
+msgid "Physical examination"
+msgstr "身体所見"
+
+#. Laboratory Exam
+#: .././libclinica/VisitTab.vala:292 .././libclinica/VisitPrinter.vala:117
+msgid "Laboratory exam"
+msgstr "採血結果"
+
+#: .././libclinica/VisitTab.vala:295
+msgid "Hystopathology"
+msgstr "組織病理所見"
+
+#. Diagnosis
+#: .././libclinica/VisitTab.vala:298 .././libclinica/VisitPrinter.vala:127
+msgid "Diagnosis"
+msgstr "診断"
+
+#. Topical therapy
+#: .././libclinica/VisitTab.vala:301 .././libclinica/VisitPrinter.vala:132
+msgid "Topical therapy"
+msgstr "局所治療"
+
+#. Systemic therapy
+#: .././libclinica/VisitTab.vala:304 .././libclinica/VisitPrinter.vala:137
+msgid "Systemic therapy"
+msgstr "全身治療"
+
+#. Subsequent checks
+#: .././libclinica/VisitTab.vala:307 .././libclinica/VisitPrinter.vala:142
+msgid "Subsequent checks"
+msgstr "次回チェック項目"
+
+#: .././libclinica/MedicineTreeView.vala:37
+msgid "Medicine name"
+msgstr ""
+
+#: .././libclinica/MedicineTreeView.vala:40
+#: .././libclinica/MedicineDetailDialog.vala:75
+msgid "Price"
+msgstr "価格"
+
+#: .././libclinica/PatientListPage.vala:81 .././libclinica/StartPage.vala:211
+msgid "Add a new patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:87
+msgid "Remove the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:93
+msgid "Modify the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:99
+msgid "Edit visits of the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:105
+msgid "Schedule a visit with the selected patient"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:417
+#, c-format
+msgid "Trying to removing doctor with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:440
+#, c-format
+msgid "Trying to removing patient with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:463
+#, c-format
+msgid "Trying to removing visit with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:486
+#, c-format
+msgid "Trying to removing event with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/Builder.vala:45
+#, c-format
+msgid ""
+"Failed to load UI file: %s. Please check your installation.\n"
+"%s"
+msgstr ""
+
+#: .././libclinica/LocalFileStore.vala:62
+#, c-format
+msgid "Unable to setup file monitors for the filestore folder: %s"
+msgstr ""
+
+#: .././libclinica/LocalFileStore.vala:106
+#, c-format
+msgid "Unable to setup a file monitor on directory %s"
+msgstr ""
+
+#: .././libclinica/LocalFileStore.vala:141
+#, c-format
+msgid "Error while listing the files for the visit identified by id %d"
+msgstr ""
+
+#: .././libclinica/LocalFileStore.vala:167
+msgid "Destination file already exists"
+msgstr ""
+
+#: .././libclinica/LocalFileStore.vala:172
+#, c-format
+msgid "Error while adding the file %s to the selected visit"
+msgstr ""
+
+#: .././libclinica/NetworkedDataProvider.vala:246
+msgid ""
+"You canceled the authentication process on the remote server.\n"
+"From now on Clinica will use the local database. If you want to connect to\n"
+"remote server please re-enable networking in the settings dialog."
+msgstr ""
+
+#. Set title to edit patient * instead of create new patient
+#: .././libclinica/PatientEditor.vala:304
+#, c-format
+msgid "Edit patient named %s"
+msgstr "患者の編集:%s"
+
+#: .././libclinica/PatientEditor.vala:408
+msgid "You must select a doctor for this patient."
+msgstr "担当医を選択してください"
+
+#: .././libclinica/PatientEditor.vala:409
+msgid ""
+"If you need to create a new one type his name in the entry and select Create "
+"new doctor from the completion list."
+msgstr ""
+
+#: .././libclinica/PatientEditor.vala:445
+msgid "Date inserted is invalid, aborting patient editing"
+msgstr ""
+
+#: .././libclinica/AuthenticationDialog.vala:40
+msgid "Authentication required"
+msgstr ""
+
+#. Start of events
+#: .././libclinica/CalendarEventList.vala:73
+msgid "Events scheduled"
+msgstr "予定"
+
+#: .././libclinica/CalendarEventList.vala:92
+msgid ""
+"No events on this day.\n"
+"You can create a new event\n"
+"by clicking on the top-left button."
+msgstr ""
+"予定がありません。\n"
+"左上のボタンをクリックすると\n"
+"新しい予定が作成できます。"
+
+#: .././libclinica/CalendarEventList.vala:103
+msgid "Visits performed"
+msgstr "診療"
+
+#: .././libclinica/CalendarEventList.vala:105
+msgid "Visits scheduled"
+msgstr "診療予約"
+
+#: .././libclinica/CalendarEventList.vala:126
+msgid "No visits performed on this day"
+msgstr "今日の診療はありません"
+
+#: .././libclinica/ImportDialog.vala:40
+msgid "Import data from backup file"
+msgstr ""
+
+#: .././libclinica/PatientContextMenu.vala:57
+msgid "Edit visits"
+msgstr ""
+
+#. File menu
+#: .././libclinica/UIManager.vala:44
+msgid "_File"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:45
+msgid "New _patient"
+msgstr "新患"
+
+#: .././libclinica/UIManager.vala:46
+msgid "Create a new patient"
+msgstr "患者登録"
+
+#: .././libclinica/UIManager.vala:47
+msgid "New _doctor"
+msgstr "医師登録"
+
+#: .././libclinica/UIManager.vala:48
+msgid "Create a new doctor"
+msgstr "医師登録"
+
+#: .././libclinica/UIManager.vala:49
+msgid "_Quit"
+msgstr "終了(_Q)"
+
+#: .././libclinica/UIManager.vala:50
+msgid "Quit clinica"
+msgstr ""
+
+#. View menu
+#: .././libclinica/UIManager.vala:53
+msgid "_View"
+msgstr "表示(_V)"
+
+#: .././libclinica/UIManager.vala:54
+msgid "_Start page"
+msgstr "スタートページ(_S)"
+
+#: .././libclinica/UIManager.vala:55
+msgid "Go to the start page of clinica"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:56
+msgid "_Patients"
+msgstr "患者リスト(_P)"
+
+#: .././libclinica/UIManager.vala:57
+msgid "Go to the list of patients"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:58
+msgid "_Doctors"
+msgstr "医師リスト(_D)"
+
+#: .././libclinica/UIManager.vala:59
+msgid "Go to the list of doctors"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:60
+msgid "_Search medicines"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:61
+msgid "Search medicines online"
+msgstr ""
+
+#. Tools menu
+#: .././libclinica/UIManager.vala:64
+msgid "_Tools"
+msgstr "ツール(_T)"
+
+#: .././libclinica/UIManager.vala:65
+msgid "_Settings"
+msgstr "設定(_S)"
+
+#: .././libclinica/UIManager.vala:66
+msgid "Customize clinica behaviour"
+msgstr "カスタマイズ"
+
+#: .././libclinica/UIManager.vala:67
+msgid "Backup"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:68
+msgid "Backup clinica data to file"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:69
+msgid "Import"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:70
+msgid "Import data from backup files"
+msgstr ""
+
+#. Help menu
+#: .././libclinica/UIManager.vala:73
+msgid "_Help"
+msgstr "ヘルプ(_H)"
+
+#: .././libclinica/UIManager.vala:74
+msgid "_Contents"
+msgstr "目次(_C)"
+
+#: .././libclinica/UIManager.vala:75
+msgid "Open the help system"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:76
+msgid "_Report a bug"
+msgstr "バグを報告(_R)"
+
+#: .././libclinica/UIManager.vala:77
+msgid "Report a bug online"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:78
+msgid "_About"
+msgstr "Clinica について(_A)"
+
+#: .././libclinica/UIManager.vala:79
+msgid "Get to know the development team of Clinica"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:113
+msgid "Please select a valid backup file"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:125
+msgid "Importing data"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:126
+msgid "Please wait while Clinica imports the data..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:129
+msgid "Importing the JSON data.."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:137
+msgid "Error while parsing the backup JSON data"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:143 .././libclinica/BackupEngine.vala:170
+msgid "An error occurred while parsing the JSON file"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:165
+msgid ""
+"The doctors, patients, visits and events field in the JSON backup should be "
+"arrays, aborting."
+msgstr ""
+
+#. Clear the database and put the data back in it
+#. in such a way that won't break relationships.
+#: .././libclinica/BackupEngine.vala:188
+msgid "Clearing the old data in the database..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:192
+msgid "Loading doctors..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:201
+#, c-format
+msgid "- %d doctors have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:203
+msgid "Loading patients..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:216
+#, c-format
+msgid "- %d patients have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:218
+msgid "Loading visits..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:231
+#, c-format
+msgid "- %d visits have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:233
+msgid "Loading events..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:249
+#, c-format
+msgid "- %d events have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:258
+msgid ""
+"- A FileStore was found but is not available in the current provider\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:283
+#, c-format
+msgid "- %d files have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:287
+msgid "- No FileStore was found in the backup\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:298
+msgid "The import of the data has been completed successfully"
+msgstr ""
+
+#: .././libclinica/PatientListStore.vala:128
+#: .././libclinica/PatientListStore.vala:150
+msgid ""
+"Patients database seems corrupted. This is likely to be a bug in the "
+"application"
+msgstr ""
+
+#. Print the error message to stdout
+#: .././libclinica/Utils.vala:79
+msgid "ERROR => "
+msgstr ""
+
+#: .././libclinica/Utils.vala:83 .././libclinica/Utils.vala:84
+msgid "Clinica encountered an error"
+msgstr ""
+
+#: .././libclinica/LocalMedicinesDatabase.vala:90
+#, c-format
+msgid "Medicine with id = %lld not found in DB: %s"
+msgstr ""
+
+#: .././libclinica/LocalMedicinesDatabase.vala:119
+#, c-format
+msgid "Error inserting medicine in the database: %s"
+msgstr ""
+
+#: .././libclinica/EventEditor.vala:93
+msgid "Create a new event"
+msgstr "新しい予定を作成"
+
+#: .././libclinica/EventEditor.vala:97
+#, c-format
+msgid "Editing event: %s"
+msgstr "予定の編集:%s"
+
+#. Create the entry for title of the event and venue
+#: .././libclinica/EventEditor.vala:115
+msgid "Title"
+msgstr "タイトル"
+
+#: .././libclinica/EventEditor.vala:116
+msgid "Venue"
+msgstr "場所"
+
+#: .././libclinica/EventEditor.vala:151
+msgid "Time:"
+msgstr "時間:"
+
+#: .././libclinica/EventEditor.vala:167
+msgid "Insert the description here..."
+msgstr "ここに書き込みましょう..."
+
+#: .././libclinica/EventEditor.vala:205 .././libclinica/VisitToolbar.vala:96
+#, c-format
+msgid "Patient"
+msgstr "患者"
+
+#: .././libclinica/EventEditor.vala:264
+msgid "Visit"
+msgstr ""
+
+#: .././libclinica/VisitListStore.vala:99
+msgid ""
+"Visit database seems corrupted. This is likely to be a bug in the application"
+msgstr ""
+
+#: .././libclinica/MedicineSearchPage.vala:76
+#: .././data/resources/ui/start_page.glade.h:5
+msgid "Search medicines"
+msgstr "医薬品検索"
+
+#: .././libclinica/MedicineSearchPage.vala:100
+msgid "No search engine available"
+msgstr ""
+
+#: .././libclinica/MedicineSearchPage.vala:108
+#, c-format
+msgid "Searching for %s..."
+msgstr ""
+
+#: .././libclinica/MedicineSearchPage.vala:133
+msgid "Medicines"
+msgstr ""
+
+#: .././libclinica/MedicineSearchPage.vala:96
+msgid "It's not possible to perform a search for medicine"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:143
+#, c-format
+msgid "Error creating some configuration files, check permission on %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:151
+#, c-format
+msgid "Error reading some configuration files, check permission on %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:170
+#, c-format
+msgid "Failure while settings new database version to %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:173
+msgid "Failure while upgrading database"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:177
+msgid "Version of the database is not compatible"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:199
+msgid ""
+"This is a version of Clinica newer than the one that created the\n"
+"patients database installed on the system.\n"
+"Using this version requires upgrading the database, and\n"
+"<b>the old version will not be able to use it anymore</b>.\n"
+"Do you wish to perform this one-time upgrade?\n"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:200
+msgid "Upgrade database"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:225
+msgid "Database needs to be moved"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:226
+msgid ""
+"An older version of clinica has been detected and the old database has to be "
+"moved\n"
+"to a new location to continue.\n"
+"<b>The older version of clinica won't work anymore with this setup</b>.\n"
+"Do you still want to continue?"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:239
+msgid ""
+"Error while transferring the database to the new default location for "
+"clinica >= 0.2.9"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:251
+msgid "Error upgrading database, please check your installation"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:266
+#, c-format
+msgid ""
+"Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:359
+#, c-format
+msgid "Error while retrieving the doctor with id = %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:399
+#, c-format
+msgid "An error occurred while saving the doctor with id %d: %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:468
+#, c-format
+msgid "Error while retrieving the patient with id = %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:517
+#: .././libclinica/SqliteDataProvider.vala:652
+#, c-format
+msgid "An error occurred while saving the doctor with id %s: %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:597
+#, c-format
+msgid "Error while retrieving the visit with id = %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:686
+#, c-format
+msgid "Error while retrieving the event with id = %d"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:728
+#, c-format
+msgid "An error occurred while saving the event with id %s: %s"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:40
+msgid "Clinica settings"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:52
+msgid "Clinica has been built without plugins support"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:135
+msgid "Please use the Network tab to enable the Networked data provider"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:136
+msgid "Use the Network tab"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Disconnect"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Connect"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:191
+#, c-format
+msgid "Connection to the given host failed. Please check your settings."
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:192
+msgid "Connection failed"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:206
+#: .././libclinica/ResourceManager.vala:284
+#, c-format
+msgid "Username or password are wrong. Disconnecting from the server."
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:207
+msgid "Wrong authentication data has been provided"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:60
+msgid "Edit details of patient"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:67
+msgid "Remove this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:74
+msgid "Export this visit as PDF"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:81
+msgid "Print a report of this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:88
+msgid "Save this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:99
+msgid "Close the visits of this patient"
+msgstr ""
+
+#: .././libclinica/VisitToolbar.vala:93
+msgid "This patient has not a doctor"
+msgstr ""
+
+#: .././libclinica/VisitToolbar.vala:97
+msgid "Doctor"
+msgstr ""
+
+#: .././libclinica/DateTimePicker.vala:56
+msgid "Hour"
+msgstr "時"
+
+#: .././libclinica/DateTimePicker.vala:58
+msgid "Minute"
+msgstr "分"
+
+#: .././libclinica/DoctorListStore.vala:75
+msgid "Doctors database seems corrupted."
+msgstr ""
+
+#: .././libclinica/DoctorListView.vala:175
+msgid "Select a doctor to delete it!"
+msgstr "登録削除する医師を選択してください"
+
+#: .././libclinica/DoctorListView.vala:186
+msgid ""
+"The doctor that you have selected for removal has some patients associated. "
+"\n"
+msgstr "選択された医師には受け持ちの患者がいます。削除してよろしいですか? \n"
+
+#: .././libclinica/DoctorListView.vala:187
+msgid ""
+"It's not possible to remove it without disassociating all his patients.\n"
+"\n"
+msgstr ""
+
+#: .././libclinica/DoctorListView.vala:188
+#: .././libclinica/DoctorListView.vala:217
+msgid "Do you really want to proceed?"
+msgstr ""
+
+#: .././libclinica/DoctorListView.vala:189
+msgid "Doctor has associated patients"
+msgstr ""
+
+#: .././libclinica/DoctorListView.vala:215
+msgid ""
+"The following patients will be disassociated from this doctor by this "
+"action:\n"
+msgstr ""
+
+#: .././libclinica/DoctorListView.vala:218
+msgid "Confirm disassociation of patients"
+msgstr ""
+
+#: .././libclinica/DoctorListView.vala:235
+msgid ""
+"Really delete this doctor? All information about him/her will be lost."
+msgstr ""
+
+#. Ask the user where he would like to backup its files.
+#: .././libclinica/UserInterface.vala:360
+msgid "Select the folder where the data should be saved"
+msgstr ""
+
+#. In this string %s refers to the path where the backup has been performed.
+#: .././libclinica/UserInterface.vala:386
+#, c-format
+msgid "Backup completed successfully in the folder %s"
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:387
+msgid "Backup completed"
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:389
+msgid ""
+"Please take care of copying the folder in a safe place for future restore of "
+"the data."
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:416
+#, c-format
+msgid "Cannot open the help: %s"
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:441
+msgid ""
+"An error occurred while opening the bug system. Please go to\n"
+"http://launchpad.net/clinica-project/ to file a bug"
+msgstr ""
+
+#: .././libclinica/EventDetail.vala:65
+msgid "Edit event"
+msgstr "イベントの編集"
+
+#: .././libclinica/EventDetail.vala:112
+msgid "Remove"
+msgstr "削除"
+
+#: .././libclinica/EventDetail.vala:145
+msgid "Really delete this event?"
+msgstr ""
+
+#: .././libclinica/Sidebar.vala:68
+msgid "Pages"
+msgstr ""
+
+#: .././libclinica/StartPage.vala:93
+msgid "Dashboard"
+msgstr ""
+
+#: .././libclinica/StartPage.vala:205
+msgid ""
+"Add a new patient \n"
+" with name "
+msgstr ""
+
+#: .././libclinica/EventListStore.vala:121
+msgid ""
+"Events database seems corrupted. This is likely to be a bug in the "
+"application"
+msgstr ""
+
+#: .././libclinica/DoctorListPage.vala:60
+#: .././libclinica/DoctorListPage.vala:93
+msgid "Doctors"
+msgstr ""
+
+#: .././libclinica/DoctorListPage.vala:76
+msgid "Add a doctor"
+msgstr ""
+
+#: .././libclinica/DoctorListPage.vala:82
+msgid "Edit the selected doctor"
+msgstr ""
+
+#: .././libclinica/DoctorListPage.vala:88
+msgid "Remove the selected doctor"
+msgstr ""
+
+#: .././libclinica/ResourceManager.vala:285
+msgid "Error while authenticating on the server"
+msgstr ""
+
+#: .././libclinica/AboutDialog.vala:41
+msgid "Medical records manager"
+msgstr "医療記録マネージャー"
+
+#: .././libclinica/AboutDialog.vala:43
+msgid "About Clinica"
+msgstr ""
+
+#: .././libclinica/AboutDialog.vala:52
+msgid "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+msgstr ""
+
+#: .././libclinica/AboutDialog.vala:53
+msgid "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+msgstr ""
+
+#. Histopathology
+#: .././libclinica/VisitPrinter.vala:122
+msgid "Histopathology"
+msgstr ""
+
+#. Now write the date of the visit after that
+#: .././libclinica/VisitPrinter.vala:285
+#, c-format
+msgid "Report of the visit of %s"
+msgstr ""
+
+#: .././libclinica/VisitPrinter.vala:316
+#: .././libclinica/MedicineDetailDialog.vala:109
+msgid "Field empty"
+msgstr ""
+
+#. Add a Attach button
+#: .././libclinica/VisitFileManager.vala:89
+msgid "Attach file"
+msgstr "添付ファイル"
+
+#: .././libclinica/VisitFileManager.vala:97
+msgid "Browse files"
+msgstr ""
+
+#: .././libclinica/VisitFileManager.vala:113
+msgid "Select a file to attach"
+msgstr ""
+
+#: .././libclinica/VisitFileManager.vala:133
+msgid "Unable to open the browser on the filestore position"
+msgstr ""
+
+#: .././libclinica/VisitFileManager.vala:163
+msgid ""
+"Save the visit\n"
+" to attach files"
+msgstr ""
+
+#: .././libclinica/VisitFileManager.vala:170
+msgid "Attach files"
+msgstr ""
+
+#: .././libclinica/SidebarCalendarEntry.vala:30
+msgid "Calendar"
+msgstr ""
+
+#. Create the object and add the close button used
+#. * to dismiss the dialog
+#: .././libclinica/MedicineDetailDialog.vala:46
+msgid "Close"
+msgstr "閉じる"
+
+#: .././libclinica/MedicineDetailDialog.vala:65
+msgid "General information"
+msgstr "一般情報"
+
+#. And now the content for the others fields of the medicine
+#: .././libclinica/MedicineDetailDialog.vala:71
+msgid "Identification Code"
+msgstr ""
+
+#: .././libclinica/MedicineDetailDialog.vala:72
+msgid "Description"
+msgstr ""
+
+#: .././libclinica/MedicineDetailDialog.vala:73
+msgid "Active ingredient"
+msgstr ""
+
+#: .././libclinica/MedicineDetailDialog.vala:74
+msgid "Storage reccomendations"
+msgstr ""
+
+#: .././libclinica/MedicineDetailDialog.vala:83
+msgid "Additional notes"
+msgstr ""
+
+#. Nothing to do for now.
+#: .././libclinica/FileDetail.vala:89
+#, c-format
+msgid "Error while loading icon for file %s: %s"
+msgstr ""
+
+#: .././libclinica/FileDetail.vala:98
+msgid "Open file"
+msgstr ""
+
+#: .././libclinica/FileDetail.vala:110
+msgid "Delete file"
+msgstr ""
+
+#: .././libclinica/FileDetail.vala:122
+#, c-format
+msgid ""
+"Do you really want to delete the file %s?\n"
+"If you proceed it will be definitively lost."
+msgstr ""
+
+#: .././libclinica/FileDetail.vala:135
+#, c-format
+msgid "Error while opening the file %s"
+msgstr ""
+
+#: .././data/resources/ui/start_page.glade.h:1
+msgid "Browse the patients to start a visit"
+msgstr ""
+
+#: .././data/resources/ui/start_page.glade.h:2
+msgid "Add new patient"
+msgstr ""
+
+#: .././data/resources/ui/start_page.glade.h:3
+msgid "Patient list"
+msgstr ""
+
+#: .././data/resources/ui/start_page.glade.h:4
+msgid "Doctor list"
+msgstr "医師リスト"
+
+#: .././data/resources/ui/start_page.glade.h:6
+msgid "Open calendar"
+msgstr ""
+
+#: .././data/resources/ui/authentication_dialog.glade.h:1
+msgid "The server requires authentication. Please insert your credentials:"
+msgstr ""
+
+#: .././data/resources/ui/authentication_dialog.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:11
+msgid "Username"
+msgstr ""
+
+#: .././data/resources/ui/authentication_dialog.glade.h:3
+#: .././data/resources/ui/settings_window.glade.h:12
+msgid "Password"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:1
+msgid "Name:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:2
+msgid "Description:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:3
+msgid "Active ingredient:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:4
+msgid "Storage reccomendations:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:5
+msgid "Price:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:6
+msgid "Other notes:"
+msgstr ""
+
+#: .././data/resources/ui/import_dialog.glade.h:1
+msgid "Source:\t"
+msgstr ""
+
+#: .././data/resources/ui/import_dialog.glade.h:2
+msgid "Select the backup folder"
+msgstr ""
+
+#: .././data/resources/ui/import_dialog.glade.h:3
+msgid ""
+"<b>Warning:</b> Please note that the current data in the database <b>will be "
+"definitely lost</b>. Consider performing a backup of the current data before "
+"importing the old one."
+msgstr ""
+
+#: .././data/resources/ui/doctor_editor.glade.h:1
+#: .././data/resources/ui/patient_editor.glade.h:12
+msgid "Doctor:"
+msgstr "医師:"
+
+#: .././data/resources/ui/doctor_editor.glade.h:4
+#: .././data/resources/ui/patient_editor.glade.h:11
+msgid "Phone:"
+msgstr "TEL:"
+
+#: .././data/resources/ui/doctor_editor.glade.h:5
+msgid "Mobile:"
+msgstr "携帯:"
+
+#: .././data/resources/ui/wait_dialog.glade.h:1
+msgid "label"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:1
+msgid "Use plugins (restart required)"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:2
+msgid "Allow to browse files in visits"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:3
+msgid "Medicines search engine"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:4
+msgid "Data source"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:5
+msgid "General"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:6
+msgid "Host"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:7
+msgid "Port"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:8
+msgid "button"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:9
+msgid "Connection to a remote Clinica instance"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:10
+msgid "Allow connections of other clinica from the LAN"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:13
+msgid "Built-in server"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:14
+msgid "Network"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:15
+msgid ""
+"The details that are inserted here will be used when generating\n"
+"the automatic visit reports. "
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:18
+msgid "Address"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:19
+msgid "Institution"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:20
+msgid "Email"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:21
+msgid "Personal details"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:22
+msgid "Plugins"
+msgstr "プラグイン"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:1
+msgid "Visits"
+msgstr ""
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:2
+msgid "Schedule a visit"
+msgstr ""
+
+#: .././data/resources/ui/patient_editor.glade.h:1
+msgid "Patient:"
+msgstr "患者:"
+
+#: .././data/resources/ui/patient_editor.glade.h:4
+msgid "Gender:"
+msgstr "性別:"
+
+#: .././data/resources/ui/patient_editor.glade.h:5
+msgid "Date of birth:"
+msgstr "生年月日"
+
+#: .././data/resources/ui/patient_editor.glade.h:6
+msgid "dd"
+msgstr ""
+
+#: .././data/resources/ui/patient_editor.glade.h:7
+msgid "/"
+msgstr ""
+
+#: .././data/resources/ui/patient_editor.glade.h:8
+msgid "mm"
+msgstr ""
+
+#: .././data/resources/ui/patient_editor.glade.h:9
+msgid "yyyy"
+msgstr ""
+
+#: .././data/resources/ui/patient_editor.glade.h:10
+msgid "Address:"
+msgstr "住所:"
+
+#: .././data/resources/ui/patient_editor.glade.h:13
+msgid "Codice fiscale:"
+msgstr ""
+
+#: .././data/resources/ui/patient_editor.glade.h:14
+msgid "Male"
+msgstr "男性"
+
+#: .././data/resources/ui/patient_editor.glade.h:15
+msgid "Female"
+msgstr "女性"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:1
+msgid "Select the date on which you'd like to schedule the visit."
+msgstr ""
+
+#: .././data/resources/ui/visit_scheduler.glade.h:2
+msgid "Selected patient"
+msgstr ""
+
+#: .././data/resources/ui/visit_scheduler.glade.h:3
+msgid ""
+"<b>Tip:</b> Once created this visit will be visible in the visit editor of "
+"this patient."
+msgstr ""
+
+#, c-format
+#~ msgid ""
+#~ "Patient: <b>%s</b>\n"
+#~ "Doctor: <b>%s</b>"
+#~ msgstr ""
+#~ "患者: <b>%s</b>\n"
+#~ "患者: <b>%s</b>"
diff --git a/po/pl.po b/po/pl.po
new file mode 100644
index 0000000..38e2aa1
--- /dev/null
+++ b/po/pl.po
@@ -0,0 +1,1472 @@
+# Polish translation for clinica-project
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the clinica-project package.
+# ŁUKASZ CIELIŃSKI <lukasc at mp.pl>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: clinica-project\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-04-18 10:23+0200\n"
+"PO-Revision-Date: 2013-06-16 08:11+0000\n"
+"Last-Translator: Łukasz Cieliński <lukasc at mp.pl>\n"
+"Language-Team: Polish <pl at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-06-17 05:32+0000\n"
+"X-Generator: Launchpad (build 16667)\n"
+"Language: pl\n"
+
+#: .././plugins/AgenziaDelFarmaco.py:166
+msgid "Dosage form"
+msgstr "Postać leku:"
+
+#: .././plugins/AgenziaDelFarmaco.py:167
+msgid "System of supply"
+msgstr "Dostępność:"
+
+#: .././plugins/AgenziaDelFarmaco.py:168
+msgid "Class of eligibility"
+msgstr "Poziom refundacji:"
+
+#: .././plugins/AgenziaDelFarmaco.py:169
+msgid "Firm"
+msgstr "Podmiot odpowiedzialny:"
+
+#. Title of edit doctor dialog
+#: .././libclinica/DoctorEditor.vala:88
+#, c-format
+msgid "Edit doctor named %s"
+msgstr "Edytuj dane lekarza: %s"
+
+#: .././libclinica/PatientLens.vala:37
+msgid "Search for patients"
+msgstr "Wyszukaj pacjenta"
+
+#: .././libclinica/PatientLens.vala:43
+msgid "Recently visited patients"
+msgstr "Niedawne wizyty"
+
+#. Create the SidebarEntry
+#: .././libclinica/PatientLens.vala:47 .././libclinica/PatientListPage.vala:64
+#: .././libclinica/PatientListPage.vala:110
+msgid "Patients"
+msgstr "Baza pacjentów"
+
+#: .././libclinica/PatientListView.vala:76
+#: .././libclinica/DoctorListView.vala:51
+#: .././data/resources/ui/doctor_editor.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:17
+#: .././data/resources/ui/patient_editor.glade.h:2
+msgid "Name"
+msgstr "Imię"
+
+#. ...and then the surname column
+#: .././libclinica/PatientListView.vala:80
+#: .././libclinica/DoctorListView.vala:56
+#: .././data/resources/ui/doctor_editor.glade.h:3
+#: .././data/resources/ui/patient_editor.glade.h:3
+msgid "Surname"
+msgstr "Nazwisko"
+
+#: .././libclinica/PatientListView.vala:165
+msgid "Select a patient to delete it!"
+msgstr "Zaznacz pacjenta, którego chcesz usunąć!"
+
+#: .././libclinica/PatientListView.vala:172
+msgid ""
+"Really delete this patient? All information about him/her and the associated "
+"visits will be lost."
+msgstr "Czy na pewno usunąć Pacjenta? Wszystkie dane zostaną utracone!"
+
+#. Set title according to the patient that we have loaded and connect
+#. * show startup signal to the focusing of the first field in the visit
+#: .././libclinica/VisitPage.vala:63
+#, c-format
+msgid "Visit of the patient %s"
+msgstr "Wizyty pacjenta %s"
+
+#: .././libclinica/PluginManager.vala:35
+msgid ""
+"Clinica is extensible via plugins and you can easily enable\n"
+" and disable them using this window."
+msgstr ""
+"Funkcje programu Clinica można rozbudować poprzez system wtyczek.\n"
+"W tym oknie możesz włączać i wyłączać wtyczki."
+
+#: .././libclinica/VisitSchedulerDialog.vala:60
+#: .././libclinica/VisitSchedulerDialog.vala:76
+msgid "Patient not selected"
+msgstr "Nie wybrano pacjenta"
+
+#: .././libclinica/VisitSchedulerDialog.vala:72
+#, c-format
+msgid "Schedule a vist for the patient %s"
+msgstr "Umów wizytę dla pacjenta %s"
+
+#: .././libclinica/Application.vala:113
+#, c-format
+msgid "Option parsing failed: %s\n"
+msgstr "Wystąpił błąd podczas parsowania opcji: %s\n"
+
+#: .././libclinica/Application.vala:148
+#, c-format
+msgid "Clinica %s\n"
+msgstr "Clinica %s\n"
+
+#. Then add add a new visit and keep a reference to new_page
+#. *  to focus it on page loading.
+#. Create a new one and connect it
+#: .././libclinica/VisitBrowser.vala:73 .././libclinica/VisitBrowser.vala:252
+msgid "New visit"
+msgstr "Nowa wizyta"
+
+#: .././libclinica/VisitBrowser.vala:152 .././libclinica/VisitBrowser.vala:209
+msgid ""
+"A visit need to be saved in order to be exported as PDF.\n"
+"Do you want to save the visit now?"
+msgstr ""
+"Przed eksportem do formatu PDF należy zapisać wizytę.\n"
+"Czy zapisać wizytę?"
+
+#: .././libclinica/VisitBrowser.vala:196
+msgid "Error while delivering the print operation"
+msgstr "Wystąpił błąd podczas przetwarzania wydruku."
+
+#: .././libclinica/VisitDetail.vala:70
+msgid "Edit visit"
+msgstr "Edytuj wizytę"
+
+#: .././libclinica/VisitDetail.vala:80 .././libclinica/EventDetail.vala:75
+msgid "Delete event"
+msgstr "Usuń zdarzenie"
+
+#: .././libclinica/VisitDetail.vala:104
+msgid "Show details"
+msgstr "Pokaż szczegóły"
+
+#: .././libclinica/VisitDetail.vala:125 .././libclinica/VisitTab.vala:269
+msgid ""
+"Deleting a visit will cause all its data to be lost.\n"
+"Do you really want to continue?"
+msgstr ""
+"Usunięcie wizyty spowoduje skasowanie wszystkich powiązanych z nią danych.\n"
+"Czy chcesz kontynuować?"
+
+#. Create menu items, connect them to their callback
+#. * and add it to the menu
+#: .././libclinica/DoctorContextMenu.vala:58
+#: .././libclinica/PatientContextMenu.vala:54
+msgid "Delete"
+msgstr "Usuń"
+
+#. Instantiate menu items
+#: .././libclinica/DoctorContextMenu.vala:59
+#: .././libclinica/PatientContextMenu.vala:51
+#: .././libclinica/EventDetail.vala:111
+msgid "Edit"
+msgstr "Edytuj"
+
+#: .././libclinica/MedicineEditor.vala:41
+msgid "Create a new Medicine"
+msgstr "Substancja czynna:"
+
+#: .././libclinica/CalendarWindow.vala:36
+msgid "Clinica calendar"
+msgstr "kalendarz programu Clinica"
+
+#. Anamnesis
+#: .././libclinica/VisitTab.vala:286 .././libclinica/VisitPrinter.vala:107
+msgid "Anamnesis"
+msgstr "Wywiad"
+
+#. Physical examination
+#: .././libclinica/VisitTab.vala:289 .././libclinica/VisitPrinter.vala:112
+msgid "Physical examination"
+msgstr "Badanie fizykalne"
+
+#. Laboratory Exam
+#: .././libclinica/VisitTab.vala:292 .././libclinica/VisitPrinter.vala:117
+msgid "Laboratory exam"
+msgstr "Badania laboratoryjne"
+
+#: .././libclinica/VisitTab.vala:295
+msgid "Hystopathology"
+msgstr "Wynik badania histopatologicznego"
+
+#. Diagnosis
+#: .././libclinica/VisitTab.vala:298 .././libclinica/VisitPrinter.vala:127
+msgid "Diagnosis"
+msgstr "Rozpoznanie"
+
+#. Topical therapy
+#: .././libclinica/VisitTab.vala:301 .././libclinica/VisitPrinter.vala:132
+msgid "Topical therapy"
+msgstr "Leczenie miejscowe"
+
+#. Systemic therapy
+#: .././libclinica/VisitTab.vala:304 .././libclinica/VisitPrinter.vala:137
+msgid "Systemic therapy"
+msgstr "Leki podawane ogólnie"
+
+#. Subsequent checks
+#: .././libclinica/VisitTab.vala:307 .././libclinica/VisitPrinter.vala:142
+msgid "Subsequent checks"
+msgstr "Zalecenia i data następnej wizyty"
+
+#: .././libclinica/MedicineTreeView.vala:37
+msgid "Medicine name"
+msgstr "Nazwa leku"
+
+#: .././libclinica/MedicineTreeView.vala:40
+#: .././libclinica/MedicineDetailDialog.vala:75
+msgid "Price"
+msgstr "Cena"
+
+#: .././libclinica/PatientListPage.vala:81 .././libclinica/StartPage.vala:211
+msgid "Add a new patient"
+msgstr "Dodaj pacjenta"
+
+#: .././libclinica/PatientListPage.vala:87
+msgid "Remove the selected patient"
+msgstr "Usuń zaznaczonego pacjenta"
+
+#: .././libclinica/PatientListPage.vala:93
+msgid "Modify the selected patient"
+msgstr "Edytuj dane pacjenta"
+
+#: .././libclinica/PatientListPage.vala:99
+msgid "Edit visits of the selected patient"
+msgstr "Otwórz kartotekę pacjenta"
+
+#: .././libclinica/PatientListPage.vala:105
+msgid "Schedule a visit with the selected patient"
+msgstr "Umów wizytę dla zaznaczonego Pacjenta"
+
+#: .././libclinica/DataServer.vala:417
+#, c-format
+msgid "Trying to removing doctor with ID = %ld failed"
+msgstr "Usunięcie lekarza o ID = %ld nie udało się"
+
+#: .././libclinica/DataServer.vala:440
+#, c-format
+msgid "Trying to removing patient with ID = %ld failed"
+msgstr "Usunięcie pacjenta o ID = %ld nie udało się"
+
+#: .././libclinica/DataServer.vala:463
+#, c-format
+msgid "Trying to removing visit with ID = %ld failed"
+msgstr "Usunięcie wizyty o ID = %ld nie udało się"
+
+#: .././libclinica/DataServer.vala:486
+#, c-format
+msgid "Trying to removing event with ID = %ld failed"
+msgstr "Usunięcie zdarzenia o ID = %ld nie udało się"
+
+#: .././libclinica/Builder.vala:45
+#, c-format
+msgid ""
+"Failed to load UI file: %s. Please check your installation.\n"
+"%s"
+msgstr ""
+"Błąd ładowania plików interfejsu: %s. Proszę sprawdzić, czy program "
+"zainstalowano poprawnie.\n"
+"%s"
+
+#: .././libclinica/LocalFileStore.vala:62
+#, c-format
+msgid "Unable to setup file monitors for the filestore folder: %s"
+msgstr "Nie udało się uruchomić monitora plików dla folderu zapisu: %s"
+
+#: .././libclinica/LocalFileStore.vala:106
+#, c-format
+msgid "Unable to setup a file monitor on directory %s"
+msgstr "Nie udało się uruchomić monitora plików dla katalogu %s"
+
+#: .././libclinica/LocalFileStore.vala:141
+#, c-format
+msgid "Error while listing the files for the visit identified by id %d"
+msgstr ""
+"Wystąpił błąd podczas wyodrębniania plików dla wizyty o numerze ID %d"
+
+#: .././libclinica/LocalFileStore.vala:167
+msgid "Destination file already exists"
+msgstr "Plik docelowy o tej nazwie już istnieje!"
+
+#: .././libclinica/LocalFileStore.vala:172
+#, c-format
+msgid "Error while adding the file %s to the selected visit"
+msgstr ""
+"Wystąpił błąd podczas dodawania pliku załącznika %s do zaznaczonej wizyty"
+
+#: .././libclinica/NetworkedDataProvider.vala:246
+msgid ""
+"You canceled the authentication process on the remote server.\n"
+"From now on Clinica will use the local database. If you want to connect to\n"
+"remote server please re-enable networking in the settings dialog."
+msgstr ""
+"Przerwano proces logowania do bazy danych na serwerze.\n"
+"Od tej pory program Clinica będzie korzystał z lokalnej bazy danych.\n"
+"W celu ponownego połączenia z serwerem należy przejść do \"Ustawień\" i aby "
+"ustawić dostęp do zdalnej bazy danych."
+
+#. Set title to edit patient * instead of create new patient
+#: .././libclinica/PatientEditor.vala:304
+#, c-format
+msgid "Edit patient named %s"
+msgstr "Edytuj dane pacjenta %s"
+
+#: .././libclinica/PatientEditor.vala:408
+msgid "You must select a doctor for this patient."
+msgstr "Musisz wybrać lekarza"
+
+#: .././libclinica/PatientEditor.vala:409
+msgid ""
+"If you need to create a new one type his name in the entry and select Create "
+"new doctor from the completion list."
+msgstr ""
+"Jeśli chcesz utworzyć nowego lekarza, to wpisz jego imię i nazwisko w polu "
+"wprowadzania danych a następnie kliknij na tekst \"Utwórz nowego lekarza...\""
+
+#: .././libclinica/PatientEditor.vala:445
+msgid "Date inserted is invalid, aborting patient editing"
+msgstr "Nieprawidłowa data. Przerwano edycję pacjenta."
+
+#: .././libclinica/AuthenticationDialog.vala:40
+msgid "Authentication required"
+msgstr "Wymagane uwierzytelnienie"
+
+#. Start of events
+#: .././libclinica/CalendarEventList.vala:73
+msgid "Events scheduled"
+msgstr "Zaplanowane zdarzenia:"
+
+#: .././libclinica/CalendarEventList.vala:92
+msgid ""
+"No events on this day.\n"
+"You can create a new event\n"
+"by clicking on the top-left button."
+msgstr ""
+"Brak zapisanych zdarzeń.\n"
+"Kliknij na przycisk \"Dodaj\" w lewym górnym rogu\n"
+"aby dodać nowe zdarzenie"
+
+#: .././libclinica/CalendarEventList.vala:103
+msgid "Visits performed"
+msgstr "Przyjęto pacjentów:"
+
+#: .././libclinica/CalendarEventList.vala:105
+msgid "Visits scheduled"
+msgstr "Zaplanowane wizyty"
+
+#: .././libclinica/CalendarEventList.vala:126
+msgid "No visits performed on this day"
+msgstr "Brak zapisanych wizyt"
+
+#: .././libclinica/ImportDialog.vala:40
+msgid "Import data from backup file"
+msgstr "Wczytaj dane z kopii zapasowej"
+
+#: .././libclinica/PatientContextMenu.vala:57
+msgid "Edit visits"
+msgstr "Idź do kartoteki"
+
+#. File menu
+#: .././libclinica/UIManager.vala:44
+msgid "_File"
+msgstr "_Plik"
+
+#: .././libclinica/UIManager.vala:45
+msgid "New _patient"
+msgstr "Dodaj pacjenta"
+
+#: .././libclinica/UIManager.vala:46
+msgid "Create a new patient"
+msgstr "Wprowadź dane pacjenta"
+
+#: .././libclinica/UIManager.vala:47
+msgid "New _doctor"
+msgstr "Dodaj lekarza"
+
+#: .././libclinica/UIManager.vala:48
+msgid "Create a new doctor"
+msgstr "Utwórz nowego lekarza"
+
+#: .././libclinica/UIManager.vala:49
+msgid "_Quit"
+msgstr "_Zakończ"
+
+#: .././libclinica/UIManager.vala:50
+msgid "Quit clinica"
+msgstr "Zamknij program Clinica"
+
+#. View menu
+#: .././libclinica/UIManager.vala:53
+msgid "_View"
+msgstr "_Widok"
+
+#: .././libclinica/UIManager.vala:54
+msgid "_Start page"
+msgstr "_Strona początkowa"
+
+#: .././libclinica/UIManager.vala:55
+msgid "Go to the start page of clinica"
+msgstr "Przejdź do strony startowej"
+
+#: .././libclinica/UIManager.vala:56
+msgid "_Patients"
+msgstr "_Baza pacjentów"
+
+#: .././libclinica/UIManager.vala:57
+msgid "Go to the list of patients"
+msgstr "Przejdź do bazy pacjentów"
+
+#: .././libclinica/UIManager.vala:58
+msgid "_Doctors"
+msgstr "_Baza lekarzy"
+
+#: .././libclinica/UIManager.vala:59
+msgid "Go to the list of doctors"
+msgstr "Przejdź do bazy lekarzy"
+
+#: .././libclinica/UIManager.vala:60
+msgid "_Search medicines"
+msgstr "_Informacje o lekach"
+
+#: .././libclinica/UIManager.vala:61
+msgid "Search medicines online"
+msgstr "Szukaj leku w internecie"
+
+#. Tools menu
+#: .././libclinica/UIManager.vala:64
+msgid "_Tools"
+msgstr "_Narzędzia"
+
+#: .././libclinica/UIManager.vala:65
+msgid "_Settings"
+msgstr "_Ustawienia"
+
+#: .././libclinica/UIManager.vala:66
+msgid "Customize clinica behaviour"
+msgstr "Dostosuj program Clinica"
+
+#: .././libclinica/UIManager.vala:67
+msgid "Backup"
+msgstr "Utwórz kopię zapasową"
+
+#: .././libclinica/UIManager.vala:68
+msgid "Backup clinica data to file"
+msgstr "Wykonaj kopię zapasową"
+
+#: .././libclinica/UIManager.vala:69
+msgid "Import"
+msgstr "Wczytaj kopię zapasową"
+
+#: .././libclinica/UIManager.vala:70
+msgid "Import data from backup files"
+msgstr "Importuj dane z pliku kopii zapasowej"
+
+#. Help menu
+#: .././libclinica/UIManager.vala:73
+msgid "_Help"
+msgstr "_Pomoc"
+
+#: .././libclinica/UIManager.vala:74
+msgid "_Contents"
+msgstr "_Pomoc programu Clinica"
+
+#: .././libclinica/UIManager.vala:75
+msgid "Open the help system"
+msgstr "Otwórz system pomocy"
+
+#: .././libclinica/UIManager.vala:76
+msgid "_Report a bug"
+msgstr "_Zgłoś błąd"
+
+#: .././libclinica/UIManager.vala:77
+msgid "Report a bug online"
+msgstr "Zgłoś błąd (online)"
+
+#: .././libclinica/UIManager.vala:78
+msgid "_About"
+msgstr "_O programie Clinica"
+
+#: .././libclinica/UIManager.vala:79
+msgid "Get to know the development team of Clinica"
+msgstr "Poznaj autorów programu Clinica oraz ich współpracowników"
+
+#: .././libclinica/BackupEngine.vala:113
+msgid "Please select a valid backup file"
+msgstr "Proszę wybrać PRAWIDŁOWY plik kopii zapasowej"
+
+#: .././libclinica/BackupEngine.vala:125
+msgid "Importing data"
+msgstr "Trwa importowanie danych"
+
+#: .././libclinica/BackupEngine.vala:126
+msgid "Please wait while Clinica imports the data..."
+msgstr "Proszę czekać. Trwa import danych..."
+
+#: .././libclinica/BackupEngine.vala:129
+msgid "Importing the JSON data.."
+msgstr "Importowanie danych JSON"
+
+#: .././libclinica/BackupEngine.vala:137
+msgid "Error while parsing the backup JSON data"
+msgstr "Wystąpił błąd podczas parsowania kopii danych JSON"
+
+#: .././libclinica/BackupEngine.vala:143 .././libclinica/BackupEngine.vala:170
+msgid "An error occurred while parsing the JSON file"
+msgstr "Wystąpił błąd podczas parsowania pliku JSON"
+
+#: .././libclinica/BackupEngine.vala:165
+msgid ""
+"The doctors, patients, visits and events field in the JSON backup should be "
+"arrays, aborting."
+msgstr ""
+"Dane pacjentów, lekarzy oraz zdarzeń zawarte w pliku kopii zapasowej JSON "
+"mają niepoprawny format. Prawidłowe dane powinny mieć formę tablic. "
+"Przerywam wczytywanie."
+
+#. Clear the database and put the data back in it
+#. in such a way that won't break relationships.
+#: .././libclinica/BackupEngine.vala:188
+msgid "Clearing the old data in the database..."
+msgstr "Porządkowanie bazy danych..."
+
+#: .././libclinica/BackupEngine.vala:192
+msgid "Loading doctors..."
+msgstr "Wczytywanie bazy lekarzy..."
+
+#: .././libclinica/BackupEngine.vala:201
+#, c-format
+msgid "- %d doctors have been imported\n"
+msgstr "- wczytano dane %d lekarzy\n"
+
+#: .././libclinica/BackupEngine.vala:203
+msgid "Loading patients..."
+msgstr "Wczytywanie bazy pacjentów..."
+
+#: .././libclinica/BackupEngine.vala:216
+#, c-format
+msgid "- %d patients have been imported\n"
+msgstr "- wczytano dane %d pacjentów\n"
+
+#: .././libclinica/BackupEngine.vala:218
+msgid "Loading visits..."
+msgstr "Wczytywanie bazy wizyt..."
+
+#: .././libclinica/BackupEngine.vala:231
+#, c-format
+msgid "- %d visits have been imported\n"
+msgstr "- wczytano dane %d wizyt\n"
+
+#: .././libclinica/BackupEngine.vala:233
+msgid "Loading events..."
+msgstr "Wczytywanie bazy zdarzeń..."
+
+#: .././libclinica/BackupEngine.vala:249
+#, c-format
+msgid "- %d events have been imported\n"
+msgstr "- wczytano dane %d zdarzeń\n"
+
+#: .././libclinica/BackupEngine.vala:258
+msgid ""
+"- A FileStore was found but is not available in the current provider\n"
+msgstr ""
+"Znaleziono folder z załącznikami, jednak obecna wersja programu nie jest w "
+"stanie go obsłużyć\n"
+
+#: .././libclinica/BackupEngine.vala:283
+#, c-format
+msgid "- %d files have been imported\n"
+msgstr "- wczytano %d plików\n"
+
+#: .././libclinica/BackupEngine.vala:287
+msgid "- No FileStore was found in the backup\n"
+msgstr "- W plikach kopii zapasowej nie znaleziono katalogu z załącznikami\n"
+
+#: .././libclinica/BackupEngine.vala:298
+msgid "The import of the data has been completed successfully"
+msgstr "Import danych zakończony powodzeniem"
+
+#: .././libclinica/PatientListStore.vala:128
+#: .././libclinica/PatientListStore.vala:150
+msgid ""
+"Patients database seems corrupted. This is likely to be a bug in the "
+"application"
+msgstr "Baza pacjentów uszkodzona. Prawdopodobnie aplikacja zawiera błędy."
+
+#. Print the error message to stdout
+#: .././libclinica/Utils.vala:79
+msgid "ERROR => "
+msgstr "ERROR => "
+
+#: .././libclinica/Utils.vala:83 .././libclinica/Utils.vala:84
+msgid "Clinica encountered an error"
+msgstr "Wystąpił błąd"
+
+#: .././libclinica/LocalMedicinesDatabase.vala:90
+#, c-format
+msgid "Medicine with id = %lld not found in DB: %s"
+msgstr "Brak leku o ID = %lld w bazie danych: %s"
+
+#: .././libclinica/LocalMedicinesDatabase.vala:119
+#, c-format
+msgid "Error inserting medicine in the database: %s"
+msgstr "Błąd podczas dodawania leku do bazy danych %s"
+
+#: .././libclinica/EventEditor.vala:93
+msgid "Create a new event"
+msgstr "Utwórz nowe zdarzenie"
+
+#: .././libclinica/EventEditor.vala:97
+#, c-format
+msgid "Editing event: %s"
+msgstr "Edycja zdarzenia: %s"
+
+#. Create the entry for title of the event and venue
+#: .././libclinica/EventEditor.vala:115
+msgid "Title"
+msgstr "Nazwa zdarzenia"
+
+#: .././libclinica/EventEditor.vala:116
+msgid "Venue"
+msgstr "Miejsce"
+
+#: .././libclinica/EventEditor.vala:151
+msgid "Time:"
+msgstr "Godzina"
+
+#: .././libclinica/EventEditor.vala:167
+msgid "Insert the description here..."
+msgstr "opis zdarzenia..."
+
+#: .././libclinica/EventEditor.vala:205 .././libclinica/VisitToolbar.vala:96
+#, c-format
+msgid "Patient"
+msgstr "Pacjent"
+
+#: .././libclinica/EventEditor.vala:264
+msgid "Visit"
+msgstr "Wizyta"
+
+#: .././libclinica/VisitListStore.vala:99
+msgid ""
+"Visit database seems corrupted. This is likely to be a bug in the application"
+msgstr "Uszkodzona baza wizyt. Prawdopodobnie program zawiera błędy."
+
+#: .././libclinica/MedicineSearchPage.vala:76
+#: .././data/resources/ui/start_page.glade.h:5
+msgid "Search medicines"
+msgstr "Znajdź lek"
+
+#: .././libclinica/MedicineSearchPage.vala:100
+msgid "No search engine available"
+msgstr "Nie wybrano wyszukiwarki"
+
+#: .././libclinica/MedicineSearchPage.vala:108
+#, c-format
+msgid "Searching for %s..."
+msgstr "Wyszukiwanie „%s”..."
+
+#: .././libclinica/MedicineSearchPage.vala:133
+msgid "Medicines"
+msgstr "Leki"
+
+#: .././libclinica/MedicineSearchPage.vala:96
+msgid "It's not possible to perform a search for medicine"
+msgstr "Wyszukanie informacji o leku jest niemozliwe"
+
+#: .././libclinica/SqliteDataProvider.vala:143
+#, c-format
+msgid "Error creating some configuration files, check permission on %s"
+msgstr ""
+"Podczas tworzenia plików konfiguracyjnych wystąpił błąd. Sprawdź uprawnienia "
+"dostępu do %s"
+
+#: .././libclinica/SqliteDataProvider.vala:151
+#, c-format
+msgid "Error reading some configuration files, check permission on %s"
+msgstr ""
+"Podczas odczytu plików konfiguracyjnych wystąpił błąd. Sprawdź uprawnienia "
+"dostępu do %s"
+
+#: .././libclinica/SqliteDataProvider.vala:170
+#, c-format
+msgid "Failure while settings new database version to %s"
+msgstr "Błąd podczas zmiany numeru wersji bazy danych na %s"
+
+#: .././libclinica/SqliteDataProvider.vala:173
+msgid "Failure while upgrading database"
+msgstr "Konwersji bazy do nowszej wersji zakończona niepowodzeniem"
+
+#: .././libclinica/SqliteDataProvider.vala:177
+msgid "Version of the database is not compatible"
+msgstr "Niekompatybilna wersja bazy!"
+
+#: .././libclinica/SqliteDataProvider.vala:199
+msgid ""
+"This is a version of Clinica newer than the one that created the\n"
+"patients database installed on the system.\n"
+"Using this version requires upgrading the database, and\n"
+"<b>the old version will not be able to use it anymore</b>.\n"
+"Do you wish to perform this one-time upgrade?\n"
+msgstr ""
+"Baza pacjentów została utworzona za pomocą poprzedniej wersji programu "
+"Clinica.\n"
+"Korzystanie z nowej wersji programu wymaga przeprowadzenia konwersji bazy.\n"
+"<b>UWAGA: starsze wersje programu nie będą mogły korzystać z nowej "
+"bazy</b>.\n"
+"Czy chcesz przeprowadzić konwersję bazy?\n"
+
+#: .././libclinica/SqliteDataProvider.vala:200
+msgid "Upgrade database"
+msgstr "Konwertuj bazę danych do nowszej wersji"
+
+#: .././libclinica/SqliteDataProvider.vala:225
+msgid "Database needs to be moved"
+msgstr "Należy przenieść bazę danych do nowej lokalizacji"
+
+#: .././libclinica/SqliteDataProvider.vala:226
+msgid ""
+"An older version of clinica has been detected and the old database has to be "
+"moved\n"
+"to a new location to continue.\n"
+"<b>The older version of clinica won't work anymore with this setup</b>.\n"
+"Do you still want to continue?"
+msgstr ""
+"Wykryto starszą wersję programu Clinica. Przed przystąpieniem do dalszej "
+"pracy\n"
+"należy przenieść starą bazę danych do nowej lokalizacji.\n"
+"<b>Poprzednia wersja programu nie będzie działać z nowymi ustawieniami</b>.\n"
+"Czy chcesz kontynuować?"
+
+#: .././libclinica/SqliteDataProvider.vala:239
+msgid ""
+"Error while transferring the database to the new default location for "
+"clinica >= 0.2.9"
+msgstr ""
+"Błąd podczas przenoszenia bazy danych do lokalizacji wymaganej przez program "
+"Clinica w wersji >= 0.2.9"
+
+#: .././libclinica/SqliteDataProvider.vala:251
+msgid "Error upgrading database, please check your installation"
+msgstr ""
+"Błąd konwersji bazy. Sprawdź czy program Clinica został poprawnie "
+"zainstalowany."
+
+#: .././libclinica/SqliteDataProvider.vala:266
+#, c-format
+msgid ""
+"Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %s"
+msgstr ""
+"Wystąpił błąd podczas konwersji bazy danych z ver. 0.1 do 0.2, sqlite exit "
+"code: %s"
+
+#: .././libclinica/SqliteDataProvider.vala:359
+#, c-format
+msgid "Error while retrieving the doctor with id = %s"
+msgstr "Wystąpił błąd podczas ładowania danych lekarza o id = %s"
+
+#: .././libclinica/SqliteDataProvider.vala:399
+#, c-format
+msgid "An error occurred while saving the doctor with id %d: %s"
+msgstr "Wystąpił błąd podczas zapisywania danych lekarza o id %d: %s"
+
+#: .././libclinica/SqliteDataProvider.vala:468
+#, c-format
+msgid "Error while retrieving the patient with id = %s"
+msgstr "Wystąpił błąd podczas ładowania danych pacjenta o id = %s"
+
+#: .././libclinica/SqliteDataProvider.vala:517
+#: .././libclinica/SqliteDataProvider.vala:652
+#, c-format
+msgid "An error occurred while saving the doctor with id %s: %s"
+msgstr "Wystąpił błąd podczas zapisywania danych lekarza o id %s: %s"
+
+#: .././libclinica/SqliteDataProvider.vala:597
+#, c-format
+msgid "Error while retrieving the visit with id = %s"
+msgstr "Wystąpił błąd podczas ładowania danych wizyty o id = %s"
+
+#: .././libclinica/SqliteDataProvider.vala:686
+#, c-format
+msgid "Error while retrieving the event with id = %d"
+msgstr "Wystąpił błąd podczas ładowania danych zdarzenia o id = %d"
+
+#: .././libclinica/SqliteDataProvider.vala:728
+#, c-format
+msgid "An error occurred while saving the event with id %s: %s"
+msgstr "Wystąpił błąd podczas zapisywania danych zdarzenia o id %s: %s"
+
+#: .././libclinica/SettingsManager.vala:40
+msgid "Clinica settings"
+msgstr "Ustawienia programu Clinica"
+
+#: .././libclinica/SettingsManager.vala:52
+msgid "Clinica has been built without plugins support"
+msgstr ""
+"Program Clinica został skompilowany bez mozliwości korzystnia z wtyczek"
+
+#: .././libclinica/SettingsManager.vala:135
+msgid "Please use the Network tab to enable the Networked data provider"
+msgstr ""
+"Przejdź do zakładki \"Sieć\" aby ustawić dostęp do zdalnej bazy danych"
+
+#: .././libclinica/SettingsManager.vala:136
+msgid "Use the Network tab"
+msgstr "Użyj zakładki \"Sieć\""
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Disconnect"
+msgstr "Rozłącz"
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Connect"
+msgstr "Połącz"
+
+#: .././libclinica/SettingsManager.vala:191
+#, c-format
+msgid "Connection to the given host failed. Please check your settings."
+msgstr "Nie udało się połączyć z serwerem. Sprawdź ustawienia."
+
+#: .././libclinica/SettingsManager.vala:192
+msgid "Connection failed"
+msgstr "Błąd połączenia."
+
+#: .././libclinica/SettingsManager.vala:206
+#: .././libclinica/ResourceManager.vala:284
+#, c-format
+msgid "Username or password are wrong. Disconnecting from the server."
+msgstr ""
+"Nieprawidłowe hasło lub nazwa użytkownika. Przerywam połączenie z serwerem."
+
+#: .././libclinica/SettingsManager.vala:207
+msgid "Wrong authentication data has been provided"
+msgstr "Podano nieprawidłowe hassło lub nazwę uzytkownika"
+
+#: .././libclinica/VisitActions.vala:60
+msgid "Edit details of patient"
+msgstr "Edytuj dane pacjenta"
+
+#: .././libclinica/VisitActions.vala:67
+msgid "Remove this visit"
+msgstr "Usuń wizytę"
+
+#: .././libclinica/VisitActions.vala:74
+msgid "Export this visit as PDF"
+msgstr "Eksportuj dane wizyty do formatu PDF"
+
+#: .././libclinica/VisitActions.vala:81
+msgid "Print a report of this visit"
+msgstr "Wydrukuj kartę wizyty"
+
+#: .././libclinica/VisitActions.vala:88
+msgid "Save this visit"
+msgstr "Zapisz aktywną wizytę"
+
+#: .././libclinica/VisitActions.vala:99
+msgid "Close the visits of this patient"
+msgstr "Zamknij kartotekę"
+
+#: .././libclinica/VisitToolbar.vala:93
+msgid "This patient has not a doctor"
+msgstr "Pacjentowi nie przypisano lekarza"
+
+#: .././libclinica/VisitToolbar.vala:97
+msgid "Doctor"
+msgstr "Lekarz"
+
+#: .././libclinica/DateTimePicker.vala:56
+msgid "Hour"
+msgstr "Godzina"
+
+#: .././libclinica/DateTimePicker.vala:58
+msgid "Minute"
+msgstr "Minuty"
+
+#: .././libclinica/DoctorListStore.vala:75
+msgid "Doctors database seems corrupted."
+msgstr "Baza lekarzy prawdopodobnie została uszkodzona."
+
+#: .././libclinica/DoctorListView.vala:175
+msgid "Select a doctor to delete it!"
+msgstr "Nie wybrano żadnego lekarza!"
+
+#: .././libclinica/DoctorListView.vala:186
+msgid ""
+"The doctor that you have selected for removal has some patients associated. "
+"\n"
+msgstr "Do lekarza, którego chcesz usunąć są przypisani pacjenci. \n"
+
+#: .././libclinica/DoctorListView.vala:187
+msgid ""
+"It's not possible to remove it without disassociating all his patients.\n"
+"\n"
+msgstr ""
+"Skasowanie go (jej) spowoduje, że pacjent nie będzie przypisany do żadnego "
+"lekarza.\n"
+"\n"
+
+#: .././libclinica/DoctorListView.vala:188
+#: .././libclinica/DoctorListView.vala:217
+msgid "Do you really want to proceed?"
+msgstr "Czy chcesz kontynuować?"
+
+#: .././libclinica/DoctorListView.vala:189
+msgid "Doctor has associated patients"
+msgstr "Ten lekarz ma przypisanych pacjentów."
+
+#: .././libclinica/DoctorListView.vala:215
+msgid ""
+"The following patients will be disassociated from this doctor by this "
+"action:\n"
+msgstr ""
+"Brak przydzielonego lekarza będzie dotyczył następujących pacjentów:\n"
+
+#: .././libclinica/DoctorListView.vala:218
+msgid "Confirm disassociation of patients"
+msgstr "Potwierdź usunięcie lekarza"
+
+#: .././libclinica/DoctorListView.vala:235
+msgid ""
+"Really delete this doctor? All information about him/her will be lost."
+msgstr ""
+"Czy chcesz usunąć lekarza? Wszystkie powiązane z nim/nią dane zostaną "
+"utracone."
+
+#. Ask the user where he would like to backup its files.
+#: .././libclinica/UserInterface.vala:360
+msgid "Select the folder where the data should be saved"
+msgstr "Określ położenie plików kopii zapasowej"
+
+#. In this string %s refers to the path where the backup has been performed.
+#: .././libclinica/UserInterface.vala:386
+#, c-format
+msgid "Backup completed successfully in the folder %s"
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:387
+msgid "Backup completed"
+msgstr "Zakończono tworzenie kopii zapasowej"
+
+#: .././libclinica/UserInterface.vala:389
+msgid ""
+"Please take care of copying the folder in a safe place for future restore of "
+"the data."
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:416
+#, c-format
+msgid "Cannot open the help: %s"
+msgstr "Nie można otworzyć pliku Pomocy: %s"
+
+#: .././libclinica/UserInterface.vala:441
+msgid ""
+"An error occurred while opening the bug system. Please go to\n"
+"http://launchpad.net/clinica-project/ to file a bug"
+msgstr ""
+"Wystąpił błąd podczas otwierania modułu zgłaszania błędów. Należy połączyć "
+"się ze stroną\n"
+"http://launchpad.net/clinica-project/ i wypełnić formularz zgłoszenia."
+
+#: .././libclinica/EventDetail.vala:65
+msgid "Edit event"
+msgstr "Edytuj zdarzenie"
+
+#: .././libclinica/EventDetail.vala:112
+msgid "Remove"
+msgstr "Usuń"
+
+#: .././libclinica/EventDetail.vala:145
+msgid "Really delete this event?"
+msgstr "Czy chcesz skasować to zdarzenie?"
+
+#: .././libclinica/Sidebar.vala:68
+msgid "Pages"
+msgstr "Strony"
+
+#: .././libclinica/StartPage.vala:93
+msgid "Dashboard"
+msgstr "Strona startowa"
+
+#: .././libclinica/StartPage.vala:205
+msgid ""
+"Add a new patient \n"
+" with name "
+msgstr ""
+"Dodaj pacjenta \n"
+" o nazwisku "
+
+#: .././libclinica/EventListStore.vala:121
+msgid ""
+"Events database seems corrupted. This is likely to be a bug in the "
+"application"
+msgstr "Uszkodzona baza zdarzeń. Prawdopodobnie w programie wystąpiły błędy."
+
+#: .././libclinica/DoctorListPage.vala:60
+#: .././libclinica/DoctorListPage.vala:93
+msgid "Doctors"
+msgstr "Baza lekarzy"
+
+#: .././libclinica/DoctorListPage.vala:76
+msgid "Add a doctor"
+msgstr "Dodaj lekarza"
+
+#: .././libclinica/DoctorListPage.vala:82
+msgid "Edit the selected doctor"
+msgstr "Edytuj dane lekarza"
+
+#: .././libclinica/DoctorListPage.vala:88
+msgid "Remove the selected doctor"
+msgstr "Usuń zaznaczonego lekarza"
+
+#: .././libclinica/ResourceManager.vala:285
+msgid "Error while authenticating on the server"
+msgstr "Wystąpił błąd podczas logowania na serwerze"
+
+#: .././libclinica/AboutDialog.vala:41
+msgid "Medical records manager"
+msgstr "Program do prowadzenia kartotek pacjentów"
+
+#: .././libclinica/AboutDialog.vala:43
+msgid "About Clinica"
+msgstr "o programie Clinica"
+
+#: .././libclinica/AboutDialog.vala:52
+msgid "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+msgstr "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+
+#: .././libclinica/AboutDialog.vala:53
+msgid "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+msgstr "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+
+#. Histopathology
+#: .././libclinica/VisitPrinter.vala:122
+msgid "Histopathology"
+msgstr "Wyniki badania histopatologicznego"
+
+#. Now write the date of the visit after that
+#: .././libclinica/VisitPrinter.vala:285
+#, c-format
+msgid "Report of the visit of %s"
+msgstr "Karta wizyty z dnia %s"
+
+#: .././libclinica/VisitPrinter.vala:316
+#: .././libclinica/MedicineDetailDialog.vala:109
+msgid "Field empty"
+msgstr "puste pole"
+
+#. Add a Attach button
+#: .././libclinica/VisitFileManager.vala:89
+msgid "Attach file"
+msgstr "Dołącz plik"
+
+#: .././libclinica/VisitFileManager.vala:97
+msgid "Browse files"
+msgstr "Przeglądaj  zapisane pliki"
+
+#: .././libclinica/VisitFileManager.vala:113
+msgid "Select a file to attach"
+msgstr "Zaznacz plik załącznika"
+
+#: .././libclinica/VisitFileManager.vala:133
+msgid "Unable to open the browser on the filestore position"
+msgstr "Nie udało się otworzyć folderu zapisu."
+
+#: .././libclinica/VisitFileManager.vala:163
+msgid ""
+"Save the visit\n"
+" to attach files"
+msgstr ""
+"Zapisz wizytę\n"
+" aby dodać załączniki"
+
+#: .././libclinica/VisitFileManager.vala:170
+msgid "Attach files"
+msgstr "Dołącz pliki"
+
+#: .././libclinica/SidebarCalendarEntry.vala:30
+msgid "Calendar"
+msgstr "Kalendarz"
+
+#. Create the object and add the close button used
+#. * to dismiss the dialog
+#: .././libclinica/MedicineDetailDialog.vala:46
+msgid "Close"
+msgstr "Zamknij"
+
+#: .././libclinica/MedicineDetailDialog.vala:65
+msgid "General information"
+msgstr "Informacje ogólne"
+
+#. And now the content for the others fields of the medicine
+#: .././libclinica/MedicineDetailDialog.vala:71
+msgid "Identification Code"
+msgstr "Kod ATC"
+
+#: .././libclinica/MedicineDetailDialog.vala:72
+msgid "Description"
+msgstr "Opis"
+
+#: .././libclinica/MedicineDetailDialog.vala:73
+msgid "Active ingredient"
+msgstr "Substancja czynna"
+
+#: .././libclinica/MedicineDetailDialog.vala:74
+msgid "Storage reccomendations"
+msgstr "Zalecenia dotyczące przechowywania"
+
+#: .././libclinica/MedicineDetailDialog.vala:83
+msgid "Additional notes"
+msgstr "Dodatkowe informacje"
+
+#. Nothing to do for now.
+#: .././libclinica/FileDetail.vala:89
+#, c-format
+msgid "Error while loading icon for file %s: %s"
+msgstr "Błąd wczytywania ikony dla pliku %s: %s"
+
+#: .././libclinica/FileDetail.vala:98
+msgid "Open file"
+msgstr "Otwórz plik"
+
+#: .././libclinica/FileDetail.vala:110
+msgid "Delete file"
+msgstr "Usuń plik"
+
+#: .././libclinica/FileDetail.vala:122
+#, c-format
+msgid ""
+"Do you really want to delete the file %s?\n"
+"If you proceed it will be definitively lost."
+msgstr ""
+"Czy chcesz skasować plik %s?\n"
+"Wszystkie dane zostaną bezpowrotnie utracone."
+
+#: .././libclinica/FileDetail.vala:135
+#, c-format
+msgid "Error while opening the file %s"
+msgstr "Błąd otwierania pliku %s"
+
+#: .././data/resources/ui/start_page.glade.h:1
+msgid "Browse the patients to start a visit"
+msgstr "Znajdź pacjenta i rozpocznij nową wizytę"
+
+#: .././data/resources/ui/start_page.glade.h:2
+msgid "Add new patient"
+msgstr "Dodaj pacjenta"
+
+#: .././data/resources/ui/start_page.glade.h:3
+msgid "Patient list"
+msgstr "Baza pacjentów"
+
+#: .././data/resources/ui/start_page.glade.h:4
+msgid "Doctor list"
+msgstr "Baza lekarzy"
+
+#: .././data/resources/ui/start_page.glade.h:6
+msgid "Open calendar"
+msgstr "Otwórz kalendarz"
+
+#: .././data/resources/ui/authentication_dialog.glade.h:1
+msgid "The server requires authentication. Please insert your credentials:"
+msgstr "Serwer wymaga uwierzytelnienia. Proszę podać dane do logowania"
+
+#: .././data/resources/ui/authentication_dialog.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:11
+msgid "Username"
+msgstr "Użytkownik"
+
+#: .././data/resources/ui/authentication_dialog.glade.h:3
+#: .././data/resources/ui/settings_window.glade.h:12
+msgid "Password"
+msgstr "Hasło"
+
+#: .././data/resources/ui/medicine_editor.glade.h:1
+msgid "Name:"
+msgstr "Nazwa leku:"
+
+#: .././data/resources/ui/medicine_editor.glade.h:2
+msgid "Description:"
+msgstr "Opis:"
+
+#: .././data/resources/ui/medicine_editor.glade.h:3
+msgid "Active ingredient:"
+msgstr "Su"
+
+#: .././data/resources/ui/medicine_editor.glade.h:4
+msgid "Storage reccomendations:"
+msgstr "Zalecenia co do przechowywania"
+
+#: .././data/resources/ui/medicine_editor.glade.h:5
+msgid "Price:"
+msgstr "Cena:"
+
+#: .././data/resources/ui/medicine_editor.glade.h:6
+msgid "Other notes:"
+msgstr "Uwagi:"
+
+#: .././data/resources/ui/import_dialog.glade.h:1
+msgid "Source:\t"
+msgstr "Lokalizacja kopii:\t"
+
+#: .././data/resources/ui/import_dialog.glade.h:2
+msgid "Select the backup folder"
+msgstr "Wybierz katalog z danymi kopii zapasowej"
+
+#: .././data/resources/ui/import_dialog.glade.h:3
+msgid ""
+"<b>Warning:</b> Please note that the current data in the database <b>will be "
+"definitely lost</b>. Consider performing a backup of the current data before "
+"importing the old one."
+msgstr ""
+
+#: .././data/resources/ui/doctor_editor.glade.h:1
+#: .././data/resources/ui/patient_editor.glade.h:12
+msgid "Doctor:"
+msgstr "Lekarz:"
+
+#: .././data/resources/ui/doctor_editor.glade.h:4
+#: .././data/resources/ui/patient_editor.glade.h:11
+msgid "Phone:"
+msgstr "Telefon:"
+
+#: .././data/resources/ui/doctor_editor.glade.h:5
+msgid "Mobile:"
+msgstr "Tel. komórkowy:"
+
+#: .././data/resources/ui/wait_dialog.glade.h:1
+msgid "label"
+msgstr "Etykieta"
+
+#: .././data/resources/ui/settings_window.glade.h:1
+msgid "Use plugins (restart required)"
+msgstr "Włącz wtyczki (konieczny restart programu)"
+
+#: .././data/resources/ui/settings_window.glade.h:2
+msgid "Allow to browse files in visits"
+msgstr "Pozwól przeglądać pliki dołączone do wizyt"
+
+#: .././data/resources/ui/settings_window.glade.h:3
+msgid "Medicines search engine"
+msgstr "Wyszukiwarka leków"
+
+#: .././data/resources/ui/settings_window.glade.h:4
+msgid "Data source"
+msgstr "Źródło danych"
+
+#: .././data/resources/ui/settings_window.glade.h:5
+msgid "General"
+msgstr "Ogólne"
+
+#: .././data/resources/ui/settings_window.glade.h:6
+msgid "Host"
+msgstr "Serwer"
+
+#: .././data/resources/ui/settings_window.glade.h:7
+msgid "Port"
+msgstr "Port"
+
+#: .././data/resources/ui/settings_window.glade.h:8
+msgid "button"
+msgstr "przycisk"
+
+#: .././data/resources/ui/settings_window.glade.h:9
+msgid "Connection to a remote Clinica instance"
+msgstr "Połączenie z bazą programu Clinica na zdalnym komputerze"
+
+#: .././data/resources/ui/settings_window.glade.h:10
+msgid "Allow connections of other clinica from the LAN"
+msgstr "Udostepnij bazę danych innym komputerom w sieci lokalnej"
+
+#: .././data/resources/ui/settings_window.glade.h:13
+msgid "Built-in server"
+msgstr "Wbudowany serwer danych (udostępnianie bazy)"
+
+#: .././data/resources/ui/settings_window.glade.h:14
+msgid "Network"
+msgstr "Sieć"
+
+#: .././data/resources/ui/settings_window.glade.h:15
+msgid ""
+"The details that are inserted here will be used when generating\n"
+"the automatic visit reports. "
+msgstr ""
+"Podane niżej informacje zostaną wykorzystane do tworzenia\n"
+"nagłówków na kartach wizyt. "
+
+#: .././data/resources/ui/settings_window.glade.h:18
+msgid "Address"
+msgstr "Adres"
+
+#: .././data/resources/ui/settings_window.glade.h:19
+msgid "Institution"
+msgstr "Instytucja"
+
+#: .././data/resources/ui/settings_window.glade.h:20
+msgid "Email"
+msgstr "e-mail:"
+
+#: .././data/resources/ui/settings_window.glade.h:21
+msgid "Personal details"
+msgstr "Informacje osobiste"
+
+#: .././data/resources/ui/settings_window.glade.h:22
+msgid "Plugins"
+msgstr "Wtyczki"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:1
+msgid "Visits"
+msgstr "Wizyty"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:2
+msgid "Schedule a visit"
+msgstr "Zaplanuj wizytę"
+
+#: .././data/resources/ui/patient_editor.glade.h:1
+msgid "Patient:"
+msgstr "Pacjent:"
+
+#: .././data/resources/ui/patient_editor.glade.h:4
+msgid "Gender:"
+msgstr "Płeć:"
+
+#: .././data/resources/ui/patient_editor.glade.h:5
+msgid "Date of birth:"
+msgstr "Data urodzenia"
+
+#: .././data/resources/ui/patient_editor.glade.h:6
+msgid "dd"
+msgstr "dd"
+
+#: .././data/resources/ui/patient_editor.glade.h:7
+msgid "/"
+msgstr "/"
+
+#: .././data/resources/ui/patient_editor.glade.h:8
+msgid "mm"
+msgstr "mm"
+
+#: .././data/resources/ui/patient_editor.glade.h:9
+msgid "yyyy"
+msgstr "rrrr"
+
+#: .././data/resources/ui/patient_editor.glade.h:10
+msgid "Address:"
+msgstr "Adres:"
+
+#: .././data/resources/ui/patient_editor.glade.h:13
+msgid "Codice fiscale:"
+msgstr "PESEL:"
+
+#: .././data/resources/ui/patient_editor.glade.h:14
+msgid "Male"
+msgstr "Mężczyzna"
+
+#: .././data/resources/ui/patient_editor.glade.h:15
+msgid "Female"
+msgstr "Kobieta"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:1
+msgid "Select the date on which you'd like to schedule the visit."
+msgstr "Wybierz datę planowanej wizyty."
+
+#: .././data/resources/ui/visit_scheduler.glade.h:2
+msgid "Selected patient"
+msgstr "Wybierz pacjenta"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:3
+msgid ""
+"<b>Tip:</b> Once created this visit will be visible in the visit editor of "
+"this patient."
+msgstr ""
+"<b>Wskazówka:</b> Dodanie wizyty spowoduje, że pojawi się ona w module "
+"edycji wizyt dla danego pacjenta."
+
+#, c-format
+#~ msgid "Visits of the patient %s"
+#~ msgstr "Kartoteka pacjenta %s"
+
+#, c-format
+#~ msgid ""
+#~ "Patient: <b>%s</b>\n"
+#~ "Doctor: <b>%s</b>"
+#~ msgstr ""
+#~ "Pacjent: <b>%s</b>\n"
+#~ "Lekarz: <b>%s</b>"
+
+#~ msgid "Error loading patient_editor.glade."
+#~ msgstr "Błąd ładowania patient_editor.glade."
+
+#~ msgid "Edit patient details"
+#~ msgstr "Edytuj dane pacjenta"
+
+#~ msgid "Save as PDF"
+#~ msgstr "Zapisz w formacie PDF"
+
+#~ msgid "Confirm deletion of patients"
+#~ msgstr "Potwierdź usunięcie danych"
+
+#~ msgid ""
+#~ "You cannot delete a doctor with associated patients. Delete his patients "
+#~ "first."
+#~ msgstr ""
+#~ "Nie możesz usunąć lekarza dopóki są do niego przypisani pacjenci. Skasuj "
+#~ "najpierw dane pacjentów."
+
+#~ msgid ""
+#~ "Select the search engine\n"
+#~ "used to find medicines"
+#~ msgstr "Wybierz bazę leków"
+
+#~ msgid "Back"
+#~ msgstr "Wstecz"
+
+#, c-format
+#~ msgid ""
+#~ "Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %d"
+#~ msgstr ""
+#~ "Konwersja bazy z wersji 0.1 do 0.2 zakończona niepowodzeniem (sqlite exit "
+#~ "code: %d)"
+
+#~ msgid "Stop"
+#~ msgstr "Zatrzymaj"
+
+#~ msgid "Clinica"
+#~ msgstr "Clinica"
+
+#~ msgid "Medicine search"
+#~ msgstr "Wyszukiwarka leków"
+
+#~ msgid "New Doctor"
+#~ msgstr "Dodaj lekarza"
+
+#~ msgid "New Patient"
+#~ msgstr "Dodaj pacjenta"
+
+#~ msgid "Use plugins (need restart)"
+#~ msgstr "Włącz wtyczki (konieczny restart programu)"
+
+#~ msgid ""
+#~ "It's not possible to remove it without removing all his patients.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Usunięcie lekarza spowoduje skasowanie wszystkich przypisanych do niego "
+#~ "pacjentów!\n"
+#~ "\n"
+
+#~ msgid "_Home"
+#~ msgstr "_Strona startowa"
+
+#~ msgid ""
+#~ "\n"
+#~ "Launchpad contributions: \n"
+#~ msgstr ""
+#~ "\n"
+#~ "Wsparcie via Launchpad: \n"
+
+#~ msgid "The following patients will be deleted by this action:\n"
+#~ msgstr "Usunięte zostaną dane następujących pacjentów:\n"
diff --git a/po/pt_BR.po b/po/pt_BR.po
new file mode 100644
index 0000000..205a183
--- /dev/null
+++ b/po/pt_BR.po
@@ -0,0 +1,1464 @@
+# Brazilian Portuguese translation for clinica-project
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the clinica-project package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: clinica-project\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-04-18 10:23+0200\n"
+"PO-Revision-Date: 2012-07-13 12:19+0000\n"
+"Last-Translator: Hriostat <Unknown>\n"
+"Language-Team: Brazilian Portuguese <pt_BR at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2013-05-18 05:45+0000\n"
+"X-Generator: Launchpad (build 16626)\n"
+"Language: pt_BR\n"
+
+#: .././plugins/AgenziaDelFarmaco.py:166
+msgid "Dosage form"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:167
+msgid "System of supply"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:168
+msgid "Class of eligibility"
+msgstr ""
+
+#: .././plugins/AgenziaDelFarmaco.py:169
+msgid "Firm"
+msgstr ""
+
+#. Title of edit doctor dialog
+#: .././libclinica/DoctorEditor.vala:88
+#, c-format
+msgid "Edit doctor named %s"
+msgstr "Editar médico %s"
+
+#: .././libclinica/PatientLens.vala:37
+msgid "Search for patients"
+msgstr "Procurar por pacientes"
+
+#: .././libclinica/PatientLens.vala:43
+msgid "Recently visited patients"
+msgstr "Pacientes visitados recentemente"
+
+#. Create the SidebarEntry
+#: .././libclinica/PatientLens.vala:47 .././libclinica/PatientListPage.vala:64
+#: .././libclinica/PatientListPage.vala:110
+msgid "Patients"
+msgstr "Pacientes"
+
+#: .././libclinica/PatientListView.vala:76
+#: .././libclinica/DoctorListView.vala:51
+#: .././data/resources/ui/doctor_editor.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:17
+#: .././data/resources/ui/patient_editor.glade.h:2
+msgid "Name"
+msgstr "Nome"
+
+#. ...and then the surname column
+#: .././libclinica/PatientListView.vala:80
+#: .././libclinica/DoctorListView.vala:56
+#: .././data/resources/ui/doctor_editor.glade.h:3
+#: .././data/resources/ui/patient_editor.glade.h:3
+msgid "Surname"
+msgstr "Sobrenome"
+
+#: .././libclinica/PatientListView.vala:165
+msgid "Select a patient to delete it!"
+msgstr "Selecione um paciente a ser excluído!"
+
+#: .././libclinica/PatientListView.vala:172
+msgid ""
+"Really delete this patient? All information about him/her and the associated "
+"visits will be lost."
+msgstr ""
+"Deseja realmente excluir este paciente? Todas as informações sobre ele e as "
+"visitas associadas serão perdidas."
+
+#. Set title according to the patient that we have loaded and connect
+#. * show startup signal to the focusing of the first field in the visit
+#: .././libclinica/VisitPage.vala:63
+#, c-format
+msgid "Visit of the patient %s"
+msgstr "Visitar o paciente %s"
+
+#: .././libclinica/PluginManager.vala:35
+msgid ""
+"Clinica is extensible via plugins and you can easily enable\n"
+" and disable them using this window."
+msgstr ""
+"O Clinica é extensível através de plugins e você pode facilmente ativá-los\n"
+" e desativá-los usando esta janela."
+
+#: .././libclinica/VisitSchedulerDialog.vala:60
+#: .././libclinica/VisitSchedulerDialog.vala:76
+msgid "Patient not selected"
+msgstr "Paciente não selecionado"
+
+#: .././libclinica/VisitSchedulerDialog.vala:72
+#, c-format
+msgid "Schedule a vist for the patient %s"
+msgstr "Agendar uma visita para o paciente %s"
+
+#: .././libclinica/Application.vala:113
+#, c-format
+msgid "Option parsing failed: %s\n"
+msgstr "Opção de análise falhou: %s\n"
+
+#: .././libclinica/Application.vala:148
+#, c-format
+msgid "Clinica %s\n"
+msgstr "Clinica %s\n"
+
+#. Then add add a new visit and keep a reference to new_page
+#. *  to focus it on page loading.
+#. Create a new one and connect it
+#: .././libclinica/VisitBrowser.vala:73 .././libclinica/VisitBrowser.vala:252
+msgid "New visit"
+msgstr "Nova visita"
+
+#: .././libclinica/VisitBrowser.vala:152 .././libclinica/VisitBrowser.vala:209
+msgid ""
+"A visit need to be saved in order to be exported as PDF.\n"
+"Do you want to save the visit now?"
+msgstr ""
+"A visita precisa ser salva para que possa ser exportada como PDF.\n"
+"Deseja salvar a visita agora?"
+
+#: .././libclinica/VisitBrowser.vala:196
+msgid "Error while delivering the print operation"
+msgstr ""
+
+#: .././libclinica/VisitDetail.vala:70
+msgid "Edit visit"
+msgstr "Editar visita"
+
+#: .././libclinica/VisitDetail.vala:80 .././libclinica/EventDetail.vala:75
+msgid "Delete event"
+msgstr "Remover evento"
+
+#: .././libclinica/VisitDetail.vala:104
+msgid "Show details"
+msgstr "Exibir detalhes"
+
+#: .././libclinica/VisitDetail.vala:125 .././libclinica/VisitTab.vala:269
+msgid ""
+"Deleting a visit will cause all its data to be lost.\n"
+"Do you really want to continue?"
+msgstr ""
+"Apagar uma visita fará com que todos os seus dados sejam perdidos.\n"
+"Você realmente deseja continuar?"
+
+#. Create menu items, connect them to their callback
+#. * and add it to the menu
+#: .././libclinica/DoctorContextMenu.vala:58
+#: .././libclinica/PatientContextMenu.vala:54
+msgid "Delete"
+msgstr "Excluir"
+
+#. Instantiate menu items
+#: .././libclinica/DoctorContextMenu.vala:59
+#: .././libclinica/PatientContextMenu.vala:51
+#: .././libclinica/EventDetail.vala:111
+msgid "Edit"
+msgstr "Editar"
+
+#: .././libclinica/MedicineEditor.vala:41
+msgid "Create a new Medicine"
+msgstr ""
+
+#: .././libclinica/CalendarWindow.vala:36
+msgid "Clinica calendar"
+msgstr "Calendário do Clínica"
+
+#. Anamnesis
+#: .././libclinica/VisitTab.vala:286 .././libclinica/VisitPrinter.vala:107
+msgid "Anamnesis"
+msgstr "Anamnese"
+
+#. Physical examination
+#: .././libclinica/VisitTab.vala:289 .././libclinica/VisitPrinter.vala:112
+msgid "Physical examination"
+msgstr "Exame físico"
+
+#. Laboratory Exam
+#: .././libclinica/VisitTab.vala:292 .././libclinica/VisitPrinter.vala:117
+msgid "Laboratory exam"
+msgstr "Exame laboratorial"
+
+#: .././libclinica/VisitTab.vala:295
+msgid "Hystopathology"
+msgstr "Histopatologia"
+
+#. Diagnosis
+#: .././libclinica/VisitTab.vala:298 .././libclinica/VisitPrinter.vala:127
+msgid "Diagnosis"
+msgstr "Diagnóstico"
+
+#. Topical therapy
+#: .././libclinica/VisitTab.vala:301 .././libclinica/VisitPrinter.vala:132
+msgid "Topical therapy"
+msgstr "Terapia tópica"
+
+#. Systemic therapy
+#: .././libclinica/VisitTab.vala:304 .././libclinica/VisitPrinter.vala:137
+msgid "Systemic therapy"
+msgstr "Terapia sistêmica"
+
+#. Subsequent checks
+#: .././libclinica/VisitTab.vala:307 .././libclinica/VisitPrinter.vala:142
+msgid "Subsequent checks"
+msgstr "Verificações subsequentes"
+
+#: .././libclinica/MedicineTreeView.vala:37
+msgid "Medicine name"
+msgstr ""
+
+#: .././libclinica/MedicineTreeView.vala:40
+#: .././libclinica/MedicineDetailDialog.vala:75
+msgid "Price"
+msgstr "Preço"
+
+#: .././libclinica/PatientListPage.vala:81 .././libclinica/StartPage.vala:211
+msgid "Add a new patient"
+msgstr "Adicionar um novo paciente"
+
+#: .././libclinica/PatientListPage.vala:87
+msgid "Remove the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:93
+msgid "Modify the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:99
+msgid "Edit visits of the selected patient"
+msgstr ""
+
+#: .././libclinica/PatientListPage.vala:105
+msgid "Schedule a visit with the selected patient"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:417
+#, c-format
+msgid "Trying to removing doctor with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:440
+#, c-format
+msgid "Trying to removing patient with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:463
+#, c-format
+msgid "Trying to removing visit with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/DataServer.vala:486
+#, c-format
+msgid "Trying to removing event with ID = %ld failed"
+msgstr ""
+
+#: .././libclinica/Builder.vala:45
+#, c-format
+msgid ""
+"Failed to load UI file: %s. Please check your installation.\n"
+"%s"
+msgstr ""
+"Falha ao carregar o arquivo de interface do usuário: %s. Por favor, "
+"verifique a sua instalação\n"
+"%s"
+
+#: .././libclinica/LocalFileStore.vala:62
+#, c-format
+msgid "Unable to setup file monitors for the filestore folder: %s"
+msgstr ""
+"Não é possível configurar os monitores de arquivo para a pasta filestore: %s"
+
+#: .././libclinica/LocalFileStore.vala:106
+#, c-format
+msgid "Unable to setup a file monitor on directory %s"
+msgstr "Não é possível configurar um monitor de arquivo no diretório %s"
+
+#: .././libclinica/LocalFileStore.vala:141
+#, c-format
+msgid "Error while listing the files for the visit identified by id %d"
+msgstr "Erro ao listar os arquivos para a visita identificada pela id %d"
+
+#: .././libclinica/LocalFileStore.vala:167
+msgid "Destination file already exists"
+msgstr "Arquivo de destino já existe"
+
+#: .././libclinica/LocalFileStore.vala:172
+#, c-format
+msgid "Error while adding the file %s to the selected visit"
+msgstr "Erro ao adicionar o arquivo %s para a visita selecionada"
+
+#: .././libclinica/NetworkedDataProvider.vala:246
+msgid ""
+"You canceled the authentication process on the remote server.\n"
+"From now on Clinica will use the local database. If you want to connect to\n"
+"remote server please re-enable networking in the settings dialog."
+msgstr ""
+
+#. Set title to edit patient * instead of create new patient
+#: .././libclinica/PatientEditor.vala:304
+#, c-format
+msgid "Edit patient named %s"
+msgstr "Editar paciente %s"
+
+#: .././libclinica/PatientEditor.vala:408
+msgid "You must select a doctor for this patient."
+msgstr "É preciso selecionar um médico para este paciente."
+
+#: .././libclinica/PatientEditor.vala:409
+msgid ""
+"If you need to create a new one type his name in the entry and select Create "
+"new doctor from the completion list."
+msgstr ""
+"Se você precisa criar um tipo novo digite o seu nome na entrada e selecione "
+"Criar novo médico a partir da lista de sugestões."
+
+#: .././libclinica/PatientEditor.vala:445
+msgid "Date inserted is invalid, aborting patient editing"
+msgstr "A data inserida é inválida, abortando a edição de paciente"
+
+#: .././libclinica/AuthenticationDialog.vala:40
+msgid "Authentication required"
+msgstr ""
+
+#. Start of events
+#: .././libclinica/CalendarEventList.vala:73
+msgid "Events scheduled"
+msgstr "Eventos agendados"
+
+#: .././libclinica/CalendarEventList.vala:92
+msgid ""
+"No events on this day.\n"
+"You can create a new event\n"
+"by clicking on the top-left button."
+msgstr ""
+"Sem eventos para hoje.\n"
+"Você pode criar um novo evento\n"
+"clicando no botão superior esquerdo."
+
+#: .././libclinica/CalendarEventList.vala:103
+msgid "Visits performed"
+msgstr "Visitas realizadas"
+
+#: .././libclinica/CalendarEventList.vala:105
+msgid "Visits scheduled"
+msgstr "Visitas agendadas"
+
+#: .././libclinica/CalendarEventList.vala:126
+msgid "No visits performed on this day"
+msgstr "Sem visitas realizadas hoje"
+
+#: .././libclinica/ImportDialog.vala:40
+msgid "Import data from backup file"
+msgstr ""
+
+#: .././libclinica/PatientContextMenu.vala:57
+msgid "Edit visits"
+msgstr "Editar visitas"
+
+#. File menu
+#: .././libclinica/UIManager.vala:44
+msgid "_File"
+msgstr "Arquivo"
+
+#: .././libclinica/UIManager.vala:45
+msgid "New _patient"
+msgstr "Novo _paciente"
+
+#: .././libclinica/UIManager.vala:46
+msgid "Create a new patient"
+msgstr "Criar um novo paciente"
+
+#: .././libclinica/UIManager.vala:47
+msgid "New _doctor"
+msgstr "Novo mé_dico"
+
+#: .././libclinica/UIManager.vala:48
+msgid "Create a new doctor"
+msgstr "Criar um novo médico"
+
+#: .././libclinica/UIManager.vala:49
+msgid "_Quit"
+msgstr "Sair"
+
+#: .././libclinica/UIManager.vala:50
+msgid "Quit clinica"
+msgstr "Sair do Clínica"
+
+#. View menu
+#: .././libclinica/UIManager.vala:53
+msgid "_View"
+msgstr "_Visualizar"
+
+#: .././libclinica/UIManager.vala:54
+msgid "_Start page"
+msgstr "Página inicial"
+
+#: .././libclinica/UIManager.vala:55
+msgid "Go to the start page of clinica"
+msgstr "Ir para a página inicial do Clínica"
+
+#: .././libclinica/UIManager.vala:56
+msgid "_Patients"
+msgstr "_Pacientes"
+
+#: .././libclinica/UIManager.vala:57
+msgid "Go to the list of patients"
+msgstr "Ir para a lista de pacientes"
+
+#: .././libclinica/UIManager.vala:58
+msgid "_Doctors"
+msgstr "Médicos"
+
+#: .././libclinica/UIManager.vala:59
+msgid "Go to the list of doctors"
+msgstr "Ir para a lista de médicos"
+
+#: .././libclinica/UIManager.vala:60
+msgid "_Search medicines"
+msgstr "Pesqui_sar medicamentos"
+
+#: .././libclinica/UIManager.vala:61
+msgid "Search medicines online"
+msgstr "Pesquisar medicamentos online"
+
+#. Tools menu
+#: .././libclinica/UIManager.vala:64
+msgid "_Tools"
+msgstr "Ferramen_tas"
+
+#: .././libclinica/UIManager.vala:65
+msgid "_Settings"
+msgstr "Configuraçõe_s"
+
+#: .././libclinica/UIManager.vala:66
+msgid "Customize clinica behaviour"
+msgstr "Personalizar o comportamento do Clínica"
+
+#: .././libclinica/UIManager.vala:67
+msgid "Backup"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:68
+msgid "Backup clinica data to file"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:69
+msgid "Import"
+msgstr ""
+
+#: .././libclinica/UIManager.vala:70
+msgid "Import data from backup files"
+msgstr ""
+
+#. Help menu
+#: .././libclinica/UIManager.vala:73
+msgid "_Help"
+msgstr "Ajuda"
+
+#: .././libclinica/UIManager.vala:74
+msgid "_Contents"
+msgstr "_Conteúdo"
+
+#: .././libclinica/UIManager.vala:75
+msgid "Open the help system"
+msgstr "Abrir o sistema de ajuda"
+
+#: .././libclinica/UIManager.vala:76
+msgid "_Report a bug"
+msgstr "_Reporte um problema"
+
+#: .././libclinica/UIManager.vala:77
+msgid "Report a bug online"
+msgstr "Relatar um problema online"
+
+#: .././libclinica/UIManager.vala:78
+msgid "_About"
+msgstr "Sobre"
+
+#: .././libclinica/UIManager.vala:79
+msgid "Get to know the development team of Clinica"
+msgstr "Conheça a equipe de desenvolvimento do Clínica"
+
+#: .././libclinica/BackupEngine.vala:113
+msgid "Please select a valid backup file"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:125
+msgid "Importing data"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:126
+msgid "Please wait while Clinica imports the data..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:129
+msgid "Importing the JSON data.."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:137
+msgid "Error while parsing the backup JSON data"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:143 .././libclinica/BackupEngine.vala:170
+msgid "An error occurred while parsing the JSON file"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:165
+msgid ""
+"The doctors, patients, visits and events field in the JSON backup should be "
+"arrays, aborting."
+msgstr ""
+
+#. Clear the database and put the data back in it
+#. in such a way that won't break relationships.
+#: .././libclinica/BackupEngine.vala:188
+msgid "Clearing the old data in the database..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:192
+msgid "Loading doctors..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:201
+#, c-format
+msgid "- %d doctors have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:203
+msgid "Loading patients..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:216
+#, c-format
+msgid "- %d patients have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:218
+msgid "Loading visits..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:231
+#, c-format
+msgid "- %d visits have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:233
+msgid "Loading events..."
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:249
+#, c-format
+msgid "- %d events have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:258
+msgid ""
+"- A FileStore was found but is not available in the current provider\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:283
+#, c-format
+msgid "- %d files have been imported\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:287
+msgid "- No FileStore was found in the backup\n"
+msgstr ""
+
+#: .././libclinica/BackupEngine.vala:298
+msgid "The import of the data has been completed successfully"
+msgstr ""
+
+#: .././libclinica/PatientListStore.vala:128
+#: .././libclinica/PatientListStore.vala:150
+msgid ""
+"Patients database seems corrupted. This is likely to be a bug in the "
+"application"
+msgstr ""
+"O banco de dados de pacientes parece estar corrompido. É provável que seja "
+"devido a um problema no programa"
+
+#. Print the error message to stdout
+#: .././libclinica/Utils.vala:79
+msgid "ERROR => "
+msgstr "ERROR => "
+
+#: .././libclinica/Utils.vala:83 .././libclinica/Utils.vala:84
+msgid "Clinica encountered an error"
+msgstr "O Clínica encontrou um erro"
+
+#: .././libclinica/LocalMedicinesDatabase.vala:90
+#, c-format
+msgid "Medicine with id = %lld not found in DB: %s"
+msgstr ""
+
+#: .././libclinica/LocalMedicinesDatabase.vala:119
+#, c-format
+msgid "Error inserting medicine in the database: %s"
+msgstr ""
+
+#: .././libclinica/EventEditor.vala:93
+msgid "Create a new event"
+msgstr "Criar novo evento"
+
+#: .././libclinica/EventEditor.vala:97
+#, c-format
+msgid "Editing event: %s"
+msgstr "Editando evento: %s"
+
+#. Create the entry for title of the event and venue
+#: .././libclinica/EventEditor.vala:115
+msgid "Title"
+msgstr "Tí­tulo"
+
+#: .././libclinica/EventEditor.vala:116
+msgid "Venue"
+msgstr "Local"
+
+#: .././libclinica/EventEditor.vala:151
+msgid "Time:"
+msgstr "Hora:"
+
+#: .././libclinica/EventEditor.vala:167
+msgid "Insert the description here..."
+msgstr "Insira a descrição aqui…"
+
+#: .././libclinica/EventEditor.vala:205 .././libclinica/VisitToolbar.vala:96
+#, c-format
+msgid "Patient"
+msgstr "Paciente"
+
+#: .././libclinica/EventEditor.vala:264
+msgid "Visit"
+msgstr "Visita"
+
+#: .././libclinica/VisitListStore.vala:99
+msgid ""
+"Visit database seems corrupted. This is likely to be a bug in the application"
+msgstr ""
+"O banco de dados de visitas parece estar corrompido. É provável que isto "
+"seja devido a um problema no programa."
+
+#: .././libclinica/MedicineSearchPage.vala:76
+#: .././data/resources/ui/start_page.glade.h:5
+msgid "Search medicines"
+msgstr "Pesquisar medicamentos"
+
+#: .././libclinica/MedicineSearchPage.vala:100
+msgid "No search engine available"
+msgstr "Não há mecanismo de pesquisa disponível"
+
+#: .././libclinica/MedicineSearchPage.vala:108
+#, c-format
+msgid "Searching for %s..."
+msgstr "Procurando por %s..."
+
+#: .././libclinica/MedicineSearchPage.vala:133
+msgid "Medicines"
+msgstr "Remédios"
+
+#: .././libclinica/MedicineSearchPage.vala:96
+msgid "It's not possible to perform a search for medicine"
+msgstr "Não é possível realizar uma pesquisa para o remédio"
+
+#: .././libclinica/SqliteDataProvider.vala:143
+#, c-format
+msgid "Error creating some configuration files, check permission on %s"
+msgstr ""
+"Erro na criação de alguns arquivos de configuração, verifique as permissões "
+"em %s"
+
+#: .././libclinica/SqliteDataProvider.vala:151
+#, c-format
+msgid "Error reading some configuration files, check permission on %s"
+msgstr ""
+"Erro ao ler alguns arquivos de configuração, verifique as permissões em %s"
+
+#: .././libclinica/SqliteDataProvider.vala:170
+#, c-format
+msgid "Failure while settings new database version to %s"
+msgstr "Falha ao alterar a nova versão do banco de dados para %s"
+
+#: .././libclinica/SqliteDataProvider.vala:173
+msgid "Failure while upgrading database"
+msgstr "A atualização do banco de dados falhou"
+
+#: .././libclinica/SqliteDataProvider.vala:177
+msgid "Version of the database is not compatible"
+msgstr "A versão do banco de dados não é compatível"
+
+#: .././libclinica/SqliteDataProvider.vala:199
+msgid ""
+"This is a version of Clinica newer than the one that created the\n"
+"patients database installed on the system.\n"
+"Using this version requires upgrading the database, and\n"
+"<b>the old version will not be able to use it anymore</b>.\n"
+"Do you wish to perform this one-time upgrade?\n"
+msgstr ""
+"Esta é uma versão do Clínica mais recente do que a que criou o\n"
+"banco de dados de pacientes instalado no sistema.\n"
+"Para uysar esta versão é necessária a atualização do banco de dados e\n"
+"<b>a versão antiga não será capaz de usá-lo mais</ b>.\n"
+"Você deseja realizar a atualização sem volta?\n"
+
+#: .././libclinica/SqliteDataProvider.vala:200
+msgid "Upgrade database"
+msgstr "Atualizar banco de dados"
+
+#: .././libclinica/SqliteDataProvider.vala:225
+msgid "Database needs to be moved"
+msgstr "O banco de dados precisa ser movido"
+
+#: .././libclinica/SqliteDataProvider.vala:226
+msgid ""
+"An older version of clinica has been detected and the old database has to be "
+"moved\n"
+"to a new location to continue.\n"
+"<b>The older version of clinica won't work anymore with this setup</b>.\n"
+"Do you still want to continue?"
+msgstr ""
+"Uma versão mais antiga do Clínica foi detectada e o antigo banco de dados "
+"tem que ser movido\n"
+"para um novo local para continuar.\n"
+"<b>A versão mais antiga do Clínica não vai mais funcionar com esta "
+"configuração</ b>.\n"
+"Você ainda quer continuar?"
+
+#: .././libclinica/SqliteDataProvider.vala:239
+msgid ""
+"Error while transferring the database to the new default location for "
+"clinica >= 0.2.9"
+msgstr ""
+"Erro ao transferir o banco de dados para o novo local padrão do Clínica na "
+"versão 0.2.9 ou mais recente"
+
+#: .././libclinica/SqliteDataProvider.vala:251
+msgid "Error upgrading database, please check your installation"
+msgstr ""
+"Erro ao atualizar o banco de dados, por favor verifique sua instalação"
+
+#: .././libclinica/SqliteDataProvider.vala:266
+#, c-format
+msgid ""
+"Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %s"
+msgstr ""
+"Ocorreu um erro ao atualizar a base de dados da versão 0.1 para a versão "
+"0.2. Código de erro do sqlite: %s"
+
+#: .././libclinica/SqliteDataProvider.vala:359
+#, c-format
+msgid "Error while retrieving the doctor with id = %s"
+msgstr "Erro ao buscar o médico com a id = %s"
+
+#: .././libclinica/SqliteDataProvider.vala:399
+#, c-format
+msgid "An error occurred while saving the doctor with id %d: %s"
+msgstr "Ocorreu um erro ao salvar o médico com ID %d: %s"
+
+#: .././libclinica/SqliteDataProvider.vala:468
+#, c-format
+msgid "Error while retrieving the patient with id = %s"
+msgstr "Erro ao buscar o paciente com a id = %s"
+
+#: .././libclinica/SqliteDataProvider.vala:517
+#: .././libclinica/SqliteDataProvider.vala:652
+#, c-format
+msgid "An error occurred while saving the doctor with id %s: %s"
+msgstr "Ocorreu um erro ao salvar o médico com a id %s: %s"
+
+#: .././libclinica/SqliteDataProvider.vala:597
+#, c-format
+msgid "Error while retrieving the visit with id = %s"
+msgstr "Erro ao buscar a visita com id = %s"
+
+#: .././libclinica/SqliteDataProvider.vala:686
+#, c-format
+msgid "Error while retrieving the event with id = %d"
+msgstr "Erro ao recuperar o evento com id = %d"
+
+#: .././libclinica/SqliteDataProvider.vala:728
+#, c-format
+msgid "An error occurred while saving the event with id %s: %s"
+msgstr "Ocorreu um erro ao salvar o evento com a id %s: %s"
+
+#: .././libclinica/SettingsManager.vala:40
+msgid "Clinica settings"
+msgstr "Configurações do Clínica"
+
+#: .././libclinica/SettingsManager.vala:52
+msgid "Clinica has been built without plugins support"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:135
+msgid "Please use the Network tab to enable the Networked data provider"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:136
+msgid "Use the Network tab"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Disconnect"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Connect"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:191
+#, c-format
+msgid "Connection to the given host failed. Please check your settings."
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:192
+msgid "Connection failed"
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:206
+#: .././libclinica/ResourceManager.vala:284
+#, c-format
+msgid "Username or password are wrong. Disconnecting from the server."
+msgstr ""
+
+#: .././libclinica/SettingsManager.vala:207
+msgid "Wrong authentication data has been provided"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:60
+msgid "Edit details of patient"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:67
+msgid "Remove this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:74
+msgid "Export this visit as PDF"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:81
+msgid "Print a report of this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:88
+msgid "Save this visit"
+msgstr ""
+
+#: .././libclinica/VisitActions.vala:99
+msgid "Close the visits of this patient"
+msgstr ""
+
+#: .././libclinica/VisitToolbar.vala:93
+msgid "This patient has not a doctor"
+msgstr "Este paciente não tem um médico relacionado"
+
+#: .././libclinica/VisitToolbar.vala:97
+msgid "Doctor"
+msgstr ""
+
+#: .././libclinica/DateTimePicker.vala:56
+msgid "Hour"
+msgstr "Hora"
+
+#: .././libclinica/DateTimePicker.vala:58
+msgid "Minute"
+msgstr "Minuto"
+
+#: .././libclinica/DoctorListStore.vala:75
+msgid "Doctors database seems corrupted."
+msgstr "O banco de dados de médicos parece estar corrompido."
+
+#: .././libclinica/DoctorListView.vala:175
+msgid "Select a doctor to delete it!"
+msgstr "Selecione um médico para excluí-lo!"
+
+#: .././libclinica/DoctorListView.vala:186
+msgid ""
+"The doctor that you have selected for removal has some patients associated. "
+"\n"
+msgstr ""
+"O médico que você selecionou para remoção possui alguns pacientes "
+"associados. \n"
+
+#: .././libclinica/DoctorListView.vala:187
+msgid ""
+"It's not possible to remove it without disassociating all his patients.\n"
+"\n"
+msgstr ""
+"Não é possível removê-lo sem desassociar todos os seus pacientes.\n"
+"\n"
+
+#: .././libclinica/DoctorListView.vala:188
+#: .././libclinica/DoctorListView.vala:217
+msgid "Do you really want to proceed?"
+msgstr "Você realmente deseja continuar?"
+
+#: .././libclinica/DoctorListView.vala:189
+msgid "Doctor has associated patients"
+msgstr "Este médico tem pacientes associados"
+
+#: .././libclinica/DoctorListView.vala:215
+msgid ""
+"The following patients will be disassociated from this doctor by this "
+"action:\n"
+msgstr ""
+"Os seguintes pacientes serão desassociados deste médico por esta ação:\n"
+
+#: .././libclinica/DoctorListView.vala:218
+msgid "Confirm disassociation of patients"
+msgstr "Confirmar desassociação dos pacientes"
+
+#: .././libclinica/DoctorListView.vala:235
+msgid ""
+"Really delete this doctor? All information about him/her will be lost."
+msgstr ""
+"Você deseja realmente excluir este médico? Todas as informações sobre ele "
+"serão perdidas."
+
+#. Ask the user where he would like to backup its files.
+#: .././libclinica/UserInterface.vala:360
+msgid "Select the folder where the data should be saved"
+msgstr ""
+
+#. In this string %s refers to the path where the backup has been performed.
+#: .././libclinica/UserInterface.vala:386
+#, c-format
+msgid "Backup completed successfully in the folder %s"
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:387
+msgid "Backup completed"
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:389
+msgid ""
+"Please take care of copying the folder in a safe place for future restore of "
+"the data."
+msgstr ""
+
+#: .././libclinica/UserInterface.vala:416
+#, c-format
+msgid "Cannot open the help: %s"
+msgstr "Não é possível abrir a ajuda: %s"
+
+#: .././libclinica/UserInterface.vala:441
+msgid ""
+"An error occurred while opening the bug system. Please go to\n"
+"http://launchpad.net/clinica-project/ to file a bug"
+msgstr ""
+"Ocorreu um erro ao abrir o sistema de bugs. Por favor, visite\n"
+"http://launchpad.net/clinica-project/ para reportar o problema"
+
+#: .././libclinica/EventDetail.vala:65
+msgid "Edit event"
+msgstr "Editar evento"
+
+#: .././libclinica/EventDetail.vala:112
+msgid "Remove"
+msgstr "Remover"
+
+#: .././libclinica/EventDetail.vala:145
+msgid "Really delete this event?"
+msgstr "Deseja realmente apagar este evento?"
+
+#: .././libclinica/Sidebar.vala:68
+msgid "Pages"
+msgstr "Páginas"
+
+#: .././libclinica/StartPage.vala:93
+msgid "Dashboard"
+msgstr "Painel"
+
+#: .././libclinica/StartPage.vala:205
+msgid ""
+"Add a new patient \n"
+" with name "
+msgstr ""
+"Adicionar um novo paciente \n"
+" com nome "
+
+#: .././libclinica/EventListStore.vala:121
+msgid ""
+"Events database seems corrupted. This is likely to be a bug in the "
+"application"
+msgstr ""
+"O banco de dados de eventos parece estar corrompido. Isto pode ser devido a "
+"um problema no programa"
+
+#: .././libclinica/DoctorListPage.vala:60
+#: .././libclinica/DoctorListPage.vala:93
+msgid "Doctors"
+msgstr "Médicos"
+
+#: .././libclinica/DoctorListPage.vala:76
+msgid "Add a doctor"
+msgstr ""
+
+#: .././libclinica/DoctorListPage.vala:82
+msgid "Edit the selected doctor"
+msgstr ""
+
+#: .././libclinica/DoctorListPage.vala:88
+msgid "Remove the selected doctor"
+msgstr ""
+
+#: .././libclinica/ResourceManager.vala:285
+msgid "Error while authenticating on the server"
+msgstr ""
+
+#: .././libclinica/AboutDialog.vala:41
+msgid "Medical records manager"
+msgstr "Gerenciador de registros médicos"
+
+#: .././libclinica/AboutDialog.vala:43
+msgid "About Clinica"
+msgstr "Sobre o Clínica"
+
+#: .././libclinica/AboutDialog.vala:52
+msgid "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+msgstr "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+
+#: .././libclinica/AboutDialog.vala:53
+msgid "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+msgstr "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+
+#. Histopathology
+#: .././libclinica/VisitPrinter.vala:122
+msgid "Histopathology"
+msgstr "Histopatologia"
+
+#. Now write the date of the visit after that
+#: .././libclinica/VisitPrinter.vala:285
+#, c-format
+msgid "Report of the visit of %s"
+msgstr ""
+
+#: .././libclinica/VisitPrinter.vala:316
+#: .././libclinica/MedicineDetailDialog.vala:109
+msgid "Field empty"
+msgstr "Campo vazio"
+
+#. Add a Attach button
+#: .././libclinica/VisitFileManager.vala:89
+msgid "Attach file"
+msgstr "Anexar arquivo"
+
+#: .././libclinica/VisitFileManager.vala:97
+msgid "Browse files"
+msgstr "Procurar arquivos"
+
+#: .././libclinica/VisitFileManager.vala:113
+msgid "Select a file to attach"
+msgstr "Selecionar um arquivo para anexar"
+
+#: .././libclinica/VisitFileManager.vala:133
+msgid "Unable to open the browser on the filestore position"
+msgstr "Não é possível abrir o navegador na posição filestore"
+
+#: .././libclinica/VisitFileManager.vala:163
+msgid ""
+"Save the visit\n"
+" to attach files"
+msgstr ""
+"Salvar a visita\n"
+" para anexar arquivos"
+
+#: .././libclinica/VisitFileManager.vala:170
+msgid "Attach files"
+msgstr "Anexar arquivos"
+
+#: .././libclinica/SidebarCalendarEntry.vala:30
+msgid "Calendar"
+msgstr "Calendário"
+
+#. Create the object and add the close button used
+#. * to dismiss the dialog
+#: .././libclinica/MedicineDetailDialog.vala:46
+msgid "Close"
+msgstr "Fechar"
+
+#: .././libclinica/MedicineDetailDialog.vala:65
+msgid "General information"
+msgstr "Informações gerais"
+
+#. And now the content for the others fields of the medicine
+#: .././libclinica/MedicineDetailDialog.vala:71
+msgid "Identification Code"
+msgstr "Código de Identificação"
+
+#: .././libclinica/MedicineDetailDialog.vala:72
+msgid "Description"
+msgstr "Descrição"
+
+#: .././libclinica/MedicineDetailDialog.vala:73
+msgid "Active ingredient"
+msgstr "Princípio ativo"
+
+#: .././libclinica/MedicineDetailDialog.vala:74
+msgid "Storage reccomendations"
+msgstr "Recomendações de armazenamento"
+
+#: .././libclinica/MedicineDetailDialog.vala:83
+msgid "Additional notes"
+msgstr "Notas adicionais"
+
+#. Nothing to do for now.
+#: .././libclinica/FileDetail.vala:89
+#, c-format
+msgid "Error while loading icon for file %s: %s"
+msgstr "Erro ao carregar no ícone para o arquivo %s: %s"
+
+#: .././libclinica/FileDetail.vala:98
+msgid "Open file"
+msgstr "Abrir arquivo"
+
+#: .././libclinica/FileDetail.vala:110
+msgid "Delete file"
+msgstr "Excluir arquivo"
+
+#: .././libclinica/FileDetail.vala:122
+#, c-format
+msgid ""
+"Do you really want to delete the file %s?\n"
+"If you proceed it will be definitively lost."
+msgstr ""
+"Você realmente deseja excluir o arquivo %s?\n"
+"Se você continuar ele será definitivamente perdido."
+
+#: .././libclinica/FileDetail.vala:135
+#, c-format
+msgid "Error while opening the file %s"
+msgstr "Erro ao abrir o arquivo %s"
+
+#: .././data/resources/ui/start_page.glade.h:1
+msgid "Browse the patients to start a visit"
+msgstr "Procurar por pacientes para agendar uma visita"
+
+#: .././data/resources/ui/start_page.glade.h:2
+msgid "Add new patient"
+msgstr "Adicionar novo paciente"
+
+#: .././data/resources/ui/start_page.glade.h:3
+msgid "Patient list"
+msgstr "Lista de pacientes"
+
+#: .././data/resources/ui/start_page.glade.h:4
+msgid "Doctor list"
+msgstr "Lista de médicos"
+
+#: .././data/resources/ui/start_page.glade.h:6
+msgid "Open calendar"
+msgstr "Abrir calendário"
+
+#: .././data/resources/ui/authentication_dialog.glade.h:1
+msgid "The server requires authentication. Please insert your credentials:"
+msgstr ""
+
+#: .././data/resources/ui/authentication_dialog.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:11
+msgid "Username"
+msgstr ""
+
+#: .././data/resources/ui/authentication_dialog.glade.h:3
+#: .././data/resources/ui/settings_window.glade.h:12
+msgid "Password"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:1
+msgid "Name:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:2
+msgid "Description:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:3
+msgid "Active ingredient:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:4
+msgid "Storage reccomendations:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:5
+msgid "Price:"
+msgstr ""
+
+#: .././data/resources/ui/medicine_editor.glade.h:6
+msgid "Other notes:"
+msgstr ""
+
+#: .././data/resources/ui/import_dialog.glade.h:1
+msgid "Source:\t"
+msgstr ""
+
+#: .././data/resources/ui/import_dialog.glade.h:2
+msgid "Select the backup folder"
+msgstr ""
+
+#: .././data/resources/ui/import_dialog.glade.h:3
+msgid ""
+"<b>Warning:</b> Please note that the current data in the database <b>will be "
+"definitely lost</b>. Consider performing a backup of the current data before "
+"importing the old one."
+msgstr ""
+
+#: .././data/resources/ui/doctor_editor.glade.h:1
+#: .././data/resources/ui/patient_editor.glade.h:12
+msgid "Doctor:"
+msgstr "Médico:"
+
+#: .././data/resources/ui/doctor_editor.glade.h:4
+#: .././data/resources/ui/patient_editor.glade.h:11
+msgid "Phone:"
+msgstr "Telefone:"
+
+#: .././data/resources/ui/doctor_editor.glade.h:5
+msgid "Mobile:"
+msgstr "Celular:"
+
+#: .././data/resources/ui/wait_dialog.glade.h:1
+msgid "label"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:1
+msgid "Use plugins (restart required)"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:2
+msgid "Allow to browse files in visits"
+msgstr "Permitir procurar arquivos em visitas"
+
+#: .././data/resources/ui/settings_window.glade.h:3
+msgid "Medicines search engine"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:4
+msgid "Data source"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:5
+msgid "General"
+msgstr "Geral"
+
+#: .././data/resources/ui/settings_window.glade.h:6
+msgid "Host"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:7
+msgid "Port"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:8
+msgid "button"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:9
+msgid "Connection to a remote Clinica instance"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:10
+msgid "Allow connections of other clinica from the LAN"
+msgstr "Permitir conexões de outro programa clinica pela rede local"
+
+#: .././data/resources/ui/settings_window.glade.h:13
+msgid "Built-in server"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:14
+msgid "Network"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:15
+msgid ""
+"The details that are inserted here will be used when generating\n"
+"the automatic visit reports. "
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:18
+msgid "Address"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:19
+msgid "Institution"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:20
+msgid "Email"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:21
+msgid "Personal details"
+msgstr ""
+
+#: .././data/resources/ui/settings_window.glade.h:22
+msgid "Plugins"
+msgstr "Plugins"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:1
+msgid "Visits"
+msgstr "Visitas"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:2
+msgid "Schedule a visit"
+msgstr "Agendar uma visita"
+
+#: .././data/resources/ui/patient_editor.glade.h:1
+msgid "Patient:"
+msgstr "Paciente:"
+
+#: .././data/resources/ui/patient_editor.glade.h:4
+msgid "Gender:"
+msgstr "Sexo:"
+
+#: .././data/resources/ui/patient_editor.glade.h:5
+msgid "Date of birth:"
+msgstr "Data de nascimento:"
+
+#: .././data/resources/ui/patient_editor.glade.h:6
+msgid "dd"
+msgstr "dd"
+
+#: .././data/resources/ui/patient_editor.glade.h:7
+msgid "/"
+msgstr "/"
+
+#: .././data/resources/ui/patient_editor.glade.h:8
+msgid "mm"
+msgstr "mm"
+
+#: .././data/resources/ui/patient_editor.glade.h:9
+msgid "yyyy"
+msgstr "aaaa"
+
+#: .././data/resources/ui/patient_editor.glade.h:10
+msgid "Address:"
+msgstr "Endereço:"
+
+#: .././data/resources/ui/patient_editor.glade.h:13
+msgid "Codice fiscale:"
+msgstr "Código fiscal:"
+
+#: .././data/resources/ui/patient_editor.glade.h:14
+msgid "Male"
+msgstr "Masculino"
+
+#: .././data/resources/ui/patient_editor.glade.h:15
+msgid "Female"
+msgstr "Feminino"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:1
+msgid "Select the date on which you'd like to schedule the visit."
+msgstr "Selecione uma data na qual você deseja agendar a visita"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:2
+msgid "Selected patient"
+msgstr "Paciente selecionado"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:3
+msgid ""
+"<b>Tip:</b> Once created this visit will be visible in the visit editor of "
+"this patient."
+msgstr ""
+"<b>Dica:</b> Uma vez criada esta visita, ela estará visível no editor de "
+"visitas deste paciente."
+
+#~ msgid "Use plugins (need restart)"
+#~ msgstr "Usar plugins (é necessário reiniciar)"
+
+#, c-format
+#~ msgid "Visits of the patient %s"
+#~ msgstr "Consultas do paciente %s"
+
+#~ msgid "Error loading patient_editor.glade."
+#~ msgstr "Erro ao carregar patient_editor.glade."
+
+#~ msgid "Save as PDF"
+#~ msgstr "Salvar como PDF"
+
+#, c-format
+#~ msgid ""
+#~ "Patient: <b>%s</b>\n"
+#~ "Doctor: <b>%s</b>"
+#~ msgstr ""
+#~ "Paciente: <b>%s</b>\n"
+#~ "Médico: <b>%s</b>"
+
+#~ msgid "Stop"
+#~ msgstr "Parar"
+
+#~ msgid "Clinica"
+#~ msgstr "Clinica"
+
+#~ msgid "_Home"
+#~ msgstr "_Início"
+
+#~ msgid "Edit patient details"
+#~ msgstr "Editar detalhes do paciente"
+
+#~ msgid "Confirm deletion of patients"
+#~ msgstr "Confirme a exclusão dos pacientes"
+
+#~ msgid "The following patients will be deleted by this action:\n"
+#~ msgstr "Os seguintes pacientes serão eliminados por esta ação:\n"
+
+#~ msgid "Medicine search"
+#~ msgstr "Pesquisa médica"
+
+#~ msgid "New Patient"
+#~ msgstr "Novo Paciente"
+
+#~ msgid "New Doctor"
+#~ msgstr "Novo Médico"
+
+#~ msgid ""
+#~ "It's not possible to remove it without removing all his patients.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Não é possível removê-lo sem remover todos os seus pacientes.\n"
+#~ "\n"
+
+#~ msgid ""
+#~ "You cannot delete a doctor with associated patients. Delete his patients "
+#~ "first."
+#~ msgstr ""
+#~ "Você não pode excluir um médico com pacientes associados. Exclua seus "
+#~ "pacientes em primeiro lugar."
+
+#~ msgid ""
+#~ "Select the search engine\n"
+#~ "used to find medicines"
+#~ msgstr ""
+#~ "Selecione o sistema de pesquisa\n"
+#~ "utilizado para encontrar medicamentos."
+
+#, c-format
+#~ msgid ""
+#~ "Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %d"
+#~ msgstr ""
+#~ "Ocorreu um erro ao atualizar o banco de dados da versão 0.1 para 0.2, código "
+#~ "de saída do sqlite: %d"
+
+#~ msgid ""
+#~ "\n"
+#~ "Launchpad contributions: \n"
+#~ msgstr ""
+#~ "\n"
+#~ "Contribuições do Launchpad: \n"
+
+#~ msgid "Back"
+#~ msgstr "Anterior"
diff --git a/po/sr.po b/po/sr.po
index e97a425..f2460ec 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -1,651 +1,1405 @@
 # Serbian translation for clinica-project
 # Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
 # This file is distributed under the same license as the clinica-project package.
-# FIRST AUTHOR <EMAIL at ADDRESS>, 2011.
-#
+# Мирослав Николић <miroslavnikolic at rocketmail.com>, 2012, 2013.
+# Саша Петровић <salepetronije at gmail.com>, 2012.
 msgid ""
 msgstr ""
 "Project-Id-Version: clinica-project\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-12-19 07:28+0100\n"
-"PO-Revision-Date: 2011-10-21 18:52+0000\n"
+"POT-Creation-Date: 2013-04-18 10:23+0200\n"
+"PO-Revision-Date: 2013-06-07 07:02+0000\n"
 "Last-Translator: Мирослав Николић <miroslavnikolic at rocketmail.com>\n"
-"Language-Team: Serbian <sr at li.org>\n"
-"Language: sr\n"
+"Language-Team: Serbian <gnom at prevod.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-11-20 06:07+0000\n"
-"X-Generator: Launchpad (build 14299)\n"
+"X-Launchpad-Export-Date: 2013-06-08 06:05+0000\n"
+"X-Generator: Launchpad (build 16667)\n"
+"Language: sr\n"
 
-#: ../libclinica/Doctor.vala:110
-msgid ""
-"You cannot delete a doctor with associated patients. Delete his patients "
-"first."
-msgstr ""
+#: .././plugins/AgenziaDelFarmaco.py:166
+msgid "Dosage form"
+msgstr "Облик примене"
 
-#: ../libclinica/VisitListStore.vala:103
-msgid ""
-"Visit database seems corrupted. This is likely to be a bug in the application"
-msgstr ""
+#: .././plugins/AgenziaDelFarmaco.py:167
+msgid "System of supply"
+msgstr "Начин снабдевања"
+
+#: .././plugins/AgenziaDelFarmaco.py:168
+msgid "Class of eligibility"
+msgstr "Разред прихватљивости"
+
+#: .././plugins/AgenziaDelFarmaco.py:169
+msgid "Firm"
+msgstr "Предузеће"
 
-#: ../libclinica/UserInterface.vala:282
+#. Title of edit doctor dialog
+#: .././libclinica/DoctorEditor.vala:88
 #, c-format
-msgid "Cannot open the help: %s"
-msgstr ""
+msgid "Edit doctor named %s"
+msgstr "Уредите доктора под именом %s"
+
+#: .././libclinica/PatientLens.vala:37
+msgid "Search for patients"
+msgstr "Потражите пацијенте"
+
+#: .././libclinica/PatientLens.vala:43
+msgid "Recently visited patients"
+msgstr "Скоро посећени пацијенти"
 
-#: ../libclinica/PatientListPage.vala:74
+#. Create the SidebarEntry
+#: .././libclinica/PatientLens.vala:47 .././libclinica/PatientListPage.vala:64
+#: .././libclinica/PatientListPage.vala:110
 msgid "Patients"
-msgstr ""
+msgstr "Пацијенти"
 
-#: ../libclinica/PatientListView.vala:76
-#: ../libclinica/MedicineTreeView.vala:18 ../libclinica/DoctorListView.vala:51
-#: ../ui/patient_editor.glade.h:10 ../ui/doctor_editor.glade.h:4
+#: .././libclinica/PatientListView.vala:76
+#: .././libclinica/DoctorListView.vala:51
+#: .././data/resources/ui/doctor_editor.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:17
+#: .././data/resources/ui/patient_editor.glade.h:2
 msgid "Name"
 msgstr "Име"
 
 #. ...and then the surname column
-#: ../libclinica/PatientListView.vala:80 ../libclinica/DoctorListView.vala:56
-#: ../ui/patient_editor.glade.h:13 ../ui/doctor_editor.glade.h:6
+#: .././libclinica/PatientListView.vala:80
+#: .././libclinica/DoctorListView.vala:56
+#: .././data/resources/ui/doctor_editor.glade.h:3
+#: .././data/resources/ui/patient_editor.glade.h:3
 msgid "Surname"
 msgstr "Презиме"
 
-#: ../libclinica/PatientListView.vala:174
+#: .././libclinica/PatientListView.vala:165
 msgid "Select a patient to delete it!"
-msgstr ""
+msgstr "Изаберите пацијента да га обришете!"
 
-#: ../libclinica/PatientListView.vala:181
+#: .././libclinica/PatientListView.vala:172
 msgid ""
 "Really delete this patient? All information about him/her and the associated "
 "visits will be lost."
 msgstr ""
+"Стварно да обришем овог пацијента? Сви подаци о њему/њој и придружене посете "
+"ће бити изгубљене."
 
-#. Print the error message to stdout
-#: ../libclinica/Utils.vala:79
-msgid "ERROR => "
-msgstr ""
+#. Set title according to the patient that we have loaded and connect
+#. * show startup signal to the focusing of the first field in the visit
+#: .././libclinica/VisitPage.vala:63
+#, c-format
+msgid "Visit of the patient %s"
+msgstr "Посета пацијенту %s"
 
-#: ../libclinica/Utils.vala:83 ../libclinica/Utils.vala:84
-msgid "Clinica encountered an error"
+#: .././libclinica/PluginManager.vala:35
+msgid ""
+"Clinica is extensible via plugins and you can easily enable\n"
+" and disable them using this window."
 msgstr ""
+"Клинику можете да проширите помоћу прикључака и да их лако укључите\n"
+" или искључите користећи овај прозор."
+
+#: .././libclinica/VisitSchedulerDialog.vala:60
+#: .././libclinica/VisitSchedulerDialog.vala:76
+msgid "Patient not selected"
+msgstr "Нисте изабрали пацијента"
+
+#: .././libclinica/VisitSchedulerDialog.vala:72
+#, c-format
+msgid "Schedule a vist for the patient %s"
+msgstr "Испланирајте посету за пацијента %s"
+
+#: .././libclinica/Application.vala:113
+#, c-format
+msgid "Option parsing failed: %s\n"
+msgstr "Није успела обрада опције: %s\n"
 
-#: ../libclinica/StartPage.vala:198
+#: .././libclinica/Application.vala:148
+#, c-format
+msgid "Clinica %s\n"
+msgstr "Клиника %s\n"
+
+#. Then add add a new visit and keep a reference to new_page
+#. *  to focus it on page loading.
+#. Create a new one and connect it
+#: .././libclinica/VisitBrowser.vala:73 .././libclinica/VisitBrowser.vala:252
+msgid "New visit"
+msgstr "Нова посета"
+
+#: .././libclinica/VisitBrowser.vala:152 .././libclinica/VisitBrowser.vala:209
 msgid ""
-"Add a new patient \n"
-" with name "
+"A visit need to be saved in order to be exported as PDF.\n"
+"Do you want to save the visit now?"
 msgstr ""
+"Посета мора да буде сачувана да би могла да буде извезена као ПДФ.\n"
+"Да ли желите сада да сачувате посету?"
 
-#: ../libclinica/StartPage.vala:204
-msgid "Add a new patient"
+#: .././libclinica/VisitBrowser.vala:196
+msgid "Error while delivering the print operation"
+msgstr "Дошло је до грешке приликом достављања радње штампања"
+
+#: .././libclinica/VisitDetail.vala:70
+msgid "Edit visit"
+msgstr "Уредите посету"
+
+#: .././libclinica/VisitDetail.vala:80 .././libclinica/EventDetail.vala:75
+msgid "Delete event"
+msgstr "Обриши догађај"
+
+#: .././libclinica/VisitDetail.vala:104
+msgid "Show details"
+msgstr "Прикажи детаље"
+
+#: .././libclinica/VisitDetail.vala:125 .././libclinica/VisitTab.vala:269
+msgid ""
+"Deleting a visit will cause all its data to be lost.\n"
+"Do you really want to continue?"
 msgstr ""
+"Брисање посете ће изазвати губитак свих њених података.\n"
+"Да ли стварно желите да наставите?"
+
+#. Create menu items, connect them to their callback
+#. * and add it to the menu
+#: .././libclinica/DoctorContextMenu.vala:58
+#: .././libclinica/PatientContextMenu.vala:54
+msgid "Delete"
+msgstr "Обриши"
+
+#. Instantiate menu items
+#: .././libclinica/DoctorContextMenu.vala:59
+#: .././libclinica/PatientContextMenu.vala:51
+#: .././libclinica/EventDetail.vala:111
+msgid "Edit"
+msgstr "Уреди"
+
+#: .././libclinica/MedicineEditor.vala:41
+msgid "Create a new Medicine"
+msgstr "Направи нови лек"
+
+#: .././libclinica/CalendarWindow.vala:36
+msgid "Clinica calendar"
+msgstr "Календар Клинике"
+
+#. Anamnesis
+#: .././libclinica/VisitTab.vala:286 .././libclinica/VisitPrinter.vala:107
+msgid "Anamnesis"
+msgstr "Анамнеза"
+
+#. Physical examination
+#: .././libclinica/VisitTab.vala:289 .././libclinica/VisitPrinter.vala:112
+msgid "Physical examination"
+msgstr "Физички преглед"
+
+#. Laboratory Exam
+#: .././libclinica/VisitTab.vala:292 .././libclinica/VisitPrinter.vala:117
+msgid "Laboratory exam"
+msgstr "Лабораторијски преглед"
+
+#: .././libclinica/VisitTab.vala:295
+msgid "Hystopathology"
+msgstr "Хистопатологија"
+
+#. Diagnosis
+#: .././libclinica/VisitTab.vala:298 .././libclinica/VisitPrinter.vala:127
+msgid "Diagnosis"
+msgstr "Дијагноза"
+
+#. Topical therapy
+#: .././libclinica/VisitTab.vala:301 .././libclinica/VisitPrinter.vala:132
+msgid "Topical therapy"
+msgstr "Топична терапија"
+
+#. Systemic therapy
+#: .././libclinica/VisitTab.vala:304 .././libclinica/VisitPrinter.vala:137
+msgid "Systemic therapy"
+msgstr "Системска терапија"
+
+#. Subsequent checks
+#: .././libclinica/VisitTab.vala:307 .././libclinica/VisitPrinter.vala:142
+msgid "Subsequent checks"
+msgstr "Накнадни прегледи"
 
-#: ../libclinica/MedicineTreeView.vala:21
-#: ../libclinica/MedicineDetailDialog.vala:56
+#: .././libclinica/MedicineTreeView.vala:37
+msgid "Medicine name"
+msgstr "Назив лека"
+
+#: .././libclinica/MedicineTreeView.vala:40
+#: .././libclinica/MedicineDetailDialog.vala:75
 msgid "Price"
+msgstr "Цена"
+
+#: .././libclinica/PatientListPage.vala:81 .././libclinica/StartPage.vala:211
+msgid "Add a new patient"
+msgstr "Додајте новог пацијента"
+
+#: .././libclinica/PatientListPage.vala:87
+msgid "Remove the selected patient"
+msgstr "Уклоните изабраног пацијента"
+
+#: .././libclinica/PatientListPage.vala:93
+msgid "Modify the selected patient"
+msgstr "Измените изабраног пацијента"
+
+#: .././libclinica/PatientListPage.vala:99
+msgid "Edit visits of the selected patient"
+msgstr "Уредите посете изабраног пацијента"
+
+#: .././libclinica/PatientListPage.vala:105
+msgid "Schedule a visit with the selected patient"
+msgstr "Закажите посету изабраном пацијенту"
+
+#: .././libclinica/DataServer.vala:417
+#, c-format
+msgid "Trying to removing doctor with ID = %ld failed"
+msgstr "Није успео покушај уклањања лекара са ИБ-ом = %ld"
+
+#: .././libclinica/DataServer.vala:440
+#, c-format
+msgid "Trying to removing patient with ID = %ld failed"
+msgstr "Није успео покушај уклањања пацијента са ИБ-ом = %ld"
+
+#: .././libclinica/DataServer.vala:463
+#, c-format
+msgid "Trying to removing visit with ID = %ld failed"
+msgstr "Није успео покушај уклањања посете са ИБ-ом = %ld"
+
+#: .././libclinica/DataServer.vala:486
+#, c-format
+msgid "Trying to removing event with ID = %ld failed"
+msgstr "Није успео покушај уклањања догађаја са ИБ-ом = %ld"
+
+#: .././libclinica/Builder.vala:45
+#, c-format
+msgid ""
+"Failed to load UI file: %s. Please check your installation.\n"
+"%s"
 msgstr ""
+"Нисам успео да учитам датотеку корисничког сучеља: %s. Молим проверите вашу "
+"инсталацију.\n"
+"%s"
 
-#: ../libclinica/PatientEditor.vala:102
-msgid "Error loading patient_editor.glade."
+#: .././libclinica/LocalFileStore.vala:62
+#, c-format
+msgid "Unable to setup file monitors for the filestore folder: %s"
+msgstr "Не могу да подесим праћење датотеке за фасциклу чувања датотека: %s"
+
+#: .././libclinica/LocalFileStore.vala:106
+#, c-format
+msgid "Unable to setup a file monitor on directory %s"
+msgstr "Не могу да подесим праћење датотеке на директоријуму %s"
+
+#: .././libclinica/LocalFileStore.vala:141
+#, c-format
+msgid "Error while listing the files for the visit identified by id %d"
+msgstr "Грешка приликом исписивања датотека за посету препознату иб-ом %d"
+
+#: .././libclinica/LocalFileStore.vala:167
+msgid "Destination file already exists"
+msgstr "Одредишна датотека већ постоји"
+
+#: .././libclinica/LocalFileStore.vala:172
+#, c-format
+msgid "Error while adding the file %s to the selected visit"
+msgstr "Грешка приликом додавања датотеке %s изабраној посети"
+
+#: .././libclinica/NetworkedDataProvider.vala:246
+msgid ""
+"You canceled the authentication process on the remote server.\n"
+"From now on Clinica will use the local database. If you want to connect to\n"
+"remote server please re-enable networking in the settings dialog."
 msgstr ""
+"Обуставили сте поступак распознавања са удаљеним даваоцем услуга.\n"
+"Од сада ће Клиника користити месну базу података. Ако се желите повезати са\n"
+"удаљеним даваоцем услуга, омогућите мрежне везе у прозору поставки."
 
 #. Set title to edit patient * instead of create new patient
-#: ../libclinica/PatientEditor.vala:307
+#: .././libclinica/PatientEditor.vala:304
 #, c-format
 msgid "Edit patient named %s"
-msgstr ""
+msgstr "Уредите пацијента под именом %s"
 
-#: ../libclinica/PatientEditor.vala:411
+#: .././libclinica/PatientEditor.vala:408
 msgid "You must select a doctor for this patient."
-msgstr ""
+msgstr "Морате да изаберете доктора за овог пацијента."
 
-#: ../libclinica/PatientEditor.vala:412
+#: .././libclinica/PatientEditor.vala:409
 msgid ""
 "If you need to create a new one type his name in the entry and select Create "
 "new doctor from the completion list."
 msgstr ""
+"Ако морате да направите новог упишите његово име у поље за унос и изаберите "
+"„Направи новог доктора“ са списка довршавања."
 
-#: ../libclinica/PatientEditor.vala:446
+#: .././libclinica/PatientEditor.vala:445
 msgid "Date inserted is invalid, aborting patient editing"
+msgstr "Уметнути датум није тачан, прекидам уређивање пацијента"
+
+#: .././libclinica/AuthenticationDialog.vala:40
+msgid "Authentication required"
+msgstr "Неопходна је пријава"
+
+#. Start of events
+#: .././libclinica/CalendarEventList.vala:73
+msgid "Events scheduled"
+msgstr "Испланирани догађаји"
+
+#: .././libclinica/CalendarEventList.vala:92
+msgid ""
+"No events on this day.\n"
+"You can create a new event\n"
+"by clicking on the top-left button."
 msgstr ""
+"Нема догађаја за овај дан.\n"
+"Можете да направите нови догађај\n"
+"кликом на горње лево дугме."
 
-#. Set title according to the patient that we have loaded and connect
-#. * show startup signal to the focusing of the first field in the visit
-#: ../libclinica/VisitWindow.vala:62
+#: .././libclinica/CalendarEventList.vala:103
+msgid "Visits performed"
+msgstr "Обављене посете"
+
+#: .././libclinica/CalendarEventList.vala:105
+msgid "Visits scheduled"
+msgstr "Испланиране посете"
+
+#: .././libclinica/CalendarEventList.vala:126
+msgid "No visits performed on this day"
+msgstr "Нема испланираних посета за овај дан"
+
+#: .././libclinica/ImportDialog.vala:40
+msgid "Import data from backup file"
+msgstr "Унесите податке из резервне датотеке"
+
+#: .././libclinica/PatientContextMenu.vala:57
+msgid "Edit visits"
+msgstr "Уредите посете"
+
+#. File menu
+#: .././libclinica/UIManager.vala:44
+msgid "_File"
+msgstr "_Датотека"
+
+#: .././libclinica/UIManager.vala:45
+msgid "New _patient"
+msgstr "Нови _пацијент"
+
+#: .././libclinica/UIManager.vala:46
+msgid "Create a new patient"
+msgstr "Направите новог пацијента"
+
+#: .././libclinica/UIManager.vala:47
+msgid "New _doctor"
+msgstr "Нови _доктор"
+
+#: .././libclinica/UIManager.vala:48
+msgid "Create a new doctor"
+msgstr "Направите новог доктора"
+
+#: .././libclinica/UIManager.vala:49
+msgid "_Quit"
+msgstr "_Изађи"
+
+#: .././libclinica/UIManager.vala:50
+msgid "Quit clinica"
+msgstr "Напустите клинику"
+
+#. View menu
+#: .././libclinica/UIManager.vala:53
+msgid "_View"
+msgstr "_Преглед"
+
+#: .././libclinica/UIManager.vala:54
+msgid "_Start page"
+msgstr "_Почетна страница"
+
+#: .././libclinica/UIManager.vala:55
+msgid "Go to the start page of clinica"
+msgstr "Идите на почетну страницу клинике"
+
+#: .././libclinica/UIManager.vala:56
+msgid "_Patients"
+msgstr "_Пацијенти"
+
+#: .././libclinica/UIManager.vala:57
+msgid "Go to the list of patients"
+msgstr "Идите на списак пацијената"
+
+#: .././libclinica/UIManager.vala:58
+msgid "_Doctors"
+msgstr "_Доктори"
+
+#: .././libclinica/UIManager.vala:59
+msgid "Go to the list of doctors"
+msgstr "Идите на списак доктора"
+
+#: .././libclinica/UIManager.vala:60
+msgid "_Search medicines"
+msgstr "_Тражи лекове"
+
+#: .././libclinica/UIManager.vala:61
+msgid "Search medicines online"
+msgstr "Потражите лекове на мрежи"
+
+#. Tools menu
+#: .././libclinica/UIManager.vala:64
+msgid "_Tools"
+msgstr "_Алати"
+
+#: .././libclinica/UIManager.vala:65
+msgid "_Settings"
+msgstr "_Подешавања"
+
+#: .././libclinica/UIManager.vala:66
+msgid "Customize clinica behaviour"
+msgstr "Прилагодите понашање клинике"
+
+#: .././libclinica/UIManager.vala:67
+msgid "Backup"
+msgstr "Резерва"
+
+#: .././libclinica/UIManager.vala:68
+msgid "Backup clinica data to file"
+msgstr "Направите резерву података Клинике у датотеку"
+
+#: .././libclinica/UIManager.vala:69
+msgid "Import"
+msgstr "Увези"
+
+#: .././libclinica/UIManager.vala:70
+msgid "Import data from backup files"
+msgstr "Увезите податке из резервне датотеке"
+
+#. Help menu
+#: .././libclinica/UIManager.vala:73
+msgid "_Help"
+msgstr "По_моћ"
+
+#: .././libclinica/UIManager.vala:74
+msgid "_Contents"
+msgstr "_Садржај"
+
+#: .././libclinica/UIManager.vala:75
+msgid "Open the help system"
+msgstr "Отворите систем помоћи"
+
+#: .././libclinica/UIManager.vala:76
+msgid "_Report a bug"
+msgstr "Пријави _грешку"
+
+#: .././libclinica/UIManager.vala:77
+msgid "Report a bug online"
+msgstr "Пријавите грешку на мрежи"
+
+#: .././libclinica/UIManager.vala:78
+msgid "_About"
+msgstr "_О програму"
+
+#: .././libclinica/UIManager.vala:79
+msgid "Get to know the development team of Clinica"
+msgstr "Сазнајте развојну екипу Клинике"
+
+#: .././libclinica/BackupEngine.vala:113
+msgid "Please select a valid backup file"
+msgstr "Изаберите одговарајућу резервну датотеку"
+
+#: .././libclinica/BackupEngine.vala:125
+msgid "Importing data"
+msgstr "Увозим податке"
+
+#: .././libclinica/BackupEngine.vala:126
+msgid "Please wait while Clinica imports the data..."
+msgstr "Сачекајте док Клиника увезе податке..."
+
+#: .././libclinica/BackupEngine.vala:129
+msgid "Importing the JSON data.."
+msgstr "Увозим ЈСОН податке..."
+
+#: .././libclinica/BackupEngine.vala:137
+msgid "Error while parsing the backup JSON data"
+msgstr "Дошло је до грешке обраде резервних ЈСОН података"
+
+#: .././libclinica/BackupEngine.vala:143 .././libclinica/BackupEngine.vala:170
+msgid "An error occurred while parsing the JSON file"
+msgstr "Дошло је до грешке обрађивања ЈСОН датотеке"
+
+#: .././libclinica/BackupEngine.vala:165
+msgid ""
+"The doctors, patients, visits and events field in the JSON backup should be "
+"arrays, aborting."
+msgstr ""
+"Доктори, пацијенти, посете и поље догађаја у ЈСОН резерви треба да буду "
+"низови, прекидам."
+
+#. Clear the database and put the data back in it
+#. in such a way that won't break relationships.
+#: .././libclinica/BackupEngine.vala:188
+msgid "Clearing the old data in the database..."
+msgstr "Чистим старе податке из базе података..."
+
+#: .././libclinica/BackupEngine.vala:192
+msgid "Loading doctors..."
+msgstr "Учитавам лекаре..."
+
+#: .././libclinica/BackupEngine.vala:201
+#, c-format
+msgid "- %d doctors have been imported\n"
+msgstr "— %d лекара је увезено\n"
+
+#: .././libclinica/BackupEngine.vala:203
+msgid "Loading patients..."
+msgstr "Учитавам пацијенте..."
+
+#: .././libclinica/BackupEngine.vala:216
+#, c-format
+msgid "- %d patients have been imported\n"
+msgstr "— %d пацијената је увезено\n"
+
+#: .././libclinica/BackupEngine.vala:218
+msgid "Loading visits..."
+msgstr "Учитавам посете..."
+
+#: .././libclinica/BackupEngine.vala:231
+#, c-format
+msgid "- %d visits have been imported\n"
+msgstr "— %d посета је увезено\n"
+
+#: .././libclinica/BackupEngine.vala:233
+msgid "Loading events..."
+msgstr "Учитавам догађаје..."
+
+#: .././libclinica/BackupEngine.vala:249
 #, c-format
-msgid "Visits of the patient %s"
+msgid "- %d events have been imported\n"
+msgstr "— %d догађаја је увезено\n"
+
+#: .././libclinica/BackupEngine.vala:258
+msgid ""
+"- A FileStore was found but is not available in the current provider\n"
 msgstr ""
+"— Складиште датотека је пронађено али није доступно код текућег достављача\n"
+
+#: .././libclinica/BackupEngine.vala:283
+#, c-format
+msgid "- %d files have been imported\n"
+msgstr "— %d датотека је увезено\n"
+
+#: .././libclinica/BackupEngine.vala:287
+msgid "- No FileStore was found in the backup\n"
+msgstr "— Ниједно складиште датотека није пронађено у резерви\n"
 
-#: ../libclinica/PatientListStore.vala:86
-#: ../libclinica/PatientListStore.vala:132
+#: .././libclinica/BackupEngine.vala:298
+msgid "The import of the data has been completed successfully"
+msgstr "Увоз података је успешно завршен"
+
+#: .././libclinica/PatientListStore.vala:128
+#: .././libclinica/PatientListStore.vala:150
 msgid ""
 "Patients database seems corrupted. This is likely to be a bug in the "
 "application"
 msgstr ""
+"Изгледа да је оштећена база података пацијената. Ово је највероватније "
+"грешка у програму"
 
-#. Create menu items, connect them to their callback
-#. * and add it to the menu
-#: ../libclinica/DoctorContextMenu.vala:58
-#: ../libclinica/PatientContextMenu.vala:54
-msgid "Delete"
-msgstr ""
+#. Print the error message to stdout
+#: .././libclinica/Utils.vala:79
+msgid "ERROR => "
+msgstr "ГРЕШКА => "
 
-#. Instantiate menu items
-#: ../libclinica/DoctorContextMenu.vala:59
-#: ../libclinica/PatientContextMenu.vala:51
-msgid "Edit"
-msgstr ""
+#: .././libclinica/Utils.vala:83 .././libclinica/Utils.vala:84
+msgid "Clinica encountered an error"
+msgstr "Клиника је наишла на грешку"
 
-#: ../libclinica/PatientContextMenu.vala:57
-msgid "Edit visits"
-msgstr ""
+#: .././libclinica/LocalMedicinesDatabase.vala:90
+#, c-format
+msgid "Medicine with id = %lld not found in DB: %s"
+msgstr "Лек са иб-ом = %lld није пронађен у бази података: %s"
 
-#. Create the object and add the close button used
-#. * to dismiss the dialog
-#: ../libclinica/MedicineDetailDialog.vala:27
-msgid "Close"
-msgstr ""
+#: .././libclinica/LocalMedicinesDatabase.vala:119
+#, c-format
+msgid "Error inserting medicine in the database: %s"
+msgstr "Грешка уметања лека у базу података: %s"
 
-#: ../libclinica/MedicineDetailDialog.vala:46
-msgid "General information"
-msgstr ""
+#: .././libclinica/EventEditor.vala:93
+msgid "Create a new event"
+msgstr "Направите нови догађај"
 
-#. And now the content for the others fields of the medicine
-#: ../libclinica/MedicineDetailDialog.vala:52
-msgid "Identification Code"
-msgstr ""
+#: .././libclinica/EventEditor.vala:97
+#, c-format
+msgid "Editing event: %s"
+msgstr "Уређујем догађај: %s"
 
-#: ../libclinica/MedicineDetailDialog.vala:53
-msgid "Description"
-msgstr ""
+#. Create the entry for title of the event and venue
+#: .././libclinica/EventEditor.vala:115
+msgid "Title"
+msgstr "Наслов"
 
-#: ../libclinica/MedicineDetailDialog.vala:54
-msgid "Active ingredient"
-msgstr ""
+#: .././libclinica/EventEditor.vala:116
+msgid "Venue"
+msgstr "Место одржавања"
 
-#: ../libclinica/MedicineDetailDialog.vala:55
-msgid "Storage reccomendations"
-msgstr ""
+#: .././libclinica/EventEditor.vala:151
+msgid "Time:"
+msgstr "Време:"
 
-#: ../libclinica/MedicineDetailDialog.vala:64
-msgid "Additional notes"
-msgstr ""
+#: .././libclinica/EventEditor.vala:167
+msgid "Insert the description here..."
+msgstr "Овде унесите опис..."
 
-#: ../libclinica/MedicineDetailDialog.vala:90
-#: ../libclinica/VisitPrinter.vala:168
-msgid "Field empty"
-msgstr ""
+#: .././libclinica/EventEditor.vala:205 .././libclinica/VisitToolbar.vala:96
+#, c-format
+msgid "Patient"
+msgstr "Пацијент"
 
-#. First add a new visit and keep a reference to new_page
-#. *  to focus it on page loading.
-#. Create a new one and connect it
-#: ../libclinica/VisitBrowser.vala:62 ../libclinica/VisitBrowser.vala:184
-msgid "New visit"
-msgstr ""
+#: .././libclinica/EventEditor.vala:264
+msgid "Visit"
+msgstr "Посета"
 
-#: ../libclinica/VisitBrowser.vala:141
+#: .././libclinica/VisitListStore.vala:99
 msgid ""
-"A visit need to be saved in order to be exported as PDF.\n"
-"Do you want to save the visit now?"
+"Visit database seems corrupted. This is likely to be a bug in the application"
 msgstr ""
+"Изгледа да је оштећена база података посета. Ово је највероватније грешка у "
+"програму"
 
-#: ../libclinica/SettingsManager.vala:44
-msgid "Clinica settings"
-msgstr ""
+#: .././libclinica/MedicineSearchPage.vala:76
+#: .././data/resources/ui/start_page.glade.h:5
+msgid "Search medicines"
+msgstr "Потражите лекове"
 
-#. Create the use-plugins checkbox
-#: ../libclinica/SettingsManager.vala:56
-msgid "Use plugins (need restart)"
-msgstr ""
+#: .././libclinica/MedicineSearchPage.vala:100
+msgid "No search engine available"
+msgstr "Нема доступних погона претраге"
 
-#: ../libclinica/SettingsManager.vala:71
-msgid "General"
-msgstr ""
+#: .././libclinica/MedicineSearchPage.vala:108
+#, c-format
+msgid "Searching for %s..."
+msgstr "Тражим „%s“..."
 
-#: ../libclinica/SettingsManager.vala:75
-msgid "Plugins"
+#: .././libclinica/MedicineSearchPage.vala:133
+msgid "Medicines"
+msgstr "Лекови"
+
+#: .././libclinica/MedicineSearchPage.vala:96
+msgid "It's not possible to perform a search for medicine"
+msgstr "Није могуће извршити претрагу за лековима"
+
+#: .././libclinica/SqliteDataProvider.vala:143
+#, c-format
+msgid "Error creating some configuration files, check permission on %s"
 msgstr ""
+"Грешка стварања неких датотека подешавања, проверите овлашћења над %s"
+
+#: .././libclinica/SqliteDataProvider.vala:151
+#, c-format
+msgid "Error reading some configuration files, check permission on %s"
+msgstr "Грешка читања неких датотека подешавања, проверите овлашћења над %s"
 
-#: ../libclinica/SettingsManager.vala:113
+#: .././libclinica/SqliteDataProvider.vala:170
+#, c-format
+msgid "Failure while settings new database version to %s"
+msgstr "Неуспех приликом подешавања новог издања базе података на %s"
+
+#: .././libclinica/SqliteDataProvider.vala:173
+msgid "Failure while upgrading database"
+msgstr "Неуспех приликом надоградње базе података"
+
+#: .././libclinica/SqliteDataProvider.vala:177
+msgid "Version of the database is not compatible"
+msgstr "Издање базе података није сагласно"
+
+#: .././libclinica/SqliteDataProvider.vala:199
 msgid ""
-"Select the search engine\n"
-"used to find medicines"
+"This is a version of Clinica newer than the one that created the\n"
+"patients database installed on the system.\n"
+"Using this version requires upgrading the database, and\n"
+"<b>the old version will not be able to use it anymore</b>.\n"
+"Do you wish to perform this one-time upgrade?\n"
 msgstr ""
+"Ово издање Клинике је новије од оног које је створило \n"
+"базу података пацијената инсталирану на систему.\n"
+"Коришћење овог издања захтева надоградњу базе података, а\n"
+"<b>старо издање неће више бити у стању да је користи</b>.\n"
+"Да ли желите да извршите ову једновремену надоградњу?\n"
 
-#: ../libclinica/DoctorListStore.vala:73
-msgid "Doctors database seems corrupted."
-msgstr ""
+#: .././libclinica/SqliteDataProvider.vala:200
+msgid "Upgrade database"
+msgstr "Надогради базу података"
 
-#. Start of events
-#: ../libclinica/CalendarEventList.vala:70
-msgid "Events scheduled"
-msgstr ""
+#: .././libclinica/SqliteDataProvider.vala:225
+msgid "Database needs to be moved"
+msgstr "База података мора бити премештена"
 
-#: ../libclinica/CalendarEventList.vala:89
+#: .././libclinica/SqliteDataProvider.vala:226
 msgid ""
-"No events on this day.\n"
-"You can create a new event\n"
-"by clicking on the top-left button."
+"An older version of clinica has been detected and the old database has to be "
+"moved\n"
+"to a new location to continue.\n"
+"<b>The older version of clinica won't work anymore with this setup</b>.\n"
+"Do you still want to continue?"
+msgstr ""
+"Откривено је старије издање клинике а стара база података мора бити "
+"премештена\n"
+"на ново место да би се наставило.\n"
+"<b>Старије издање клинике више неће радити са овим подешавањем</b>.\n"
+"Да ли још увек желите да наставите?"
+
+#: .././libclinica/SqliteDataProvider.vala:239
+msgid ""
+"Error while transferring the database to the new default location for "
+"clinica >= 0.2.9"
 msgstr ""
+"Грешка приликом пребацивања базе података на ново основно место за клинику "
+">= 0.2.9"
 
-#: ../libclinica/CalendarEventList.vala:95
-msgid "Visits performed"
-msgstr ""
+#: .././libclinica/SqliteDataProvider.vala:251
+msgid "Error upgrading database, please check your installation"
+msgstr "Грешка надоградње базе података, проверите вашу инсталацију"
 
-#: ../libclinica/CalendarEventList.vala:115
-msgid "No visits performed on this day"
+#: .././libclinica/SqliteDataProvider.vala:266
+#, c-format
+msgid ""
+"Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %s"
 msgstr ""
+"Грешка надоградње базе података са издања 0.1 на 0.2, излазни код скулајта: "
+"%s"
+
+#: .././libclinica/SqliteDataProvider.vala:359
+#, c-format
+msgid "Error while retrieving the doctor with id = %s"
+msgstr "Грешка приликом потраживања доктора са иб-ом = %s"
+
+#: .././libclinica/SqliteDataProvider.vala:399
+#, c-format
+msgid "An error occurred while saving the doctor with id %d: %s"
+msgstr "Дошло је до грешке приликом чувања доктора са иб-ом %d: %s"
+
+#: .././libclinica/SqliteDataProvider.vala:468
+#, c-format
+msgid "Error while retrieving the patient with id = %s"
+msgstr "Грешка приликом потраживања пацијента са иб-ом = %s"
+
+#: .././libclinica/SqliteDataProvider.vala:517
+#: .././libclinica/SqliteDataProvider.vala:652
+#, c-format
+msgid "An error occurred while saving the doctor with id %s: %s"
+msgstr "Дошло је до грешке приликом чувања доктора са иб-ом %s: %s"
+
+#: .././libclinica/SqliteDataProvider.vala:597
+#, c-format
+msgid "Error while retrieving the visit with id = %s"
+msgstr "Грешка приликом потраживања посете са иб-ом = %s"
+
+#: .././libclinica/SqliteDataProvider.vala:686
+#, c-format
+msgid "Error while retrieving the event with id = %d"
+msgstr "Грешка приликом потраживања догађаја са иб-ом = %d"
+
+#: .././libclinica/SqliteDataProvider.vala:728
+#, c-format
+msgid "An error occurred while saving the event with id %s: %s"
+msgstr "Дошло је до грешке приликом чувања догађаја са иб-ом %s: %s"
+
+#: .././libclinica/SettingsManager.vala:40
+msgid "Clinica settings"
+msgstr "Подешавања Клинике"
+
+#: .././libclinica/SettingsManager.vala:52
+msgid "Clinica has been built without plugins support"
+msgstr "Клиника је изграђена без подршке прикључака"
+
+#: .././libclinica/SettingsManager.vala:135
+msgid "Please use the Network tab to enable the Networked data provider"
+msgstr "Користите језичак мреже да омогућите достављача мрежних података"
+
+#: .././libclinica/SettingsManager.vala:136
+msgid "Use the Network tab"
+msgstr "Користи језичак мреже"
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Disconnect"
+msgstr "Прекини везу"
+
+#: .././libclinica/SettingsManager.vala:166
+msgid "Connect"
+msgstr "Повежи се"
+
+#: .././libclinica/SettingsManager.vala:191
+#, c-format
+msgid "Connection to the given host failed. Please check your settings."
+msgstr "Веза са датим домаћином није успела. Проверите ваша подешавања."
 
-#: ../libclinica/VisitToolbar.vala:90
-msgid "This patient has not a doctor"
-msgstr ""
+#: .././libclinica/SettingsManager.vala:192
+msgid "Connection failed"
+msgstr "Повезивање није успело"
 
-#: ../libclinica/VisitToolbar.vala:93
+#: .././libclinica/SettingsManager.vala:206
+#: .././libclinica/ResourceManager.vala:284
 #, c-format
-msgid ""
-"Patient: <b>%s</b>\n"
-"Doctor: <b>%s</b>"
+msgid "Username or password are wrong. Disconnecting from the server."
 msgstr ""
+"Корисничко име или лозинка нису исправни. Прекидам везу са даваоцем услуга."
 
-#. Show more details on this patient
-#: ../libclinica/VisitActions.vala:61
-msgid "Edit patient details"
-msgstr ""
+#: .././libclinica/SettingsManager.vala:207
+msgid "Wrong authentication data has been provided"
+msgstr "Погрешни подаци пријаве"
 
-#. Save the visit as a PDF file
-#: ../libclinica/VisitActions.vala:71
-msgid "Save as PDF"
-msgstr ""
+#: .././libclinica/VisitActions.vala:60
+msgid "Edit details of patient"
+msgstr "Уредите појединости пацијента"
 
-#: ../libclinica/EventEditor.vala:93
-msgid "Create a new event"
-msgstr ""
+#: .././libclinica/VisitActions.vala:67
+msgid "Remove this visit"
+msgstr "Уклоните ову посету"
 
-#: ../libclinica/EventEditor.vala:97
-#, c-format
-msgid "Editing event: %s"
-msgstr ""
+#: .././libclinica/VisitActions.vala:74
+msgid "Export this visit as PDF"
+msgstr "Извезите ову посету као ПДФ"
 
-#. Create the entry for title of the event and venue
-#: ../libclinica/EventEditor.vala:114
-msgid "Title"
-msgstr ""
+#: .././libclinica/VisitActions.vala:81
+msgid "Print a report of this visit"
+msgstr "Одштампајте извештај ове посете"
 
-#: ../libclinica/EventEditor.vala:115
-msgid "Venue"
-msgstr ""
+#: .././libclinica/VisitActions.vala:88
+msgid "Save this visit"
+msgstr "Сачувајте ову посету"
 
-#: ../libclinica/EventEditor.vala:144
-msgid "Time:"
-msgstr ""
+#: .././libclinica/VisitActions.vala:99
+msgid "Close the visits of this patient"
+msgstr "Затворите посете овог пацијента"
 
-#: ../libclinica/EventEditor.vala:160
-msgid "Insert the description here..."
-msgstr ""
+#: .././libclinica/VisitToolbar.vala:93
+msgid "This patient has not a doctor"
+msgstr "Овај пацијент нема доктора"
 
-#: ../libclinica/EventEditor.vala:198
-msgid "Patient"
-msgstr ""
+#: .././libclinica/VisitToolbar.vala:97
+msgid "Doctor"
+msgstr "Лекар"
 
-#: ../libclinica/EventEditor.vala:255
-msgid "Visit"
-msgstr ""
+#: .././libclinica/DateTimePicker.vala:56
+msgid "Hour"
+msgstr "Сат"
+
+#: .././libclinica/DateTimePicker.vala:58
+msgid "Minute"
+msgstr "Минут"
+
+#: .././libclinica/DoctorListStore.vala:75
+msgid "Doctors database seems corrupted."
+msgstr "База података доктора изгледа да је оштећена."
 
-#: ../libclinica/DoctorListView.vala:175
+#: .././libclinica/DoctorListView.vala:175
 msgid "Select a doctor to delete it!"
-msgstr ""
+msgstr "Изаберите доктора да га обришете!"
 
-#: ../libclinica/DoctorListView.vala:186
+#: .././libclinica/DoctorListView.vala:186
 msgid ""
-"The doctor that you have selected for removal has some patients "
-"associated. \n"
+"The doctor that you have selected for removal has some patients associated. "
+"\n"
 msgstr ""
+"Доктор кога сте изабрали за уклањање има придружене неке пацијенте. \n"
 
-#: ../libclinica/DoctorListView.vala:187
+#: .././libclinica/DoctorListView.vala:187
 msgid ""
-"It's not possible to remove it without removing all his patients.\n"
+"It's not possible to remove it without disassociating all his patients.\n"
 "\n"
 msgstr ""
+"Не можете да га уклоните а да га не раздружите од његових пацијената.\n"
+"\n"
 
-#: ../libclinica/DoctorListView.vala:188 ../libclinica/DoctorListView.vala:221
+#: .././libclinica/DoctorListView.vala:188
+#: .././libclinica/DoctorListView.vala:217
 msgid "Do you really want to proceed?"
-msgstr ""
+msgstr "Да ли заиста желите да наставите?"
 
-#: ../libclinica/DoctorListView.vala:189
+#: .././libclinica/DoctorListView.vala:189
 msgid "Doctor has associated patients"
-msgstr ""
+msgstr "Доктор има придружене пацијенте"
 
-#: ../libclinica/DoctorListView.vala:219
-msgid "The following patients will be deleted by this action:\n"
-msgstr ""
+#: .././libclinica/DoctorListView.vala:215
+msgid ""
+"The following patients will be disassociated from this doctor by this "
+"action:\n"
+msgstr "Овом радњом следећи пацијенти ће бити раздружени од овог доктора:\n"
 
-#: ../libclinica/DoctorListView.vala:222
-msgid "Confirm deletion of patients"
-msgstr ""
+#: .././libclinica/DoctorListView.vala:218
+msgid "Confirm disassociation of patients"
+msgstr "Потврди раздруживање пацијената"
 
-#: ../libclinica/DoctorListView.vala:244
-msgid "Really delete this doctor? All information about him/her will be lost."
+#: .././libclinica/DoctorListView.vala:235
+msgid ""
+"Really delete this doctor? All information about him/her will be lost."
 msgstr ""
+"Стварно да обришем овог доктора? Сви подаци о њему/њој ће бити изгубљени."
 
-#. Anamnesis
-#: ../libclinica/VisitTab.vala:258 ../libclinica/VisitPrinter.vala:68
-msgid "Anamnesis"
-msgstr ""
+#. Ask the user where he would like to backup its files.
+#: .././libclinica/UserInterface.vala:360
+msgid "Select the folder where the data should be saved"
+msgstr "Изаберите фасциклу у којој ће се чувати подаци"
 
-#. Physical examination
-#: ../libclinica/VisitTab.vala:261 ../libclinica/VisitPrinter.vala:71
-msgid "Physical examination"
-msgstr ""
+#. In this string %s refers to the path where the backup has been performed.
+#: .././libclinica/UserInterface.vala:386
+#, c-format
+msgid "Backup completed successfully in the folder %s"
+msgstr "Стварање резерве је успешно обављено у фасцикли „%s“"
 
-#. Laboratory Exam
-#: ../libclinica/VisitTab.vala:264 ../libclinica/VisitPrinter.vala:74
-msgid "Laboratory exam"
-msgstr ""
+#: .././libclinica/UserInterface.vala:387
+msgid "Backup completed"
+msgstr "Прављење резерве је завршено"
 
-#: ../libclinica/VisitTab.vala:267
-msgid "Hystopathology"
+#: .././libclinica/UserInterface.vala:389
+msgid ""
+"Please take care of copying the folder in a safe place for future restore of "
+"the data."
 msgstr ""
+"Постарајте се да умножите фасциклу на безбедно место за будуће враћање "
+"података."
 
-#. Diagnosis
-#: ../libclinica/VisitTab.vala:270 ../libclinica/VisitPrinter.vala:80
-msgid "Diagnosis"
-msgstr ""
+#: .././libclinica/UserInterface.vala:416
+#, c-format
+msgid "Cannot open the help: %s"
+msgstr "Не могу да отворим помоћ: %s"
 
-#. Topical therapy
-#: ../libclinica/VisitTab.vala:273 ../libclinica/VisitPrinter.vala:83
-msgid "Topical therapy"
+#: .././libclinica/UserInterface.vala:441
+msgid ""
+"An error occurred while opening the bug system. Please go to\n"
+"http://launchpad.net/clinica-project/ to file a bug"
 msgstr ""
+"Дошло је до грешке приликом отварања система грешака. Молим идите на\n"
+"http://launchpad.net/clinica-project/ да пријавите грешку"
 
-#. Systemic therapy
-#: ../libclinica/VisitTab.vala:276 ../libclinica/VisitPrinter.vala:86
-msgid "Systemic therapy"
-msgstr ""
+#: .././libclinica/EventDetail.vala:65
+msgid "Edit event"
+msgstr "Уреди догађај"
 
-#. Subsequent checks
-#: ../libclinica/VisitTab.vala:279 ../libclinica/VisitPrinter.vala:89
-msgid "Subsequent checks"
-msgstr ""
+#: .././libclinica/EventDetail.vala:112
+msgid "Remove"
+msgstr "Уклони"
 
-#: ../libclinica/PluginManager.vala:35
-msgid ""
-"Clinica is extensible via plugins and you can easily enable\n"
-" and disable them using this window."
-msgstr ""
+#: .././libclinica/EventDetail.vala:145
+msgid "Really delete this event?"
+msgstr "Да обришем овај догађај?"
 
-#: ../libclinica/CalendarWindow.vala:36
-msgid "Clinica calendar"
-msgstr ""
+#: .././libclinica/Sidebar.vala:68
+msgid "Pages"
+msgstr "Странице"
 
-#. Histopathology
-#: ../libclinica/VisitPrinter.vala:77
-msgid "Histopathology"
+#: .././libclinica/StartPage.vala:93
+msgid "Dashboard"
+msgstr "Полазна табла"
+
+#: .././libclinica/StartPage.vala:205
+msgid ""
+"Add a new patient \n"
+" with name "
 msgstr ""
+"Додајте новог пацијента \n"
+" који се зове "
 
-#: ../libclinica/EventListStore.vala:93
+#: .././libclinica/EventListStore.vala:121
 msgid ""
 "Events database seems corrupted. This is likely to be a bug in the "
 "application"
 msgstr ""
+"Изгледа да је оштећена база података догађаја. Ово је највероватније грешка "
+"у програму"
 
-#. Set title of edit doctor dialog, space is important!
-#: ../libclinica/DoctorEditor.vala:91
-#, c-format
-msgid "Edit doctor named %s"
-msgstr ""
+#: .././libclinica/DoctorListPage.vala:60
+#: .././libclinica/DoctorListPage.vala:93
+msgid "Doctors"
+msgstr "Доктори"
 
-#: ../libclinica/ResourceManager.vala:184
-#, c-format
-msgid "Error creating some configuration files, check permission on %s"
-msgstr ""
+#: .././libclinica/DoctorListPage.vala:76
+msgid "Add a doctor"
+msgstr "Додајте лекара"
 
-#: ../libclinica/ResourceManager.vala:192
-#, c-format
-msgid "Error reading some configuration files, check permission on %s"
-msgstr ""
+#: .././libclinica/DoctorListPage.vala:82
+msgid "Edit the selected doctor"
+msgstr "Уредите изабраног лекара"
 
-#: ../libclinica/ResourceManager.vala:211
-#, c-format
-msgid "Failure while settings new database version to %s"
-msgstr ""
+#: .././libclinica/DoctorListPage.vala:88
+msgid "Remove the selected doctor"
+msgstr "Уклоните изабраног лекара"
 
-#: ../libclinica/ResourceManager.vala:214
-msgid "Failure while upgrading database"
-msgstr ""
+#: .././libclinica/ResourceManager.vala:285
+msgid "Error while authenticating on the server"
+msgstr "Дошло је до грешке приликом потврђивања идентитета на серверу"
 
-#: ../libclinica/ResourceManager.vala:218
-msgid "Version of the database is not compatible"
-msgstr ""
+#: .././libclinica/AboutDialog.vala:41
+msgid "Medical records manager"
+msgstr "Управник медицинских записа"
 
-#: ../libclinica/ResourceManager.vala:293
-msgid ""
-"This is a version of Clinica newer than the one that created the\n"
-"patients database installed on the system.\n"
-"Using this version requires upgrading the database, and\n"
-"<b>the old version will not be able to use it anymore</b>.\n"
-"Do you wish to perform this one-time upgrade?\n"
-msgstr ""
+#: .././libclinica/AboutDialog.vala:43
+msgid "About Clinica"
+msgstr "О Клиници"
 
-#: ../libclinica/ResourceManager.vala:294
-msgid "Upgrade database"
-msgstr ""
+#: .././libclinica/AboutDialog.vala:52
+msgid "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+msgstr "Леонардо Робол <robol at poisson.phc.unipi.it>\n"
 
-#: ../libclinica/ResourceManager.vala:375
-msgid "Error upgrading database, please check your installation"
-msgstr ""
+#: .././libclinica/AboutDialog.vala:53
+msgid "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+msgstr "Ђанмарко Броки <brocchi at poisson.phc.unipi.it>\n"
+
+#. Histopathology
+#: .././libclinica/VisitPrinter.vala:122
+msgid "Histopathology"
+msgstr "Хистопатологија"
 
-#: ../libclinica/ResourceManager.vala:390
+#. Now write the date of the visit after that
+#: .././libclinica/VisitPrinter.vala:285
 #, c-format
-msgid ""
-"Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %d"
-msgstr ""
+msgid "Report of the visit of %s"
+msgstr "Извештај о посети %s"
 
-#: ../libclinica/AboutDialog.vala:40
-msgid "Medical records manager"
-msgstr ""
+#: .././libclinica/VisitPrinter.vala:316
+#: .././libclinica/MedicineDetailDialog.vala:109
+msgid "Field empty"
+msgstr "Празно поље"
 
-#: ../libclinica/AboutDialog.vala:42
-msgid "About Clinica"
-msgstr ""
+#. Add a Attach button
+#: .././libclinica/VisitFileManager.vala:89
+msgid "Attach file"
+msgstr "Приложи датотеку"
 
-#: ../libclinica/AboutDialog.vala:51
-msgid "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
-msgstr ""
+#: .././libclinica/VisitFileManager.vala:97
+msgid "Browse files"
+msgstr "Разгледај датотеке"
 
-#: ../libclinica/AboutDialog.vala:52
-msgid "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
-msgstr ""
+#: .././libclinica/VisitFileManager.vala:113
+msgid "Select a file to attach"
+msgstr "Изаберите датотеку за прилагање"
+
+#: .././libclinica/VisitFileManager.vala:133
+msgid "Unable to open the browser on the filestore position"
+msgstr "Не могу да отворим прегледника на положају радње датотека"
 
-#. Start of LAUNCHPAD contributions. Each one is indented
-#. * of two spaces
-#: ../libclinica/AboutDialog.vala:56
+#: .././libclinica/VisitFileManager.vala:163
 msgid ""
-"\n"
-"Launchpad contributions: \n"
+"Save the visit\n"
+" to attach files"
 msgstr ""
+"Сачувајте посету\n"
+" у датотеке прилога"
 
-#: ../libclinica/DoctorListPage.vala:70
-msgid "Doctors"
-msgstr ""
+#: .././libclinica/VisitFileManager.vala:170
+msgid "Attach files"
+msgstr "Приложи датотеку"
 
-#. And the button to go back
-#: ../libclinica/MedicineSearchPage.vala:42
-#: ../libclinica/MedicineSearchPage.vala:72
-msgid "Back"
-msgstr ""
+#: .././libclinica/SidebarCalendarEntry.vala:30
+msgid "Calendar"
+msgstr "Календар"
 
-#: ../libclinica/MedicineSearchPage.vala:94
-msgid "No search engine available"
-msgstr ""
+#. Create the object and add the close button used
+#. * to dismiss the dialog
+#: .././libclinica/MedicineDetailDialog.vala:46
+msgid "Close"
+msgstr "Затвори"
+
+#: .././libclinica/MedicineDetailDialog.vala:65
+msgid "General information"
+msgstr "Општи подаци"
+
+#. And now the content for the others fields of the medicine
+#: .././libclinica/MedicineDetailDialog.vala:71
+msgid "Identification Code"
+msgstr "Шифра за препознавање"
+
+#: .././libclinica/MedicineDetailDialog.vala:72
+msgid "Description"
+msgstr "Опис"
+
+#: .././libclinica/MedicineDetailDialog.vala:73
+msgid "Active ingredient"
+msgstr "Активан састојак"
+
+#: .././libclinica/MedicineDetailDialog.vala:74
+msgid "Storage reccomendations"
+msgstr "Препоруке складиштења"
+
+#: .././libclinica/MedicineDetailDialog.vala:83
+msgid "Additional notes"
+msgstr "Додатне белешке"
 
-#: ../libclinica/MedicineSearchPage.vala:102
+#. Nothing to do for now.
+#: .././libclinica/FileDetail.vala:89
 #, c-format
-msgid "Searching for %s..."
-msgstr ""
+msgid "Error while loading icon for file %s: %s"
+msgstr "Грешка приликом учитавања иконице за датотеку %s: %s"
 
-#: ../libclinica/MedicineSearchPage.vala:104
-msgid "Stop"
-msgstr ""
+#: .././libclinica/FileDetail.vala:98
+msgid "Open file"
+msgstr "Отвори датотеку"
 
-#: ../libclinica/MedicineSearchPage.vala:127
-msgid "Medicine search"
-msgstr ""
+#: .././libclinica/FileDetail.vala:110
+msgid "Delete file"
+msgstr "Обриши датотеку"
 
-#: ../libclinica/MedicineSearchPage.vala:90
-msgid "It's not possible to perform a search for medicine"
+#: .././libclinica/FileDetail.vala:122
+#, c-format
+msgid ""
+"Do you really want to delete the file %s?\n"
+"If you proceed it will be definitively lost."
 msgstr ""
+"Да ли заиста желите да обришете датотеку „%s“?\n"
+"Ако наставите биће неповратно изгубљена."
 
-#: ../clinica/Clinica.vala:57
+#: .././libclinica/FileDetail.vala:135
 #, c-format
-msgid "Clinica %s\n"
-msgstr ""
+msgid "Error while opening the file %s"
+msgstr "Грешка приликом отварања датотеке „%s“"
+
+#: .././data/resources/ui/start_page.glade.h:1
+msgid "Browse the patients to start a visit"
+msgstr "Разгледајте пацијенте да започнете посету"
 
-#: ../ui/new_button.glade.h:1
+#: .././data/resources/ui/start_page.glade.h:2
 msgid "Add new patient"
-msgstr ""
+msgstr "Додајте новог пацијента"
 
-#: ../ui/new_button.glade.h:2
-msgid "Browse the patients to start a visit"
-msgstr ""
+#: .././data/resources/ui/start_page.glade.h:3
+msgid "Patient list"
+msgstr "Списак пацијената"
 
-#: ../ui/new_button.glade.h:3
+#: .././data/resources/ui/start_page.glade.h:4
 msgid "Doctor list"
-msgstr ""
+msgstr "Списак доктора"
 
-#: ../ui/new_button.glade.h:4
+#: .././data/resources/ui/start_page.glade.h:6
 msgid "Open calendar"
-msgstr ""
+msgstr "Отвори календар"
 
-#: ../ui/new_button.glade.h:5
-msgid "Patient list"
+#: .././data/resources/ui/authentication_dialog.glade.h:1
+msgid "The server requires authentication. Please insert your credentials:"
 msgstr ""
+"Давалац услуга захтева пријаву. Молим, унесите ваше податке распознавања:"
 
-#: ../ui/new_button.glade.h:6
-msgid "Search medicines"
-msgstr ""
+#: .././data/resources/ui/authentication_dialog.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:11
+msgid "Username"
+msgstr "Корисничко име"
 
-#: ../ui/window.glade.h:1
-msgid "Clinica"
-msgstr ""
+#: .././data/resources/ui/authentication_dialog.glade.h:3
+#: .././data/resources/ui/settings_window.glade.h:12
+msgid "Password"
+msgstr "Лозинка"
 
-#: ../ui/window.glade.h:2
-msgid "New Doctor"
-msgstr ""
+#: .././data/resources/ui/medicine_editor.glade.h:1
+msgid "Name:"
+msgstr "Назив:"
 
-#: ../ui/window.glade.h:3
-msgid "New Patient"
-msgstr ""
+#: .././data/resources/ui/medicine_editor.glade.h:2
+msgid "Description:"
+msgstr "Опис:"
 
-#: ../ui/window.glade.h:4
-msgid "_About"
-msgstr ""
+#: .././data/resources/ui/medicine_editor.glade.h:3
+msgid "Active ingredient:"
+msgstr "Главни састојак:"
 
-#: ../ui/window.glade.h:5
-msgid "_Contents"
-msgstr "_Садржај"
+#: .././data/resources/ui/medicine_editor.glade.h:4
+msgid "Storage reccomendations:"
+msgstr "Препоруке складиштења:"
 
-#: ../ui/window.glade.h:6
-msgid "_Doctors"
-msgstr ""
+#: .././data/resources/ui/medicine_editor.glade.h:5
+msgid "Price:"
+msgstr "Цена:"
 
-#: ../ui/window.glade.h:7
-msgid "_File"
-msgstr "_Датотека"
+#: .././data/resources/ui/medicine_editor.glade.h:6
+msgid "Other notes:"
+msgstr "Остале напомене:"
 
-#: ../ui/window.glade.h:8
-msgid "_Help"
-msgstr "По_моћ"
+#: .././data/resources/ui/import_dialog.glade.h:1
+msgid "Source:\t"
+msgstr "Извор:\t"
 
-#: ../ui/window.glade.h:9
-msgid "_Home"
-msgstr "_Почетак"
+#: .././data/resources/ui/import_dialog.glade.h:2
+msgid "Select the backup folder"
+msgstr "Изаберите фасциклу резерве"
 
-#: ../ui/window.glade.h:10
-msgid "_Patients"
+#: .././data/resources/ui/import_dialog.glade.h:3
+msgid ""
+"<b>Warning:</b> Please note that the current data in the database <b>will be "
+"definitely lost</b>. Consider performing a backup of the current data before "
+"importing the old one."
 msgstr ""
+"<b>Упозорење:</b> Знајте да ће текући подаци у бази података <b>бити трајно "
+"изгубљени</b>. Размотрите стварање резерве текућих података пре увоза старих."
 
-#: ../ui/window.glade.h:11
-msgid "_Quit"
-msgstr ""
+#: .././data/resources/ui/doctor_editor.glade.h:1
+#: .././data/resources/ui/patient_editor.glade.h:12
+msgid "Doctor:"
+msgstr "Доктор:"
 
-#: ../ui/window.glade.h:12
-msgid "_Search medicines"
-msgstr ""
+#: .././data/resources/ui/doctor_editor.glade.h:4
+#: .././data/resources/ui/patient_editor.glade.h:11
+msgid "Phone:"
+msgstr "Телефон:"
 
-#: ../ui/window.glade.h:13
-msgid "_Settings"
-msgstr "По_дешавања"
+#: .././data/resources/ui/doctor_editor.glade.h:5
+msgid "Mobile:"
+msgstr "Мобилни:"
 
-#: ../ui/window.glade.h:14
-msgid "_Tools"
-msgstr "_Алати"
+#: .././data/resources/ui/wait_dialog.glade.h:1
+msgid "label"
+msgstr "ознака"
 
-#: ../ui/window.glade.h:15
-msgid "_View"
-msgstr "_Преглед"
+#: .././data/resources/ui/settings_window.glade.h:1
+msgid "Use plugins (restart required)"
+msgstr "Користи прикључке (потребно је поновно покретање)"
 
-#: ../ui/patient_editor.glade.h:1
-msgid "/"
-msgstr "/"
+#: .././data/resources/ui/settings_window.glade.h:2
+msgid "Allow to browse files in visits"
+msgstr "Допусти прегледање датотека у посетама"
 
-#: ../ui/patient_editor.glade.h:2
-msgid "Address:"
-msgstr "Адреса:"
+#: .././data/resources/ui/settings_window.glade.h:3
+msgid "Medicines search engine"
+msgstr "Погон претраге за лековима"
 
-#: ../ui/patient_editor.glade.h:3
-msgid "Codice fiscale:"
-msgstr ""
+#: .././data/resources/ui/settings_window.glade.h:4
+msgid "Data source"
+msgstr "Извор података"
 
-#: ../ui/patient_editor.glade.h:4
-msgid "Create a new patient"
-msgstr ""
+#: .././data/resources/ui/settings_window.glade.h:5
+msgid "General"
+msgstr "Опште"
 
-#: ../ui/patient_editor.glade.h:5
-msgid "Date of birth:"
-msgstr ""
+#: .././data/resources/ui/settings_window.glade.h:6
+msgid "Host"
+msgstr "Домаћин"
 
-#: ../ui/patient_editor.glade.h:6 ../ui/doctor_editor.glade.h:2
-msgid "Doctor:"
+#: .././data/resources/ui/settings_window.glade.h:7
+msgid "Port"
+msgstr "Прикључник"
+
+#: .././data/resources/ui/settings_window.glade.h:8
+msgid "button"
+msgstr "дугме"
+
+#: .././data/resources/ui/settings_window.glade.h:9
+msgid "Connection to a remote Clinica instance"
+msgstr "Веза са удаљеним примерком Клинике"
+
+#: .././data/resources/ui/settings_window.glade.h:10
+msgid "Allow connections of other clinica from the LAN"
+msgstr "Допусти повезивање других клиника са локалне мреже"
+
+#: .././data/resources/ui/settings_window.glade.h:13
+msgid "Built-in server"
+msgstr "Уграђени давалац услуга"
+
+#: .././data/resources/ui/settings_window.glade.h:14
+msgid "Network"
+msgstr "Мрежа"
+
+#: .././data/resources/ui/settings_window.glade.h:15
+msgid ""
+"The details that are inserted here will be used when generating\n"
+"the automatic visit reports. "
 msgstr ""
+"Подаци унесени овде ће бити коришћени при самосталном израђивању\n"
+"извештаја посета. "
 
-#: ../ui/patient_editor.glade.h:7
-msgid "Female"
-msgstr "Женски"
+#: .././data/resources/ui/settings_window.glade.h:18
+msgid "Address"
+msgstr "Адреса"
 
-#: ../ui/patient_editor.glade.h:8
-msgid "Gender:"
-msgstr "Пол:"
+#: .././data/resources/ui/settings_window.glade.h:19
+msgid "Institution"
+msgstr "Институција"
 
-#: ../ui/patient_editor.glade.h:9
-msgid "Male"
-msgstr "Мушки"
+#: .././data/resources/ui/settings_window.glade.h:20
+msgid "Email"
+msgstr "Електронска пошта"
+
+#: .././data/resources/ui/settings_window.glade.h:21
+msgid "Personal details"
+msgstr "Личне појединости"
+
+#: .././data/resources/ui/settings_window.glade.h:22
+msgid "Plugins"
+msgstr "Прикључци"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:1
+msgid "Visits"
+msgstr "Посете"
+
+#: .././data/resources/ui/patient_list_sidebar.glade.h:2
+msgid "Schedule a visit"
+msgstr "Испланирајте посету"
 
-#: ../ui/patient_editor.glade.h:11
+#: .././data/resources/ui/patient_editor.glade.h:1
 msgid "Patient:"
-msgstr ""
+msgstr "Пацијент:"
 
-#: ../ui/patient_editor.glade.h:12 ../ui/doctor_editor.glade.h:5
-msgid "Phone:"
-msgstr "Телефон:"
+#: .././data/resources/ui/patient_editor.glade.h:4
+msgid "Gender:"
+msgstr "Пол:"
+
+#: .././data/resources/ui/patient_editor.glade.h:5
+msgid "Date of birth:"
+msgstr "Датум рођења:"
 
-#: ../ui/patient_editor.glade.h:14
+#: .././data/resources/ui/patient_editor.glade.h:6
 msgid "dd"
-msgstr "дд"
+msgstr "дан"
+
+#: .././data/resources/ui/patient_editor.glade.h:7
+msgid "/"
+msgstr "/"
 
-#: ../ui/patient_editor.glade.h:15
+#: .././data/resources/ui/patient_editor.glade.h:8
 msgid "mm"
-msgstr "мм"
+msgstr "месец"
 
-#: ../ui/patient_editor.glade.h:16
+#: .././data/resources/ui/patient_editor.glade.h:9
 msgid "yyyy"
-msgstr "гггг"
+msgstr "година"
 
-#: ../ui/patient_list_sidebar.glade.h:1
-msgid "Visits"
-msgstr ""
+#: .././data/resources/ui/patient_editor.glade.h:10
+msgid "Address:"
+msgstr "Адреса:"
 
-#: ../ui/doctor_editor.glade.h:1
-msgid "Create a new doctor"
+#: .././data/resources/ui/patient_editor.glade.h:13
+msgid "Codice fiscale:"
+msgstr "ЈМБГ:"
+
+#: .././data/resources/ui/patient_editor.glade.h:14
+msgid "Male"
+msgstr "Мушки"
+
+#: .././data/resources/ui/patient_editor.glade.h:15
+msgid "Female"
+msgstr "Женски"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:1
+msgid "Select the date on which you'd like to schedule the visit."
+msgstr "Изаберите датум када желите да закажете посету."
+
+#: .././data/resources/ui/visit_scheduler.glade.h:2
+msgid "Selected patient"
+msgstr "Изабрани пацијент"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:3
+msgid ""
+"<b>Tip:</b> Once created this visit will be visible in the visit editor of "
+"this patient."
 msgstr ""
+"<b>Савет:</b> Једном направљена ова посета ће бити видљива у уређивачу "
+"посета за овог пацијента."
 
-#: ../ui/doctor_editor.glade.h:3
-msgid "Mobile:"
-msgstr "Мобилни:"
+#~ msgid "_Home"
+#~ msgstr "_Почетак"
+
+#~ msgid "Use plugins (need restart)"
+#~ msgstr "Користи прикључке (тражи поновно покретање)"
+
+#~ msgid ""
+#~ "Select the search engine\n"
+#~ "used to find medicines"
+#~ msgstr ""
+#~ "Изаберите погон претраге\n"
+#~ "коришћен за налажење лекова"
+
+#, c-format
+#~ msgid ""
+#~ "Patient: <b>%s</b>\n"
+#~ "Doctor: <b>%s</b>"
+#~ msgstr ""
+#~ "Пацијент: <b>%s</b>\n"
+#~ "Доктор: <b>%s</b>"
diff --git a/po/tr.po b/po/tr.po
index 4542842..be22a1a 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -7,651 +7,1355 @@ msgid ""
 msgstr ""
 "Project-Id-Version: clinica-project\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-12-19 07:28+0100\n"
-"PO-Revision-Date: 2011-08-01 18:07+0000\n"
-"Last-Translator: zeugma <Unknown>\n"
+"POT-Creation-Date: 2013-04-18 10:23+0200\n"
+"PO-Revision-Date: 2013-05-27 19:27+0000\n"
+"Last-Translator: Ali Bulut <tabipbulut at gmail.com>\n"
 "Language-Team: Turkish <tr at li.org>\n"
-"Language: tr\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-11-20 06:07+0000\n"
-"X-Generator: Launchpad (build 14299)\n"
+"X-Launchpad-Export-Date: 2013-05-28 05:49+0000\n"
+"X-Generator: Launchpad (build 16640)\n"
+"Language: tr\n"
 
-#: ../libclinica/Doctor.vala:110
-msgid ""
-"You cannot delete a doctor with associated patients. Delete his patients "
-"first."
-msgstr ""
+#: .././plugins/AgenziaDelFarmaco.py:166
+msgid "Dosage form"
+msgstr "Doz formu"
 
-#: ../libclinica/VisitListStore.vala:103
-msgid ""
-"Visit database seems corrupted. This is likely to be a bug in the application"
-msgstr ""
+#: .././plugins/AgenziaDelFarmaco.py:167
+msgid "System of supply"
+msgstr "Uygulama sistemi"
+
+#: .././plugins/AgenziaDelFarmaco.py:168
+msgid "Class of eligibility"
+msgstr "Uygunluk sınıfı"
 
-#: ../libclinica/UserInterface.vala:282
+#: .././plugins/AgenziaDelFarmaco.py:169
+msgid "Firm"
+msgstr "Sıkı"
+
+#. Title of edit doctor dialog
+#: .././libclinica/DoctorEditor.vala:88
 #, c-format
-msgid "Cannot open the help: %s"
-msgstr ""
+msgid "Edit doctor named %s"
+msgstr "Hekim ismini düzenle %s"
+
+#: .././libclinica/PatientLens.vala:37
+msgid "Search for patients"
+msgstr "Hasta ara"
 
-#: ../libclinica/PatientListPage.vala:74
+#: .././libclinica/PatientLens.vala:43
+msgid "Recently visited patients"
+msgstr "Yeni muayene edilen hastalar"
+
+#. Create the SidebarEntry
+#: .././libclinica/PatientLens.vala:47 .././libclinica/PatientListPage.vala:64
+#: .././libclinica/PatientListPage.vala:110
 msgid "Patients"
-msgstr ""
+msgstr "Hastalar"
 
-#: ../libclinica/PatientListView.vala:76
-#: ../libclinica/MedicineTreeView.vala:18 ../libclinica/DoctorListView.vala:51
-#: ../ui/patient_editor.glade.h:10 ../ui/doctor_editor.glade.h:4
+#: .././libclinica/PatientListView.vala:76
+#: .././libclinica/DoctorListView.vala:51
+#: .././data/resources/ui/doctor_editor.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:17
+#: .././data/resources/ui/patient_editor.glade.h:2
 msgid "Name"
-msgstr "İsim"
+msgstr "Ad"
 
 #. ...and then the surname column
-#: ../libclinica/PatientListView.vala:80 ../libclinica/DoctorListView.vala:56
-#: ../ui/patient_editor.glade.h:13 ../ui/doctor_editor.glade.h:6
+#: .././libclinica/PatientListView.vala:80
+#: .././libclinica/DoctorListView.vala:56
+#: .././data/resources/ui/doctor_editor.glade.h:3
+#: .././data/resources/ui/patient_editor.glade.h:3
 msgid "Surname"
-msgstr "Soyadı"
+msgstr "Soyad"
 
-#: ../libclinica/PatientListView.vala:174
+#: .././libclinica/PatientListView.vala:165
 msgid "Select a patient to delete it!"
-msgstr ""
+msgstr "Silmek için hasta seçiniz!"
 
-#: ../libclinica/PatientListView.vala:181
+#: .././libclinica/PatientListView.vala:172
 msgid ""
 "Really delete this patient? All information about him/her and the associated "
 "visits will be lost."
 msgstr ""
+"Gerçekten bu hastayı silmek istiyor musunuz? Hastanın tüm bilgileri ve "
+"muayeneleri kaybedilecektir."
 
-#. Print the error message to stdout
-#: ../libclinica/Utils.vala:79
-msgid "ERROR => "
+#. Set title according to the patient that we have loaded and connect
+#. * show startup signal to the focusing of the first field in the visit
+#: .././libclinica/VisitPage.vala:63
+#, c-format
+msgid "Visit of the patient %s"
+msgstr "Hastanın muayenesi %s"
+
+#: .././libclinica/PluginManager.vala:35
+msgid ""
+"Clinica is extensible via plugins and you can easily enable\n"
+" and disable them using this window."
 msgstr ""
+"Clinica eklentiler ile geliştirilebilir ve kolayca ulaşılabilir\n"
+" ve bu pencereyi kullanarak devredışı bırakınız."
 
-#: ../libclinica/Utils.vala:83 ../libclinica/Utils.vala:84
-msgid "Clinica encountered an error"
+#: .././libclinica/VisitSchedulerDialog.vala:60
+#: .././libclinica/VisitSchedulerDialog.vala:76
+msgid "Patient not selected"
+msgstr "Hasta seçilmedi"
+
+#: .././libclinica/VisitSchedulerDialog.vala:72
+#, c-format
+msgid "Schedule a vist for the patient %s"
+msgstr "Hasta için muayene takvimi belirle %s"
+
+#: .././libclinica/Application.vala:113
+#, c-format
+msgid "Option parsing failed: %s\n"
+msgstr "Seçenek ayrıştırma başarısız: %s\n"
+
+#: .././libclinica/Application.vala:148
+#, c-format
+msgid "Clinica %s\n"
+msgstr "Clinica %s\n"
+
+#. Then add add a new visit and keep a reference to new_page
+#. *  to focus it on page loading.
+#. Create a new one and connect it
+#: .././libclinica/VisitBrowser.vala:73 .././libclinica/VisitBrowser.vala:252
+msgid "New visit"
+msgstr "Yeni muayene"
+
+#: .././libclinica/VisitBrowser.vala:152 .././libclinica/VisitBrowser.vala:209
+msgid ""
+"A visit need to be saved in order to be exported as PDF.\n"
+"Do you want to save the visit now?"
 msgstr ""
+"PDF olarak dışa aktarmak için muayenenin kaydedilmesi gerekmektedir.\n"
+"Bu muayeneyi şimdi kaydetmek ister misiniz?"
+
+#: .././libclinica/VisitBrowser.vala:196
+msgid "Error while delivering the print operation"
+msgstr "Yazdırma işlemi esnasında hatâ oluştu"
+
+#: .././libclinica/VisitDetail.vala:70
+msgid "Edit visit"
+msgstr "Muayeneyi düzenle"
+
+#: .././libclinica/VisitDetail.vala:80 .././libclinica/EventDetail.vala:75
+msgid "Delete event"
+msgstr "Vak'ayı sil"
 
-#: ../libclinica/StartPage.vala:198
+#: .././libclinica/VisitDetail.vala:104
+msgid "Show details"
+msgstr "Ayrıntıları göster"
+
+#: .././libclinica/VisitDetail.vala:125 .././libclinica/VisitTab.vala:269
 msgid ""
-"Add a new patient \n"
-" with name "
+"Deleting a visit will cause all its data to be lost.\n"
+"Do you really want to continue?"
 msgstr ""
+"Muayeneyi silmek tüm verilerin kaybına sebep olacaktır.\n"
+"Gerçekten devam etmek istiyor musunuz?"
+
+#. Create menu items, connect them to their callback
+#. * and add it to the menu
+#: .././libclinica/DoctorContextMenu.vala:58
+#: .././libclinica/PatientContextMenu.vala:54
+msgid "Delete"
+msgstr "Sil"
+
+#. Instantiate menu items
+#: .././libclinica/DoctorContextMenu.vala:59
+#: .././libclinica/PatientContextMenu.vala:51
+#: .././libclinica/EventDetail.vala:111
+msgid "Edit"
+msgstr "Düzenle"
+
+#: .././libclinica/MedicineEditor.vala:41
+msgid "Create a new Medicine"
+msgstr "Yeni bir İlâç oluştur"
+
+#: .././libclinica/CalendarWindow.vala:36
+msgid "Clinica calendar"
+msgstr "Clinica takvimi"
+
+#. Anamnesis
+#: .././libclinica/VisitTab.vala:286 .././libclinica/VisitPrinter.vala:107
+msgid "Anamnesis"
+msgstr "Hikâye"
+
+#. Physical examination
+#: .././libclinica/VisitTab.vala:289 .././libclinica/VisitPrinter.vala:112
+msgid "Physical examination"
+msgstr "Fizikî muayene"
+
+#. Laboratory Exam
+#: .././libclinica/VisitTab.vala:292 .././libclinica/VisitPrinter.vala:117
+msgid "Laboratory exam"
+msgstr "Lâboratuvar sonucu"
+
+#: .././libclinica/VisitTab.vala:295
+msgid "Hystopathology"
+msgstr "Histopatoloji"
+
+#. Diagnosis
+#: .././libclinica/VisitTab.vala:298 .././libclinica/VisitPrinter.vala:127
+msgid "Diagnosis"
+msgstr "Teşhis"
+
+#. Topical therapy
+#: .././libclinica/VisitTab.vala:301 .././libclinica/VisitPrinter.vala:132
+msgid "Topical therapy"
+msgstr "Topikal tedavi"
+
+#. Systemic therapy
+#: .././libclinica/VisitTab.vala:304 .././libclinica/VisitPrinter.vala:137
+msgid "Systemic therapy"
+msgstr "Sistemik tedavi"
 
-#: ../libclinica/StartPage.vala:204
+#. Subsequent checks
+#: .././libclinica/VisitTab.vala:307 .././libclinica/VisitPrinter.vala:142
+msgid "Subsequent checks"
+msgstr "Sonraki kontroller"
+
+#: .././libclinica/MedicineTreeView.vala:37
+msgid "Medicine name"
+msgstr "İlâç ismi"
+
+#: .././libclinica/MedicineTreeView.vala:40
+#: .././libclinica/MedicineDetailDialog.vala:75
+msgid "Price"
+msgstr "Fiyat"
+
+#: .././libclinica/PatientListPage.vala:81 .././libclinica/StartPage.vala:211
 msgid "Add a new patient"
 msgstr "Yeni bir hasta ekle"
 
-#: ../libclinica/MedicineTreeView.vala:21
-#: ../libclinica/MedicineDetailDialog.vala:56
-msgid "Price"
+#: .././libclinica/PatientListPage.vala:87
+msgid "Remove the selected patient"
+msgstr "Seçilen hastayı kaldır"
+
+#: .././libclinica/PatientListPage.vala:93
+msgid "Modify the selected patient"
+msgstr "Seçilen hastayı düzenle"
+
+#: .././libclinica/PatientListPage.vala:99
+msgid "Edit visits of the selected patient"
+msgstr "Seçilen hastanın muayenelerini düzenle"
+
+#: .././libclinica/PatientListPage.vala:105
+msgid "Schedule a visit with the selected patient"
+msgstr "Seçilen hastaya muayene takvime belirle"
+
+#: .././libclinica/DataServer.vala:417
+#, c-format
+msgid "Trying to removing doctor with ID = %ld failed"
+msgstr "ID'si %ld olan hekim kaldırılmaya çalışılıyor = başarısız"
+
+#: .././libclinica/DataServer.vala:440
+#, c-format
+msgid "Trying to removing patient with ID = %ld failed"
+msgstr "Kimlik numarası %ld olan hasta kaldırılmaya çalışılıyor = başarısız"
+
+#: .././libclinica/DataServer.vala:463
+#, c-format
+msgid "Trying to removing visit with ID = %ld failed"
 msgstr ""
+"Kimlik numarası %ld olan muayene kaldırılmaya çalışılıyor = başarısız"
+
+#: .././libclinica/DataServer.vala:486
+#, c-format
+msgid "Trying to removing event with ID = %ld failed"
+msgstr "Kimlik numarası %ld olan vak'a kaldırılmaya çalışılıyor = başarısız"
 
-#: ../libclinica/PatientEditor.vala:102
-msgid "Error loading patient_editor.glade."
+#: .././libclinica/Builder.vala:45
+#, c-format
+msgid ""
+"Failed to load UI file: %s. Please check your installation.\n"
+"%s"
 msgstr ""
+"UI dosyası  yüklenirken başarısız olundu: %s. Lütfen kurulumunuzu gözden "
+"geçiriniz.\n"
+"%s"
+
+#: .././libclinica/LocalFileStore.vala:62
+#, c-format
+msgid "Unable to setup file monitors for the filestore folder: %s"
+msgstr "Dosya deposu klâsörü için klâsör ekranları kurulumu yapılamadı: %s"
+
+#: .././libclinica/LocalFileStore.vala:106
+#, c-format
+msgid "Unable to setup a file monitor on directory %s"
+msgstr "Rehber üzerine dosya ekranı kurulumu yapılamadı %s"
+
+#: .././libclinica/LocalFileStore.vala:141
+#, c-format
+msgid "Error while listing the files for the visit identified by id %d"
+msgstr ""
+"Kimlik numarası %d olan hastanın muayene dosyaları sıralanırken hatâ oluştu"
+
+#: .././libclinica/LocalFileStore.vala:167
+msgid "Destination file already exists"
+msgstr "Hedef dosya zaten mevcut"
+
+#: .././libclinica/LocalFileStore.vala:172
+#, c-format
+msgid "Error while adding the file %s to the selected visit"
+msgstr "Seçilen muayene için %s dosyasını eklerken hatâ oluştu"
+
+#: .././libclinica/NetworkedDataProvider.vala:246
+msgid ""
+"You canceled the authentication process on the remote server.\n"
+"From now on Clinica will use the local database. If you want to connect to\n"
+"remote server please re-enable networking in the settings dialog."
+msgstr ""
+"Uzaktan sunucu üzerinde kimlik teyid işlemini iptal ettiniz.\n"
+"Şu an itibariyle Clinica yerel veritabanını kullanacak. Eğer bağlanmak "
+"istiyorsanız\n"
+"uzaktan sunucuya lütfen ağı ayarlar kutusundan tekrar etkinleştiriniz."
 
 #. Set title to edit patient * instead of create new patient
-#: ../libclinica/PatientEditor.vala:307
+#: .././libclinica/PatientEditor.vala:304
 #, c-format
 msgid "Edit patient named %s"
-msgstr ""
+msgstr "Hasta ismini düzenle %s"
 
-#: ../libclinica/PatientEditor.vala:411
+#: .././libclinica/PatientEditor.vala:408
 msgid "You must select a doctor for this patient."
-msgstr ""
+msgstr "Bu hasta için bir hekim seçmelisiniz."
 
-#: ../libclinica/PatientEditor.vala:412
+#: .././libclinica/PatientEditor.vala:409
 msgid ""
 "If you need to create a new one type his name in the entry and select Create "
 "new doctor from the completion list."
 msgstr ""
+"Eğer yeni bir tane oluşturmak isterseniz, girişe ismini yazınız ve \"Yeni "
+"hekim oluştur\"u tamamlama listesinden seçiniz."
+
+#: .././libclinica/PatientEditor.vala:445
+msgid "Date inserted is invalid, aborting patient editing"
+msgstr "Girilen tarih geçersiz, hasta düzenlemesi iptal ediliyor"
+
+#: .././libclinica/AuthenticationDialog.vala:40
+msgid "Authentication required"
+msgstr "Kimlik doğrulaması gerekli"
+
+#. Start of events
+#: .././libclinica/CalendarEventList.vala:73
+msgid "Events scheduled"
+msgstr "Vak'alar takvimlendi."
+
+#: .././libclinica/CalendarEventList.vala:92
+msgid ""
+"No events on this day.\n"
+"You can create a new event\n"
+"by clicking on the top-left button."
+msgstr ""
+"Bugün vak'a yok.\n"
+"Sol üstteki düğmeye basarak\n"
+"yeni vak'a oluştarabilirsiniz."
+
+#: .././libclinica/CalendarEventList.vala:103
+msgid "Visits performed"
+msgstr "Muayene edildi"
+
+#: .././libclinica/CalendarEventList.vala:105
+msgid "Visits scheduled"
+msgstr "Muayene takvimlendi"
+
+#: .././libclinica/CalendarEventList.vala:126
+msgid "No visits performed on this day"
+msgstr "Bu gün muayene edilmedi"
+
+#: .././libclinica/ImportDialog.vala:40
+msgid "Import data from backup file"
+msgstr "Yedek dosyadan veri aktar"
+
+#: .././libclinica/PatientContextMenu.vala:57
+msgid "Edit visits"
+msgstr "Muayeneleri düzenle"
+
+#. File menu
+#: .././libclinica/UIManager.vala:44
+msgid "_File"
+msgstr "_Dosya"
+
+#: .././libclinica/UIManager.vala:45
+msgid "New _patient"
+msgstr "Yeni _hasta"
+
+#: .././libclinica/UIManager.vala:46
+msgid "Create a new patient"
+msgstr "Yeni bir hasta oluştur"
+
+#: .././libclinica/UIManager.vala:47
+msgid "New _doctor"
+msgstr "Yeni _hekim"
+
+#: .././libclinica/UIManager.vala:48
+msgid "Create a new doctor"
+msgstr "Yeni bir doktor oluştur"
+
+#: .././libclinica/UIManager.vala:49
+msgid "_Quit"
+msgstr "_Çık"
+
+#: .././libclinica/UIManager.vala:50
+msgid "Quit clinica"
+msgstr "Clinica'dan çık"
+
+#. View menu
+#: .././libclinica/UIManager.vala:53
+msgid "_View"
+msgstr "_Görünüm"
+
+#: .././libclinica/UIManager.vala:54
+msgid "_Start page"
+msgstr "Sayfayı _başlat"
+
+#: .././libclinica/UIManager.vala:55
+msgid "Go to the start page of clinica"
+msgstr "Clinica'nın başlangıç sayfasına git"
+
+#: .././libclinica/UIManager.vala:56
+msgid "_Patients"
+msgstr "_Hastalar"
+
+#: .././libclinica/UIManager.vala:57
+msgid "Go to the list of patients"
+msgstr "Hasta listesine git"
+
+#: .././libclinica/UIManager.vala:58
+msgid "_Doctors"
+msgstr "_Doktorlar"
+
+#: .././libclinica/UIManager.vala:59
+msgid "Go to the list of doctors"
+msgstr "Hekim listesine git"
+
+#: .././libclinica/UIManager.vala:60
+msgid "_Search medicines"
+msgstr "İlâç _ara"
+
+#: .././libclinica/UIManager.vala:61
+msgid "Search medicines online"
+msgstr "Çevrimiçi ilâç ara"
+
+#. Tools menu
+#: .././libclinica/UIManager.vala:64
+msgid "_Tools"
+msgstr "_Araçlar"
+
+#: .././libclinica/UIManager.vala:65
+msgid "_Settings"
+msgstr "_Ayarlar"
+
+#: .././libclinica/UIManager.vala:66
+msgid "Customize clinica behaviour"
+msgstr "Clinica'nın davranışını özelleştir"
+
+#: .././libclinica/UIManager.vala:67
+msgid "Backup"
+msgstr "Yedekle"
+
+#: .././libclinica/UIManager.vala:68
+msgid "Backup clinica data to file"
+msgstr "Clinica verisini dosyaya yedekle"
+
+#: .././libclinica/UIManager.vala:69
+msgid "Import"
+msgstr "İçe Aktar"
+
+#: .././libclinica/UIManager.vala:70
+msgid "Import data from backup files"
+msgstr "Yedek dosyalardan veriyi içe aktar"
+
+#. Help menu
+#: .././libclinica/UIManager.vala:73
+msgid "_Help"
+msgstr "_Yardım"
+
+#: .././libclinica/UIManager.vala:74
+msgid "_Contents"
+msgstr "_İçerik"
+
+#: .././libclinica/UIManager.vala:75
+msgid "Open the help system"
+msgstr "Yardım sistemini aç"
+
+#: .././libclinica/UIManager.vala:76
+msgid "_Report a bug"
+msgstr "Hatâ _bildir"
+
+#: .././libclinica/UIManager.vala:77
+msgid "Report a bug online"
+msgstr "Çevrimiçi hatâ bildir"
+
+#: .././libclinica/UIManager.vala:78
+msgid "_About"
+msgstr "_Hakkında"
+
+#: .././libclinica/UIManager.vala:79
+msgid "Get to know the development team of Clinica"
+msgstr "Clinica geliştirme takımını tanı"
+
+#: .././libclinica/BackupEngine.vala:113
+msgid "Please select a valid backup file"
+msgstr "Lütfen geçerli bir yedek dosya seçiniz"
+
+#: .././libclinica/BackupEngine.vala:125
+msgid "Importing data"
+msgstr "Veri içe aktarılıyor"
+
+#: .././libclinica/BackupEngine.vala:126
+msgid "Please wait while Clinica imports the data..."
+msgstr "Lütfen Clinica verileri içe aktarırken bekleyiniz..."
+
+#: .././libclinica/BackupEngine.vala:129
+msgid "Importing the JSON data.."
+msgstr "JSON verileri içe aktarılıyor..."
+
+#: .././libclinica/BackupEngine.vala:137
+msgid "Error while parsing the backup JSON data"
+msgstr "Yedek JSON verileri ayrıştırılırken hatâ oluştu"
+
+#: .././libclinica/BackupEngine.vala:143 .././libclinica/BackupEngine.vala:170
+msgid "An error occurred while parsing the JSON file"
+msgstr "JSON dosyaları ayrıştırılırken hatâ meydana geldi"
+
+#: .././libclinica/BackupEngine.vala:165
+msgid ""
+"The doctors, patients, visits and events field in the JSON backup should be "
+"arrays, aborting."
+msgstr ""
+"JSON yedeklerinde yeralan hekimler, hastalar, muayeneler ve vak'alar diziler "
+"olmalıdır, iptal ediliyor."
+
+#. Clear the database and put the data back in it
+#. in such a way that won't break relationships.
+#: .././libclinica/BackupEngine.vala:188
+msgid "Clearing the old data in the database..."
+msgstr "Veritabanındaki eski veriler siliniyor..."
+
+#: .././libclinica/BackupEngine.vala:192
+msgid "Loading doctors..."
+msgstr "Hekimler yükleniyor..."
+
+#: .././libclinica/BackupEngine.vala:201
+#, c-format
+msgid "- %d doctors have been imported\n"
+msgstr "- %d hekimler içe aktarıldı\n"
+
+#: .././libclinica/BackupEngine.vala:203
+msgid "Loading patients..."
+msgstr "Hastalar yükleniyor..."
+
+#: .././libclinica/BackupEngine.vala:216
+#, c-format
+msgid "- %d patients have been imported\n"
+msgstr "- %d hastalar içe aktarıldı\n"
+
+#: .././libclinica/BackupEngine.vala:218
+msgid "Loading visits..."
+msgstr "Muayereler yükleniyor..."
+
+#: .././libclinica/BackupEngine.vala:231
+#, c-format
+msgid "- %d visits have been imported\n"
+msgstr "- %d muayeneler içe aktarıldı\n"
+
+#: .././libclinica/BackupEngine.vala:233
+msgid "Loading events..."
+msgstr "Vak'alar yükleniyor..."
+
+#: .././libclinica/BackupEngine.vala:249
+#, c-format
+msgid "- %d events have been imported\n"
+msgstr "- %d vak'alar içe aktarıldı\n"
+
+#: .././libclinica/BackupEngine.vala:258
+msgid ""
+"- A FileStore was found but is not available in the current provider\n"
+msgstr "- Bir dosya deposu bulundu ama mevcut sağlayıcı ile kullanılamıyor\n"
+
+#: .././libclinica/BackupEngine.vala:283
+#, c-format
+msgid "- %d files have been imported\n"
+msgstr "- %d dosyaları içe aktarıldı\n"
+
+#: .././libclinica/BackupEngine.vala:287
+msgid "- No FileStore was found in the backup\n"
+msgstr "- Yedekte dosya deposu bulunamadı\n"
+
+#: .././libclinica/BackupEngine.vala:298
+msgid "The import of the data has been completed successfully"
+msgstr "Verilerin içe aktarılması başarıyla tamamlandı"
+
+#: .././libclinica/PatientListStore.vala:128
+#: .././libclinica/PatientListStore.vala:150
+msgid ""
+"Patients database seems corrupted. This is likely to be a bug in the "
+"application"
+msgstr ""
+"Hasta veritabanı bozulmuş. Bu uygulamadaki hatânın göstergesi olabilir"
+
+#. Print the error message to stdout
+#: .././libclinica/Utils.vala:79
+msgid "ERROR => "
+msgstr "[31;1mHATÂ[0m => "
+
+#: .././libclinica/Utils.vala:83 .././libclinica/Utils.vala:84
+msgid "Clinica encountered an error"
+msgstr "Clinica bir hatâ ile karşılaştı"
+
+#: .././libclinica/LocalMedicinesDatabase.vala:90
+#, c-format
+msgid "Medicine with id = %lld not found in DB: %s"
+msgstr "Kimlik numarası = %lld olan ilaç veritabanında bulunamadı: %s"
+
+#: .././libclinica/LocalMedicinesDatabase.vala:119
+#, c-format
+msgid "Error inserting medicine in the database: %s"
+msgstr "İlâç veritabanına eklenirken hatâ oluştu: %s"
+
+#: .././libclinica/EventEditor.vala:93
+msgid "Create a new event"
+msgstr "Yeni bir vak'a oluştur"
+
+#: .././libclinica/EventEditor.vala:97
+#, c-format
+msgid "Editing event: %s"
+msgstr "Vak'a düzenleniyor: %s"
+
+#. Create the entry for title of the event and venue
+#: .././libclinica/EventEditor.vala:115
+msgid "Title"
+msgstr "Başlık"
+
+#: .././libclinica/EventEditor.vala:116
+msgid "Venue"
+msgstr "Mekân"
+
+#: .././libclinica/EventEditor.vala:151
+msgid "Time:"
+msgstr "Zaman:"
+
+#: .././libclinica/EventEditor.vala:167
+msgid "Insert the description here..."
+msgstr "Tanımlamayı buraya ekle..."
+
+#: .././libclinica/EventEditor.vala:205 .././libclinica/VisitToolbar.vala:96
+#, c-format
+msgid "Patient"
+msgstr "Hasta"
+
+#: .././libclinica/EventEditor.vala:264
+msgid "Visit"
+msgstr "Muayene"
+
+#: .././libclinica/VisitListStore.vala:99
+msgid ""
+"Visit database seems corrupted. This is likely to be a bug in the application"
+msgstr "Muayene veritabanı bozuldu. Uygulamada bir hatâ olabilir."
+
+#: .././libclinica/MedicineSearchPage.vala:76
+#: .././data/resources/ui/start_page.glade.h:5
+msgid "Search medicines"
+msgstr "İlaç ara"
+
+#: .././libclinica/MedicineSearchPage.vala:100
+msgid "No search engine available"
+msgstr "Kullanılabilir arama motoru yok"
+
+#: .././libclinica/MedicineSearchPage.vala:108
+#, c-format
+msgid "Searching for %s..."
+msgstr "%s için aranıyor..."
+
+#: .././libclinica/MedicineSearchPage.vala:133
+msgid "Medicines"
+msgstr "İlâçlar"
+
+#: .././libclinica/MedicineSearchPage.vala:96
+msgid "It's not possible to perform a search for medicine"
+msgstr "İlâç için arama yapmak mümkün değil"
+
+#: .././libclinica/SqliteDataProvider.vala:143
+#, c-format
+msgid "Error creating some configuration files, check permission on %s"
+msgstr ""
+"Yapılandırma dosyalarının oluşturulmasında hatâ oluştu; %s iznini kontrol "
+"edin"
+
+#: .././libclinica/SqliteDataProvider.vala:151
+#, c-format
+msgid "Error reading some configuration files, check permission on %s"
+msgstr ""
+"Yapılandırma dosyalarının okunmasında hatâ oluştu; %s iznini kontrol edin"
+
+#: .././libclinica/SqliteDataProvider.vala:170
+#, c-format
+msgid "Failure while settings new database version to %s"
+msgstr "Yeni %s sürümlü veritabanı ayarlanırken başarısız olundu"
+
+#: .././libclinica/SqliteDataProvider.vala:173
+msgid "Failure while upgrading database"
+msgstr "Veritabanı yükseltilirken başarısız olundu"
+
+#: .././libclinica/SqliteDataProvider.vala:177
+msgid "Version of the database is not compatible"
+msgstr "Veritabanının sürümü uyumlu değil"
+
+#: .././libclinica/SqliteDataProvider.vala:199
+msgid ""
+"This is a version of Clinica newer than the one that created the\n"
+"patients database installed on the system.\n"
+"Using this version requires upgrading the database, and\n"
+"<b>the old version will not be able to use it anymore</b>.\n"
+"Do you wish to perform this one-time upgrade?\n"
+msgstr ""
+"Bu Clinica sürümü daha evvel sisteme hasta veritabanı kurulumu yapan\n"
+"sürümden daha yenidir.\n"
+"Bu sürümü kullanmak veritabanını yükseltmeyi gerektirmektedir ve\n"
+"<b> bu durumda eski sürüm veritabanını bir daha kullanamaz <b/>\n"
+"Tek seferlik yükseltmeyi yapmak istiyor musunuz?\n"
+
+#: .././libclinica/SqliteDataProvider.vala:200
+msgid "Upgrade database"
+msgstr "Veritabanını yükselt"
+
+#: .././libclinica/SqliteDataProvider.vala:225
+msgid "Database needs to be moved"
+msgstr "Veritabanının taşınması gerekmekte"
+
+#: .././libclinica/SqliteDataProvider.vala:226
+msgid ""
+"An older version of clinica has been detected and the old database has to be "
+"moved\n"
+"to a new location to continue.\n"
+"<b>The older version of clinica won't work anymore with this setup</b>.\n"
+"Do you still want to continue?"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:239
+msgid ""
+"Error while transferring the database to the new default location for "
+"clinica >= 0.2.9"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:251
+msgid "Error upgrading database, please check your installation"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:266
+#, c-format
+msgid ""
+"Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:359
+#, c-format
+msgid "Error while retrieving the doctor with id = %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:399
+#, c-format
+msgid "An error occurred while saving the doctor with id %d: %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:468
+#, c-format
+msgid "Error while retrieving the patient with id = %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:517
+#: .././libclinica/SqliteDataProvider.vala:652
+#, c-format
+msgid "An error occurred while saving the doctor with id %s: %s"
+msgstr ""
+
+#: .././libclinica/SqliteDataProvider.vala:597
+#, c-format
+msgid "Error while retrieving the visit with id = %s"
+msgstr ""
 
-#: ../libclinica/PatientEditor.vala:446
-msgid "Date inserted is invalid, aborting patient editing"
+#: .././libclinica/SqliteDataProvider.vala:686
+#, c-format
+msgid "Error while retrieving the event with id = %d"
 msgstr ""
 
-#. Set title according to the patient that we have loaded and connect
-#. * show startup signal to the focusing of the first field in the visit
-#: ../libclinica/VisitWindow.vala:62
+#: .././libclinica/SqliteDataProvider.vala:728
 #, c-format
-msgid "Visits of the patient %s"
+msgid "An error occurred while saving the event with id %s: %s"
 msgstr ""
 
-#: ../libclinica/PatientListStore.vala:86
-#: ../libclinica/PatientListStore.vala:132
-msgid ""
-"Patients database seems corrupted. This is likely to be a bug in the "
-"application"
+#: .././libclinica/SettingsManager.vala:40
+msgid "Clinica settings"
 msgstr ""
 
-#. Create menu items, connect them to their callback
-#. * and add it to the menu
-#: ../libclinica/DoctorContextMenu.vala:58
-#: ../libclinica/PatientContextMenu.vala:54
-msgid "Delete"
-msgstr "Sil"
+#: .././libclinica/SettingsManager.vala:52
+msgid "Clinica has been built without plugins support"
+msgstr ""
 
-#. Instantiate menu items
-#: ../libclinica/DoctorContextMenu.vala:59
-#: ../libclinica/PatientContextMenu.vala:51
-msgid "Edit"
+#: .././libclinica/SettingsManager.vala:135
+msgid "Please use the Network tab to enable the Networked data provider"
 msgstr ""
 
-#: ../libclinica/PatientContextMenu.vala:57
-msgid "Edit visits"
+#: .././libclinica/SettingsManager.vala:136
+msgid "Use the Network tab"
 msgstr ""
 
-#. Create the object and add the close button used
-#. * to dismiss the dialog
-#: ../libclinica/MedicineDetailDialog.vala:27
-msgid "Close"
+#: .././libclinica/SettingsManager.vala:166
+msgid "Disconnect"
 msgstr ""
 
-#: ../libclinica/MedicineDetailDialog.vala:46
-msgid "General information"
+#: .././libclinica/SettingsManager.vala:166
+msgid "Connect"
 msgstr ""
 
-#. And now the content for the others fields of the medicine
-#: ../libclinica/MedicineDetailDialog.vala:52
-msgid "Identification Code"
+#: .././libclinica/SettingsManager.vala:191
+#, c-format
+msgid "Connection to the given host failed. Please check your settings."
 msgstr ""
 
-#: ../libclinica/MedicineDetailDialog.vala:53
-msgid "Description"
+#: .././libclinica/SettingsManager.vala:192
+msgid "Connection failed"
 msgstr ""
 
-#: ../libclinica/MedicineDetailDialog.vala:54
-msgid "Active ingredient"
+#: .././libclinica/SettingsManager.vala:206
+#: .././libclinica/ResourceManager.vala:284
+#, c-format
+msgid "Username or password are wrong. Disconnecting from the server."
 msgstr ""
 
-#: ../libclinica/MedicineDetailDialog.vala:55
-msgid "Storage reccomendations"
+#: .././libclinica/SettingsManager.vala:207
+msgid "Wrong authentication data has been provided"
 msgstr ""
 
-#: ../libclinica/MedicineDetailDialog.vala:64
-msgid "Additional notes"
+#: .././libclinica/VisitActions.vala:60
+msgid "Edit details of patient"
 msgstr ""
 
-#: ../libclinica/MedicineDetailDialog.vala:90
-#: ../libclinica/VisitPrinter.vala:168
-msgid "Field empty"
+#: .././libclinica/VisitActions.vala:67
+msgid "Remove this visit"
 msgstr ""
 
-#. First add a new visit and keep a reference to new_page
-#. *  to focus it on page loading.
-#. Create a new one and connect it
-#: ../libclinica/VisitBrowser.vala:62 ../libclinica/VisitBrowser.vala:184
-msgid "New visit"
+#: .././libclinica/VisitActions.vala:74
+msgid "Export this visit as PDF"
+msgstr "Bu muayene kaydını PDF olarak dışa aktar"
+
+#: .././libclinica/VisitActions.vala:81
+msgid "Print a report of this visit"
 msgstr ""
 
-#: ../libclinica/VisitBrowser.vala:141
-msgid ""
-"A visit need to be saved in order to be exported as PDF.\n"
-"Do you want to save the visit now?"
+#: .././libclinica/VisitActions.vala:88
+msgid "Save this visit"
 msgstr ""
 
-#: ../libclinica/SettingsManager.vala:44
-msgid "Clinica settings"
+#: .././libclinica/VisitActions.vala:99
+msgid "Close the visits of this patient"
 msgstr ""
 
-#. Create the use-plugins checkbox
-#: ../libclinica/SettingsManager.vala:56
-msgid "Use plugins (need restart)"
+#: .././libclinica/VisitToolbar.vala:93
+msgid "This patient has not a doctor"
 msgstr ""
 
-#: ../libclinica/SettingsManager.vala:71
-msgid "General"
+#: .././libclinica/VisitToolbar.vala:97
+msgid "Doctor"
 msgstr ""
 
-#: ../libclinica/SettingsManager.vala:75
-msgid "Plugins"
+#: .././libclinica/DateTimePicker.vala:56
+msgid "Hour"
 msgstr ""
 
-#: ../libclinica/SettingsManager.vala:113
-msgid ""
-"Select the search engine\n"
-"used to find medicines"
+#: .././libclinica/DateTimePicker.vala:58
+msgid "Minute"
 msgstr ""
 
-#: ../libclinica/DoctorListStore.vala:73
+#: .././libclinica/DoctorListStore.vala:75
 msgid "Doctors database seems corrupted."
 msgstr ""
 
-#. Start of events
-#: ../libclinica/CalendarEventList.vala:70
-msgid "Events scheduled"
+#: .././libclinica/DoctorListView.vala:175
+msgid "Select a doctor to delete it!"
 msgstr ""
 
-#: ../libclinica/CalendarEventList.vala:89
+#: .././libclinica/DoctorListView.vala:186
 msgid ""
-"No events on this day.\n"
-"You can create a new event\n"
-"by clicking on the top-left button."
+"The doctor that you have selected for removal has some patients associated. "
+"\n"
 msgstr ""
 
-#: ../libclinica/CalendarEventList.vala:95
-msgid "Visits performed"
+#: .././libclinica/DoctorListView.vala:187
+msgid ""
+"It's not possible to remove it without disassociating all his patients.\n"
+"\n"
 msgstr ""
 
-#: ../libclinica/CalendarEventList.vala:115
-msgid "No visits performed on this day"
+#: .././libclinica/DoctorListView.vala:188
+#: .././libclinica/DoctorListView.vala:217
+msgid "Do you really want to proceed?"
 msgstr ""
 
-#: ../libclinica/VisitToolbar.vala:90
-msgid "This patient has not a doctor"
+#: .././libclinica/DoctorListView.vala:189
+msgid "Doctor has associated patients"
 msgstr ""
 
-#: ../libclinica/VisitToolbar.vala:93
-#, c-format
+#: .././libclinica/DoctorListView.vala:215
 msgid ""
-"Patient: <b>%s</b>\n"
-"Doctor: <b>%s</b>"
+"The following patients will be disassociated from this doctor by this "
+"action:\n"
 msgstr ""
 
-#. Show more details on this patient
-#: ../libclinica/VisitActions.vala:61
-msgid "Edit patient details"
+#: .././libclinica/DoctorListView.vala:218
+msgid "Confirm disassociation of patients"
 msgstr ""
 
-#. Save the visit as a PDF file
-#: ../libclinica/VisitActions.vala:71
-msgid "Save as PDF"
+#: .././libclinica/DoctorListView.vala:235
+msgid ""
+"Really delete this doctor? All information about him/her will be lost."
 msgstr ""
 
-#: ../libclinica/EventEditor.vala:93
-msgid "Create a new event"
+#. Ask the user where he would like to backup its files.
+#: .././libclinica/UserInterface.vala:360
+msgid "Select the folder where the data should be saved"
 msgstr ""
 
-#: ../libclinica/EventEditor.vala:97
+#. In this string %s refers to the path where the backup has been performed.
+#: .././libclinica/UserInterface.vala:386
 #, c-format
-msgid "Editing event: %s"
+msgid "Backup completed successfully in the folder %s"
 msgstr ""
 
-#. Create the entry for title of the event and venue
-#: ../libclinica/EventEditor.vala:114
-msgid "Title"
+#: .././libclinica/UserInterface.vala:387
+msgid "Backup completed"
 msgstr ""
 
-#: ../libclinica/EventEditor.vala:115
-msgid "Venue"
+#: .././libclinica/UserInterface.vala:389
+msgid ""
+"Please take care of copying the folder in a safe place for future restore of "
+"the data."
 msgstr ""
 
-#: ../libclinica/EventEditor.vala:144
-msgid "Time:"
+#: .././libclinica/UserInterface.vala:416
+#, c-format
+msgid "Cannot open the help: %s"
 msgstr ""
 
-#: ../libclinica/EventEditor.vala:160
-msgid "Insert the description here..."
+#: .././libclinica/UserInterface.vala:441
+msgid ""
+"An error occurred while opening the bug system. Please go to\n"
+"http://launchpad.net/clinica-project/ to file a bug"
 msgstr ""
 
-#: ../libclinica/EventEditor.vala:198
-msgid "Patient"
+#: .././libclinica/EventDetail.vala:65
+msgid "Edit event"
 msgstr ""
 
-#: ../libclinica/EventEditor.vala:255
-msgid "Visit"
+#: .././libclinica/EventDetail.vala:112
+msgid "Remove"
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:175
-msgid "Select a doctor to delete it!"
+#: .././libclinica/EventDetail.vala:145
+msgid "Really delete this event?"
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:186
-msgid ""
-"The doctor that you have selected for removal has some patients "
-"associated. \n"
+#: .././libclinica/Sidebar.vala:68
+msgid "Pages"
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:187
+#: .././libclinica/StartPage.vala:93
+msgid "Dashboard"
+msgstr ""
+
+#: .././libclinica/StartPage.vala:205
 msgid ""
-"It's not possible to remove it without removing all his patients.\n"
-"\n"
+"Add a new patient \n"
+" with name "
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:188 ../libclinica/DoctorListView.vala:221
-msgid "Do you really want to proceed?"
+#: .././libclinica/EventListStore.vala:121
+msgid ""
+"Events database seems corrupted. This is likely to be a bug in the "
+"application"
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:189
-msgid "Doctor has associated patients"
+#: .././libclinica/DoctorListPage.vala:60
+#: .././libclinica/DoctorListPage.vala:93
+msgid "Doctors"
+msgstr "Doktorlar"
+
+#: .././libclinica/DoctorListPage.vala:76
+msgid "Add a doctor"
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:219
-msgid "The following patients will be deleted by this action:\n"
+#: .././libclinica/DoctorListPage.vala:82
+msgid "Edit the selected doctor"
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:222
-msgid "Confirm deletion of patients"
+#: .././libclinica/DoctorListPage.vala:88
+msgid "Remove the selected doctor"
 msgstr ""
 
-#: ../libclinica/DoctorListView.vala:244
-msgid "Really delete this doctor? All information about him/her will be lost."
+#: .././libclinica/ResourceManager.vala:285
+msgid "Error while authenticating on the server"
 msgstr ""
 
-#. Anamnesis
-#: ../libclinica/VisitTab.vala:258 ../libclinica/VisitPrinter.vala:68
-msgid "Anamnesis"
+#: .././libclinica/AboutDialog.vala:41
+msgid "Medical records manager"
 msgstr ""
 
-#. Physical examination
-#: ../libclinica/VisitTab.vala:261 ../libclinica/VisitPrinter.vala:71
-msgid "Physical examination"
+#: .././libclinica/AboutDialog.vala:43
+msgid "About Clinica"
 msgstr ""
 
-#. Laboratory Exam
-#: ../libclinica/VisitTab.vala:264 ../libclinica/VisitPrinter.vala:74
-msgid "Laboratory exam"
+#: .././libclinica/AboutDialog.vala:52
+msgid "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
 msgstr ""
 
-#: ../libclinica/VisitTab.vala:267
-msgid "Hystopathology"
+#: .././libclinica/AboutDialog.vala:53
+msgid "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
 msgstr ""
 
-#. Diagnosis
-#: ../libclinica/VisitTab.vala:270 ../libclinica/VisitPrinter.vala:80
-msgid "Diagnosis"
+#. Histopathology
+#: .././libclinica/VisitPrinter.vala:122
+msgid "Histopathology"
 msgstr ""
 
-#. Topical therapy
-#: ../libclinica/VisitTab.vala:273 ../libclinica/VisitPrinter.vala:83
-msgid "Topical therapy"
+#. Now write the date of the visit after that
+#: .././libclinica/VisitPrinter.vala:285
+#, c-format
+msgid "Report of the visit of %s"
 msgstr ""
 
-#. Systemic therapy
-#: ../libclinica/VisitTab.vala:276 ../libclinica/VisitPrinter.vala:86
-msgid "Systemic therapy"
+#: .././libclinica/VisitPrinter.vala:316
+#: .././libclinica/MedicineDetailDialog.vala:109
+msgid "Field empty"
 msgstr ""
 
-#. Subsequent checks
-#: ../libclinica/VisitTab.vala:279 ../libclinica/VisitPrinter.vala:89
-msgid "Subsequent checks"
+#. Add a Attach button
+#: .././libclinica/VisitFileManager.vala:89
+msgid "Attach file"
 msgstr ""
 
-#: ../libclinica/PluginManager.vala:35
-msgid ""
-"Clinica is extensible via plugins and you can easily enable\n"
-" and disable them using this window."
+#: .././libclinica/VisitFileManager.vala:97
+msgid "Browse files"
 msgstr ""
 
-#: ../libclinica/CalendarWindow.vala:36
-msgid "Clinica calendar"
+#: .././libclinica/VisitFileManager.vala:113
+msgid "Select a file to attach"
 msgstr ""
 
-#. Histopathology
-#: ../libclinica/VisitPrinter.vala:77
-msgid "Histopathology"
+#: .././libclinica/VisitFileManager.vala:133
+msgid "Unable to open the browser on the filestore position"
 msgstr ""
 
-#: ../libclinica/EventListStore.vala:93
+#: .././libclinica/VisitFileManager.vala:163
 msgid ""
-"Events database seems corrupted. This is likely to be a bug in the "
-"application"
+"Save the visit\n"
+" to attach files"
 msgstr ""
 
-#. Set title of edit doctor dialog, space is important!
-#: ../libclinica/DoctorEditor.vala:91
-#, c-format
-msgid "Edit doctor named %s"
+#: .././libclinica/VisitFileManager.vala:170
+msgid "Attach files"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:184
-#, c-format
-msgid "Error creating some configuration files, check permission on %s"
+#: .././libclinica/SidebarCalendarEntry.vala:30
+msgid "Calendar"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:192
-#, c-format
-msgid "Error reading some configuration files, check permission on %s"
+#. Create the object and add the close button used
+#. * to dismiss the dialog
+#: .././libclinica/MedicineDetailDialog.vala:46
+msgid "Close"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:211
-#, c-format
-msgid "Failure while settings new database version to %s"
+#: .././libclinica/MedicineDetailDialog.vala:65
+msgid "General information"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:214
-msgid "Failure while upgrading database"
+#. And now the content for the others fields of the medicine
+#: .././libclinica/MedicineDetailDialog.vala:71
+msgid "Identification Code"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:218
-msgid "Version of the database is not compatible"
+#: .././libclinica/MedicineDetailDialog.vala:72
+msgid "Description"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:293
-msgid ""
-"This is a version of Clinica newer than the one that created the\n"
-"patients database installed on the system.\n"
-"Using this version requires upgrading the database, and\n"
-"<b>the old version will not be able to use it anymore</b>.\n"
-"Do you wish to perform this one-time upgrade?\n"
+#: .././libclinica/MedicineDetailDialog.vala:73
+msgid "Active ingredient"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:294
-msgid "Upgrade database"
+#: .././libclinica/MedicineDetailDialog.vala:74
+msgid "Storage reccomendations"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:375
-msgid "Error upgrading database, please check your installation"
+#: .././libclinica/MedicineDetailDialog.vala:83
+msgid "Additional notes"
 msgstr ""
 
-#: ../libclinica/ResourceManager.vala:390
+#. Nothing to do for now.
+#: .././libclinica/FileDetail.vala:89
 #, c-format
-msgid ""
-"Error upgrading the database from version 0.1 to 0.2, sqlite exit code: %d"
+msgid "Error while loading icon for file %s: %s"
 msgstr ""
 
-#: ../libclinica/AboutDialog.vala:40
-msgid "Medical records manager"
+#: .././libclinica/FileDetail.vala:98
+msgid "Open file"
 msgstr ""
 
-#: ../libclinica/AboutDialog.vala:42
-msgid "About Clinica"
+#: .././libclinica/FileDetail.vala:110
+msgid "Delete file"
 msgstr ""
 
-#: ../libclinica/AboutDialog.vala:51
-msgid "Leonardo Robol <robol at poisson.phc.unipi.it>\n"
+#: .././libclinica/FileDetail.vala:122
+#, c-format
+msgid ""
+"Do you really want to delete the file %s?\n"
+"If you proceed it will be definitively lost."
 msgstr ""
 
-#: ../libclinica/AboutDialog.vala:52
-msgid "Gianmarco Brocchi <brocchi at poisson.phc.unipi.it>\n"
+#: .././libclinica/FileDetail.vala:135
+#, c-format
+msgid "Error while opening the file %s"
 msgstr ""
 
-#. Start of LAUNCHPAD contributions. Each one is indented
-#. * of two spaces
-#: ../libclinica/AboutDialog.vala:56
-msgid ""
-"\n"
-"Launchpad contributions: \n"
-msgstr ""
+#: .././data/resources/ui/start_page.glade.h:1
+msgid "Browse the patients to start a visit"
+msgstr "Yeni bir muayene başlatmak için hasta arayın"
 
-#: ../libclinica/DoctorListPage.vala:70
-msgid "Doctors"
-msgstr "Doktorlar"
+#: .././data/resources/ui/start_page.glade.h:2
+msgid "Add new patient"
+msgstr "Yeni hasta ekle"
 
-#. And the button to go back
-#: ../libclinica/MedicineSearchPage.vala:42
-#: ../libclinica/MedicineSearchPage.vala:72
-msgid "Back"
+#: .././data/resources/ui/start_page.glade.h:3
+msgid "Patient list"
+msgstr "Hasta listesi"
+
+#: .././data/resources/ui/start_page.glade.h:4
+msgid "Doctor list"
+msgstr "Doktor listesi"
+
+#: .././data/resources/ui/start_page.glade.h:6
+msgid "Open calendar"
+msgstr "Takvimi aç"
+
+#: .././data/resources/ui/authentication_dialog.glade.h:1
+msgid "The server requires authentication. Please insert your credentials:"
 msgstr ""
 
-#: ../libclinica/MedicineSearchPage.vala:94
-msgid "No search engine available"
+#: .././data/resources/ui/authentication_dialog.glade.h:2
+#: .././data/resources/ui/settings_window.glade.h:11
+msgid "Username"
 msgstr ""
 
-#: ../libclinica/MedicineSearchPage.vala:102
-#, c-format
-msgid "Searching for %s..."
+#: .././data/resources/ui/authentication_dialog.glade.h:3
+#: .././data/resources/ui/settings_window.glade.h:12
+msgid "Password"
 msgstr ""
 
-#: ../libclinica/MedicineSearchPage.vala:104
-msgid "Stop"
+#: .././data/resources/ui/medicine_editor.glade.h:1
+msgid "Name:"
 msgstr ""
 
-#: ../libclinica/MedicineSearchPage.vala:127
-msgid "Medicine search"
+#: .././data/resources/ui/medicine_editor.glade.h:2
+msgid "Description:"
 msgstr ""
 
-#: ../libclinica/MedicineSearchPage.vala:90
-msgid "It's not possible to perform a search for medicine"
+#: .././data/resources/ui/medicine_editor.glade.h:3
+msgid "Active ingredient:"
 msgstr ""
 
-#: ../clinica/Clinica.vala:57
-#, c-format
-msgid "Clinica %s\n"
+#: .././data/resources/ui/medicine_editor.glade.h:4
+msgid "Storage reccomendations:"
 msgstr ""
 
-#: ../ui/new_button.glade.h:1
-msgid "Add new patient"
-msgstr "Yeni hasta ekle"
+#: .././data/resources/ui/medicine_editor.glade.h:5
+msgid "Price:"
+msgstr "Fiyat:"
 
-#: ../ui/new_button.glade.h:2
-msgid "Browse the patients to start a visit"
+#: .././data/resources/ui/medicine_editor.glade.h:6
+msgid "Other notes:"
 msgstr ""
 
-#: ../ui/new_button.glade.h:3
-msgid "Doctor list"
+#: .././data/resources/ui/import_dialog.glade.h:1
+msgid "Source:\t"
 msgstr ""
 
-#: ../ui/new_button.glade.h:4
-msgid "Open calendar"
+#: .././data/resources/ui/import_dialog.glade.h:2
+msgid "Select the backup folder"
 msgstr ""
 
-#: ../ui/new_button.glade.h:5
-msgid "Patient list"
+#: .././data/resources/ui/import_dialog.glade.h:3
+msgid ""
+"<b>Warning:</b> Please note that the current data in the database <b>will be "
+"definitely lost</b>. Consider performing a backup of the current data before "
+"importing the old one."
 msgstr ""
 
-#: ../ui/new_button.glade.h:6
-msgid "Search medicines"
-msgstr ""
+#: .././data/resources/ui/doctor_editor.glade.h:1
+#: .././data/resources/ui/patient_editor.glade.h:12
+msgid "Doctor:"
+msgstr "Doktor:"
 
-#: ../ui/window.glade.h:1
-msgid "Clinica"
-msgstr ""
+#: .././data/resources/ui/doctor_editor.glade.h:4
+#: .././data/resources/ui/patient_editor.glade.h:11
+msgid "Phone:"
+msgstr "Telefon:"
 
-#: ../ui/window.glade.h:2
-msgid "New Doctor"
-msgstr "Yeni Doktor"
+#: .././data/resources/ui/doctor_editor.glade.h:5
+msgid "Mobile:"
+msgstr "Cep:"
 
-#: ../ui/window.glade.h:3
-msgid "New Patient"
-msgstr "Yeni Hasta"
+#: .././data/resources/ui/wait_dialog.glade.h:1
+msgid "label"
+msgstr "etiket"
 
-#: ../ui/window.glade.h:4
-msgid "_About"
+#: .././data/resources/ui/settings_window.glade.h:1
+msgid "Use plugins (restart required)"
 msgstr ""
 
-#: ../ui/window.glade.h:5
-msgid "_Contents"
+#: .././data/resources/ui/settings_window.glade.h:2
+msgid "Allow to browse files in visits"
 msgstr ""
 
-#: ../ui/window.glade.h:6
-msgid "_Doctors"
-msgstr "_Doktorlar"
+#: .././data/resources/ui/settings_window.glade.h:3
+msgid "Medicines search engine"
+msgstr ""
 
-#: ../ui/window.glade.h:7
-msgid "_File"
-msgstr "_Dosya"
+#: .././data/resources/ui/settings_window.glade.h:4
+msgid "Data source"
+msgstr "Veri kaynağı"
 
-#: ../ui/window.glade.h:8
-msgid "_Help"
-msgstr "_Yardım"
+#: .././data/resources/ui/settings_window.glade.h:5
+msgid "General"
+msgstr "Genel"
 
-#: ../ui/window.glade.h:9
-msgid "_Home"
-msgstr "_Anasayfa"
+#: .././data/resources/ui/settings_window.glade.h:6
+msgid "Host"
+msgstr "Ana Bilgisayar"
 
-#: ../ui/window.glade.h:10
-msgid "_Patients"
-msgstr "_Hastalar"
+#: .././data/resources/ui/settings_window.glade.h:7
+msgid "Port"
+msgstr "Bağlantı Noktası"
 
-#: ../ui/window.glade.h:11
-msgid "_Quit"
+#: .././data/resources/ui/settings_window.glade.h:8
+msgid "button"
+msgstr "düğme"
+
+#: .././data/resources/ui/settings_window.glade.h:9
+msgid "Connection to a remote Clinica instance"
 msgstr ""
 
-#: ../ui/window.glade.h:12
-msgid "_Search medicines"
+#: .././data/resources/ui/settings_window.glade.h:10
+msgid "Allow connections of other clinica from the LAN"
 msgstr ""
 
-#: ../ui/window.glade.h:13
-msgid "_Settings"
+#: .././data/resources/ui/settings_window.glade.h:13
+msgid "Built-in server"
 msgstr ""
 
-#: ../ui/window.glade.h:14
-msgid "_Tools"
+#: .././data/resources/ui/settings_window.glade.h:14
+msgid "Network"
+msgstr "Ağ"
+
+#: .././data/resources/ui/settings_window.glade.h:15
+msgid ""
+"The details that are inserted here will be used when generating\n"
+"the automatic visit reports. "
 msgstr ""
 
-#: ../ui/window.glade.h:15
-msgid "_View"
-msgstr "_Görünüm"
+#: .././data/resources/ui/settings_window.glade.h:18
+msgid "Address"
+msgstr "Adres"
 
-#: ../ui/patient_editor.glade.h:1
-msgid "/"
-msgstr "/"
+#: .././data/resources/ui/settings_window.glade.h:19
+msgid "Institution"
+msgstr "Kurulum"
 
-#: ../ui/patient_editor.glade.h:2
-msgid "Address:"
-msgstr "Adres:"
+#: .././data/resources/ui/settings_window.glade.h:20
+msgid "Email"
+msgstr "E-posta"
 
-#: ../ui/patient_editor.glade.h:3
-msgid "Codice fiscale:"
-msgstr ""
+#: .././data/resources/ui/settings_window.glade.h:21
+msgid "Personal details"
+msgstr "Kişisel ayrıntılar"
 
-#: ../ui/patient_editor.glade.h:4
-msgid "Create a new patient"
-msgstr "Yeni bir hasata oluştur"
+#: .././data/resources/ui/settings_window.glade.h:22
+msgid "Plugins"
+msgstr "Eklentiler"
 
-#: ../ui/patient_editor.glade.h:5
-msgid "Date of birth:"
-msgstr ""
+#: .././data/resources/ui/patient_list_sidebar.glade.h:1
+msgid "Visits"
+msgstr "Muayene"
 
-#: ../ui/patient_editor.glade.h:6 ../ui/doctor_editor.glade.h:2
-msgid "Doctor:"
-msgstr "Doktor:"
+#: .././data/resources/ui/patient_list_sidebar.glade.h:2
+msgid "Schedule a visit"
+msgstr ""
 
-#: ../ui/patient_editor.glade.h:7
-msgid "Female"
-msgstr "Bayan"
+#: .././data/resources/ui/patient_editor.glade.h:1
+msgid "Patient:"
+msgstr "Hasta:"
 
-#: ../ui/patient_editor.glade.h:8
+#: .././data/resources/ui/patient_editor.glade.h:4
 msgid "Gender:"
 msgstr "Cinsiyet:"
 
-#: ../ui/patient_editor.glade.h:9
-msgid "Male"
-msgstr "Erkek"
-
-#: ../ui/patient_editor.glade.h:11
-msgid "Patient:"
-msgstr ""
-
-#: ../ui/patient_editor.glade.h:12 ../ui/doctor_editor.glade.h:5
-msgid "Phone:"
-msgstr "Telefon:"
+#: .././data/resources/ui/patient_editor.glade.h:5
+msgid "Date of birth:"
+msgstr "Doğum tarihi"
 
-#: ../ui/patient_editor.glade.h:14
+#: .././data/resources/ui/patient_editor.glade.h:6
 msgid "dd"
 msgstr "gg"
 
-#: ../ui/patient_editor.glade.h:15
+#: .././data/resources/ui/patient_editor.glade.h:7
+msgid "/"
+msgstr "/"
+
+#: .././data/resources/ui/patient_editor.glade.h:8
 msgid "mm"
 msgstr "aa"
 
-#: ../ui/patient_editor.glade.h:16
+#: .././data/resources/ui/patient_editor.glade.h:9
 msgid "yyyy"
 msgstr "yyyy"
 
-#: ../ui/patient_list_sidebar.glade.h:1
-msgid "Visits"
+#: .././data/resources/ui/patient_editor.glade.h:10
+msgid "Address:"
+msgstr "Adres:"
+
+#: .././data/resources/ui/patient_editor.glade.h:13
+msgid "Codice fiscale:"
+msgstr "Vatandaşlık Numarası"
+
+#: .././data/resources/ui/patient_editor.glade.h:14
+msgid "Male"
+msgstr "Erkek"
+
+#: .././data/resources/ui/patient_editor.glade.h:15
+msgid "Female"
+msgstr "Kadın"
+
+#: .././data/resources/ui/visit_scheduler.glade.h:1
+msgid "Select the date on which you'd like to schedule the visit."
 msgstr ""
 
-#: ../ui/doctor_editor.glade.h:1
-msgid "Create a new doctor"
-msgstr "Yeni bir doktor oluştur"
+#: .././data/resources/ui/visit_scheduler.glade.h:2
+msgid "Selected patient"
+msgstr ""
 
-#: ../ui/doctor_editor.glade.h:3
-msgid "Mobile:"
-msgstr "Cep:"
+#: .././data/resources/ui/visit_scheduler.glade.h:3
+msgid ""
+"<b>Tip:</b> Once created this visit will be visible in the visit editor of "
+"this patient."
+msgstr ""
+
+#~ msgid "New Patient"
+#~ msgstr "Yeni Hasta"
 
-#~ msgid "Browse patient list"
-#~ msgstr "Hasta listesine gözat"
+#~ msgid "New Doctor"
+#~ msgstr "Yeni Doktor"
 
-#~ msgid "Browse doctor list"
-#~ msgstr "Doktor listesine gözat"
+#~ msgid "_Home"
+#~ msgstr "_Anasayfa"
diff --git a/ui/doctor_editor.glade b/ui/doctor_editor.glade
deleted file mode 100644
index 5629a2c..0000000
--- a/ui/doctor_editor.glade
+++ /dev/null
@@ -1,254 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
-  <requires lib="gtk+" version="2.24"/>
-  <object class="GtkDialog" id="doctor_editor">
-    <property name="can_focus">False</property>
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Create a new doctor</property>
-    <property name="modal">True</property>
-    <property name="type_hint">dialog</property>
-    <child internal-child="vbox">
-      <object class="GtkBox" id="dialog-vbox3">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="spacing">2</property>
-        <child>
-          <object class="GtkHBox" id="hbox2">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="spacing">8</property>
-            <child>
-              <object class="GtkImage" id="image1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="pixbuf">icons/doctor.svg</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label3">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Doctor:</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="padding">8</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="given_name_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">•</property>
-                <property name="text" translatable="yes">Name</property>
-                <property name="invisible_char_set">True</property>
-                <property name="primary_icon_activatable">False</property>
-                <property name="secondary_icon_activatable">False</property>
-                <signal name="focus-out-event" handler="clinica_doctor_editor_on_name_focus_out_event" swapped="no"/>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="surname_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">•</property>
-                <property name="text" translatable="yes">Surname</property>
-                <property name="invisible_char_set">True</property>
-                <property name="primary_icon_activatable">False</property>
-                <property name="secondary_icon_activatable">False</property>
-                <signal name="focus-out-event" handler="clinica_doctor_editor_on_surname_focus_out_event" swapped="no"/>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkHSeparator" id="hseparator1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="padding">8</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <object class="GtkButtonBox" id="dialog-action_area3">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="save_button">
-                <property name="label">gtk-save</property>
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkAlignment" id="alignment1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="top_padding">10</property>
-            <property name="bottom_padding">10</property>
-            <property name="left_padding">20</property>
-            <property name="right_padding">20</property>
-            <child>
-              <object class="GtkTable" id="table1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="n_rows">2</property>
-                <property name="n_columns">3</property>
-                <property name="row_spacing">5</property>
-                <child>
-                  <object class="GtkImage" id="image2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="pixbuf">icons/phone.svg</property>
-                    <property name="pixel_size">32</property>
-                  </object>
-                  <packing>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Phone:</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Mobile:</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkEntry" id="phone_entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">•</property>
-                    <property name="invisible_char_set">True</property>
-                    <property name="primary_icon_activatable">False</property>
-                    <property name="secondary_icon_activatable">False</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkEntry" id="mobile_entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">•</property>
-                    <property name="invisible_char_set">True</property>
-                    <property name="primary_icon_activatable">False</property>
-                    <property name="secondary_icon_activatable">False</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkImage" id="image3">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="pixbuf">icons/mobile.svg</property>
-                    <property name="pixel_size">32</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-              </object>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">3</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-    <action-widgets>
-      <action-widget response="1">cancel_button</action-widget>
-      <action-widget response="0">save_button</action-widget>
-    </action-widgets>
-  </object>
-</interface>
diff --git a/ui/icons/phone.png b/ui/icons/phone.png
deleted file mode 100644
index c39f162..0000000
Binary files a/ui/icons/phone.png and /dev/null differ
diff --git a/ui/patient_editor.glade b/ui/patient_editor.glade
deleted file mode 100644
index a1e80e5..0000000
--- a/ui/patient_editor.glade
+++ /dev/null
@@ -1,432 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
-  <requires lib="gtk+" version="2.24"/>
-  <object class="GtkListStore" id="gender_store">
-    <columns>
-      <!-- column-name gender -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">Male</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Female</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkDialog" id="patient_editor">
-    <property name="can_focus">False</property>
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Create a new patient</property>
-    <property name="modal">True</property>
-    <property name="type_hint">dialog</property>
-    <child internal-child="vbox">
-      <object class="GtkBox" id="dialog-vbox1">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="spacing">2</property>
-        <child internal-child="action_area">
-          <object class="GtkButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="save_button">
-                <property name="label">gtk-save</property>
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkHBox" id="hbox2">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="spacing">5</property>
-            <child>
-              <object class="GtkEventBox" id="patient_eventbox">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <child>
-                  <object class="GtkImage" id="patient_image">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="pixbuf">icons/patient.svg</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label3">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Patient:</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="padding">8</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="given_name_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">•</property>
-                <property name="text" translatable="yes">Name</property>
-                <property name="invisible_char_set">True</property>
-                <property name="primary_icon_activatable">False</property>
-                <property name="secondary_icon_activatable">False</property>
-                <signal name="focus-out-event" handler="clinica_patient_editor_on_name_focus_out_event" swapped="no"/>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="surname_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">•</property>
-                <property name="text" translatable="yes">Surname</property>
-                <property name="invisible_char_set">True</property>
-                <property name="primary_icon_activatable">False</property>
-                <property name="secondary_icon_activatable">False</property>
-                <signal name="focus-out-event" handler="clinica_patient_editor_on_surname_focus_out_event" swapped="no"/>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkHSeparator" id="hseparator1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="padding">10</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkTable" id="table1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="n_rows">4</property>
-            <property name="n_columns">4</property>
-            <property name="column_spacing">5</property>
-            <property name="row_spacing">5</property>
-            <child>
-              <object class="GtkLabel" id="label5">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="xpad">5</property>
-                <property name="label" translatable="yes">Gender:</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkComboBox" id="gender_combobox">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="model">gender_store</property>
-                <property name="active">0</property>
-                <child>
-                  <object class="GtkCellRendererText" id="cellrenderertext1"/>
-                  <attributes>
-                    <attribute name="text">0</attribute>
-                  </attributes>
-                </child>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label4">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="xpad">5</property>
-                <property name="label" translatable="yes">Date of birth:</property>
-              </object>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkHBox" id="hbox1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="spacing">2</property>
-                <child>
-                  <object class="GtkEntry" id="day_entry">
-                    <property name="width_request">24</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">•</property>
-                    <property name="width_chars">2</property>
-                    <property name="text" translatable="yes">dd</property>
-                    <property name="invisible_char_set">True</property>
-                    <property name="primary_icon_activatable">False</property>
-                    <property name="secondary_icon_activatable">False</property>
-                  </object>
-                  <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">/</property>
-                  </object>
-                  <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkEntry" id="month_entry">
-                    <property name="width_request">24</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">•</property>
-                    <property name="width_chars">2</property>
-                    <property name="text" translatable="yes">mm</property>
-                    <property name="invisible_char_set">True</property>
-                    <property name="primary_icon_activatable">False</property>
-                    <property name="secondary_icon_activatable">False</property>
-                  </object>
-                  <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">/</property>
-                  </object>
-                  <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
-                    <property name="position">3</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkEntry" id="year_entry">
-                    <property name="width_request">48</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">•</property>
-                    <property name="width_chars">4</property>
-                    <property name="text" translatable="yes">yyyy</property>
-                    <property name="invisible_char_set">True</property>
-                    <property name="primary_icon_activatable">False</property>
-                    <property name="secondary_icon_activatable">False</property>
-                  </object>
-                  <packing>
-                    <property name="expand">True</property>
-                    <property name="fill">True</property>
-                    <property name="position">4</property>
-                  </packing>
-                </child>
-              </object>
-              <packing>
-                <property name="left_attach">3</property>
-                <property name="right_attach">4</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="residence_address_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">•</property>
-                <property name="invisible_char_set">True</property>
-                <property name="primary_icon_activatable">False</property>
-                <property name="secondary_icon_activatable">False</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label8">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="xpad">5</property>
-                <property name="label" translatable="yes">Address:</property>
-              </object>
-              <packing>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label7">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="xpad">5</property>
-                <property name="label" translatable="yes">Phone:</property>
-              </object>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="phone_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">•</property>
-                <property name="invisible_char_set">True</property>
-                <property name="primary_icon_activatable">False</property>
-                <property name="secondary_icon_activatable">False</property>
-              </object>
-              <packing>
-                <property name="left_attach">3</property>
-                <property name="right_attach">4</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label6">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="xpad">5</property>
-                <property name="label" translatable="yes">Doctor:</property>
-              </object>
-              <packing>
-                <property name="top_attach">3</property>
-                <property name="bottom_attach">4</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="doctor_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">•</property>
-                <property name="invisible_char_set">True</property>
-                <property name="primary_icon_activatable">False</property>
-                <property name="secondary_icon_activatable">False</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">4</property>
-                <property name="top_attach">3</property>
-                <property name="bottom_attach">4</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="codice_fiscale_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">•</property>
-                <property name="invisible_char_set">True</property>
-                <property name="primary_icon_activatable">False</property>
-                <property name="secondary_icon_activatable">False</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">4</property>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label9">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="xpad">5</property>
-                <property name="label" translatable="yes">Codice fiscale:</property>
-              </object>
-              <packing>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">3</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-    <action-widgets>
-      <action-widget response="1">cancel_button</action-widget>
-      <action-widget response="0">save_button</action-widget>
-    </action-widgets>
-  </object>
-</interface>
diff --git a/ui/window.glade b/ui/window.glade
deleted file mode 100644
index 60e6fa3..0000000
--- a/ui/window.glade
+++ /dev/null
@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
-  <requires lib="gtk+" version="2.24"/>
-  <object class="GtkWindow" id="window">
-    <property name="can_focus">False</property>
-    <property name="title" translatable="yes">Clinica</property>
-    <property name="window_position">center</property>
-    <property name="default_width">700</property>
-    <property name="default_height">400</property>
-    <signal name="destroy" handler="clinica_user_interface_on_window_destroy" swapped="no"/>
-    <child>
-      <object class="GtkVBox" id="vbox1">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <child>
-          <object class="GtkMenuBar" id="menubar1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <child>
-              <object class="GtkMenuItem" id="menuitem1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="use_action_appearance">False</property>
-                <property name="label" translatable="yes">_File</property>
-                <property name="use_underline">True</property>
-                <child type="submenu">
-                  <object class="GtkMenu" id="menu1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
-                      <object class="GtkMenuItem" id="new_patient_menu_item">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="label" translatable="yes">New Patient</property>
-                        <signal name="activate" handler="clinica_user_interface_on_new_patient_menu_item_activate" swapped="no"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="new_doctor_menu_item">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="label" translatable="yes">New Doctor</property>
-                        <signal name="activate" handler="clinica_user_interface_on_new_doctor_menu_item_activate" swapped="no"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkSeparatorMenuItem" id="separatormenuitem1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_action_appearance">False</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="quit_menu_item">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="label" translatable="yes">_Quit</property>
-                        <property name="use_underline">True</property>
-                        <signal name="activate" handler="clinica_user_interface_on_window_destroy" swapped="no"/>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkMenuItem" id="view_menuitem">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="use_action_appearance">False</property>
-                <property name="label" translatable="yes">_View</property>
-                <property name="use_underline">True</property>
-                <child type="submenu">
-                  <object class="GtkMenu" id="menu2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
-                      <object class="GtkMenuItem" id="home_menu_item">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="label" translatable="yes">_Home</property>
-                        <property name="use_underline">True</property>
-                        <signal name="activate" handler="clinica_user_interface_on_home_menu_item_activate" swapped="no"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="patient_menu_item">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="label" translatable="yes">_Patients</property>
-                        <property name="use_underline">True</property>
-                        <signal name="activate" handler="clinica_user_interface_on_patient_menu_item_activate" swapped="no"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="doctor_menu_item">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="label" translatable="yes">_Doctors</property>
-                        <property name="use_underline">True</property>
-                        <signal name="activate" handler="clinica_user_interface_on_doctor_menu_item_activate" swapped="no"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="search_medicines_menu_item">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="label" translatable="yes">_Search medicines</property>
-                        <property name="use_underline">True</property>
-                        <signal name="activate" handler="clinica_user_interface_on_search_medicines_menu_item_activate" swapped="no"/>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkMenuItem" id="tools_menuitem">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="use_action_appearance">False</property>
-                <property name="label" translatable="yes">_Tools</property>
-                <property name="use_underline">True</property>
-                <child type="submenu">
-                  <object class="GtkMenu" id="menu4">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
-                      <object class="GtkMenuItem" id="settings_menu_item">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="label" translatable="yes">_Settings</property>
-                        <property name="use_underline">True</property>
-                        <signal name="activate" handler="clinica_user_interface_on_settings_menu_item_activate" swapped="no"/>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkMenuItem" id="menuitem3">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="use_action_appearance">False</property>
-                <property name="label" translatable="yes">_Help</property>
-                <property name="use_underline">True</property>
-                <child type="submenu">
-                  <object class="GtkMenu" id="menu3">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
-                      <object class="GtkMenuItem" id="help_menu_item">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="label" translatable="yes">_Contents</property>
-                        <property name="use_underline">True</property>
-                        <accelerator key="F1" signal="activate"/>
-                        <signal name="activate" handler="clinica_user_interface_on_help_menu_item_activate" swapped="no"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="about_menu_item">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="label" translatable="yes">_About</property>
-                        <property name="use_underline">True</property>
-                        <signal name="activate" handler="clinica_user_interface_on_about_menu_item_activate" swapped="no"/>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkAlignment" id="main">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="top_padding">5</property>
-            <property name="bottom_padding">5</property>
-            <property name="left_padding">5</property>
-            <property name="right_padding">5</property>
-            <child>
-              <placeholder/>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
-</interface>
diff --git a/vapi/config.vapi b/vapi/config.vapi
index 27a3637..1c85b73 100644
--- a/vapi/config.vapi
+++ b/vapi/config.vapi
@@ -8,5 +8,5 @@ namespace Config {
         public const string PACKAGE_NAME;
         public const string PACKAGE_VERSION;
         public const string VERSION;
-
+	public const string RESOURCE_BASE;
 }
diff --git a/vapi/jansson.vapi b/vapi/jansson.vapi
new file mode 100644
index 0000000..4509030
--- /dev/null
+++ b/vapi/jansson.vapi
@@ -0,0 +1,70 @@
+/*
+ *   This file is part of Clinica.
+ *
+ *   Clinica is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   Clinica is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with Clinica.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *   Authors: Leonardo Robol <leo at robol.it>
+ */
+
+[CCode(cheader_filename="jansson.h", lower_case_cprefix="json_", cprefix="")]
+namespace Jansson {
+
+	[CCode (cname = "size_t", cprefix="JSON_")]
+	public enum JsonFlags {
+		COMPACT,
+		ENSURE_ASCII,
+		SORT_KEYS,
+		PRESERVE_ORDER,
+		ENCODE_ANY,
+		ESCAPE_SLASH
+	}
+	
+	[CCode(cname="json_t", unref_function = "json_decref", ref_function = "json_incref", 
+	       lower_case_cprefix="json_")]
+	public class Json {
+		public static Json loads(string text, size_t flags, out Error error);
+		public static Json load_file(string filename, size_t flags, out Error error);
+		public string dumps(JsonFlags flags = 0);
+		public int dump_file (string output, JsonFlags flags = 0);
+		public static Json integer(int64 value);
+		public static Json real(double value);
+		public static Json string(string value);
+		public static Json object();
+		public static Json array();
+		public Json copy();
+		public Json deep_copy();
+		public bool is_array();
+		public int array_size();
+		public int array_append(Json value);
+		public unowned Json array_get(int index);
+		public bool is_object();
+		public bool is_string();
+		public bool is_integer();
+		public bool is_real();
+		public bool is_true();
+		public bool is_false();
+		public bool is_null();
+		public bool is_number();
+		public bool is_boolean();
+		public unowned string string_value();
+		public unowned int64 integer_value();
+		public unowned double real_value();
+		public unowned Json object_get(string field);
+		public int object_set(string key, Json value);
+	}
+
+	[CCode(cname="json_error_t")]
+	public struct Error {
+	}
+}
diff --git a/vapi/libpeas-gtk-1.0.vapi b/vapi/libpeas-gtk-1.0.vapi
new file mode 100644
index 0000000..34a0114
--- /dev/null
+++ b/vapi/libpeas-gtk-1.0.vapi
@@ -0,0 +1,34 @@
+/* peas-gtk.vapi generated by vapigen, do not modify. */
+
+[CCode (cprefix = "PeasGtk", gir_namespace = "PeasGtk", gir_version = "1.0", lower_case_cprefix = "peas_gtk_")]
+namespace PeasGtk {
+	[CCode (cheader_filename = "libpeas-gtk/peas-gtk.h", type_id = "peas_gtk_plugin_manager_get_type ()")]
+	public class PluginManager : Gtk.Box, Atk.Implementor, Gtk.Buildable, Gtk.Orientable {
+		[CCode (has_construct_function = false, type = "GtkWidget*")]
+		public PluginManager (Peas.Engine? engine);
+		public unowned Gtk.Widget get_view ();
+		[NoAccessorMethod]
+		public Peas.Engine engine { owned get; construct; }
+		public PeasGtk.PluginManagerView view { get; construct; }
+	}
+	[CCode (cheader_filename = "libpeas-gtk/peas-gtk.h", type_id = "peas_gtk_plugin_manager_view_get_type ()")]
+	public class PluginManagerView : Gtk.TreeView, Atk.Implementor, Gtk.Buildable, Gtk.Scrollable {
+		[CCode (has_construct_function = false, type = "GtkWidget*")]
+		public PluginManagerView (Peas.Engine? engine);
+		public Peas.PluginInfo get_selected_plugin ();
+		[Deprecated (since = "1.2")]
+		public bool get_show_builtin ();
+		public void set_selected_plugin (Peas.PluginInfo info);
+		[Deprecated (since = "1.2")]
+		public void set_show_builtin (bool show_builtin);
+		[NoAccessorMethod]
+		public Peas.Engine engine { owned get; construct; }
+		[Deprecated (since = "1.2")]
+		public bool show_builtin { get; set; }
+		public virtual signal void populate_popup (Gtk.Menu menu);
+	}
+	[CCode (cheader_filename = "libpeas-gtk/peas-gtk.h", type_cname = "PeasGtkConfigurableInterface", type_id = "peas_gtk_configurable_get_type ()")]
+	public interface Configurable : GLib.Object {
+		public abstract Gtk.Widget create_configure_widget ();
+	}
+}
diff --git a/vapi/librsvg-2.0.vapi b/vapi/librsvg-2.0.vapi
new file mode 100644
index 0000000..d305323
--- /dev/null
+++ b/vapi/librsvg-2.0.vapi
@@ -0,0 +1,131 @@
+/* librsvg-2.0.vapi generated by vapigen-0.18, do not modify. */
+
+[CCode (cprefix = "Rsvg", gir_namespace = "Rsvg", gir_version = "2.0", lower_case_cprefix = "rsvg_")]
+namespace Rsvg {
+	namespace Version {
+		[CCode (cheader_filename = "librsvg/rsvg.h", cname = "LIBRSVG_MAJOR_VERSION")]
+		public const int MAJOR;
+		[CCode (cheader_filename = "librsvg/rsvg.h", cname = "LIBRSVG_MICRO_VERSION")]
+		public const int MICRO;
+		[CCode (cheader_filename = "librsvg/rsvg.h", cname = "LIBRSVG_MINOR_VERSION")]
+		public const int MINOR;
+		[CCode (cheader_filename = "librsvg/rsvg.h", cname = "LIBRSVG_VERSION")]
+		public const string STRING;
+		[CCode (cheader_filename = "librsvg/rsvg.h", cname = "LIBRSVG_CHECK_VERSION")]
+		public static bool check (int major, int minor, int micro);
+	}
+	[CCode (cheader_filename = "librsvg/rsvg.h")]
+	public class Handle : GLib.Object {
+		[CCode (has_construct_function = false)]
+		public Handle ();
+		public bool close () throws GLib.Error;
+		[Deprecated (replacement = "GLib.Object.unref")]
+		public void free ();
+		[CCode (has_construct_function = false)]
+		public Handle.from_data ([CCode (array_length_cname = "data_len", array_length_pos = 1.1, array_length_type = "gsize")] uint8[] data) throws GLib.Error;
+		[CCode (has_construct_function = false)]
+		public Handle.from_file (string file_name) throws GLib.Error;
+		[CCode (has_construct_function = false)]
+		public Handle.from_gfile_sync (GLib.File file, Rsvg.HandleFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error;
+		[CCode (has_construct_function = false)]
+		public Handle.from_stream_sync (GLib.InputStream input_stream, GLib.File? base_file, Rsvg.HandleFlags flags, GLib.Cancellable? cancellable = null) throws GLib.Error;
+		public unowned string get_base_uri ();
+		[Deprecated (since = "2.36")]
+		public unowned string get_desc ();
+		public Rsvg.DimensionData get_dimensions ();
+		public bool get_dimensions_sub (out Rsvg.DimensionData dimension_data, string id);
+		[Deprecated (since = "2.36")]
+		public unowned string get_metadata ();
+		public Gdk.Pixbuf get_pixbuf ();
+		public Gdk.Pixbuf get_pixbuf_sub (string id);
+		public bool get_position_sub (out Rsvg.PositionData position_data, string id);
+		[Deprecated (since = "2.36")]
+		public unowned string get_title ();
+		public bool has_sub (string id);
+		public bool read_stream_sync (GLib.InputStream stream, GLib.Cancellable? cancellable = null) throws GLib.Error;
+		public bool render_cairo (Cairo.Context cr);
+		public bool render_cairo_sub (Cairo.Context cr, string id);
+		public void set_base_gfile (GLib.File base_file);
+		public void set_base_uri (string base_uri);
+		public void set_dpi (double dpi);
+		public void set_dpi_x_y (double dpi_x, double dpi_y);
+		[Deprecated (replacement = "render_cairo")]
+		public void set_size_callback (owned Rsvg.SizeFunc size_func);
+		[CCode (has_construct_function = false)]
+		public Handle.with_flags (Rsvg.HandleFlags flags);
+		public bool write ([CCode (array_length_cname = "count", array_length_pos = 1.1, array_length_type = "gsize")] uint8[] buf) throws GLib.Error;
+		public string base_uri { get; set construct; }
+		[NoAccessorMethod]
+		public string desc { owned get; }
+		[NoAccessorMethod]
+		public double dpi_x { get; set construct; }
+		[NoAccessorMethod]
+		public double dpi_y { get; set construct; }
+		[NoAccessorMethod]
+		public double em { get; }
+		[NoAccessorMethod]
+		public double ex { get; }
+		[NoAccessorMethod]
+		public Rsvg.HandleFlags flags { get; construct; }
+		[NoAccessorMethod]
+		public int height { get; }
+		[NoAccessorMethod]
+		public string metadata { owned get; }
+		[NoAccessorMethod]
+		public string title { owned get; }
+		[NoAccessorMethod]
+		public int width { get; }
+	}
+	[CCode (cheader_filename = "librsvg/rsvg.h", has_type_id = false)]
+	public struct DimensionData {
+		public int width;
+		public int height;
+		public double em;
+		public double ex;
+	}
+	[CCode (cheader_filename = "librsvg/rsvg.h", has_type_id = false)]
+	public struct PositionData {
+		public int x;
+		public int y;
+	}
+	[CCode (cheader_filename = "librsvg/rsvg.h", cprefix = "RSVG_HANDLE_FLAGS_", type_id = "rsvg_handle_flags_get_type ()")]
+	[Flags]
+	public enum HandleFlags {
+		NONE
+	}
+	[CCode (cheader_filename = "librsvg/rsvg.h", cprefix = "RSVG_ERROR_")]
+	public errordomain Error {
+		FAILED;
+		public static GLib.Quark quark ();
+	}
+	[CCode (cheader_filename = "librsvg/rsvg.h")]
+	[Deprecated]
+	public delegate void SizeFunc (ref int width, ref int height);
+	[CCode (cheader_filename = "librsvg/rsvg.h")]
+	public static void cleanup ();
+	[CCode (cheader_filename = "librsvg/rsvg.h")]
+	[Deprecated (since = "2.36")]
+	public static void init ();
+	[CCode (cheader_filename = "librsvg/rsvg.h")]
+	[Deprecated]
+	public static Gdk.Pixbuf pixbuf_from_file (string file_name) throws GLib.Error;
+	[CCode (cheader_filename = "librsvg/rsvg.h")]
+	[Deprecated]
+	public static Gdk.Pixbuf pixbuf_from_file_at_max_size (string file_name, int max_width, int max_height) throws GLib.Error;
+	[CCode (cheader_filename = "librsvg/rsvg.h")]
+	[Deprecated]
+	public static Gdk.Pixbuf pixbuf_from_file_at_size (string file_name, int width, int height) throws GLib.Error;
+	[CCode (cheader_filename = "librsvg/rsvg.h")]
+	[Deprecated]
+	public static Gdk.Pixbuf pixbuf_from_file_at_zoom (string file_name, double x_zoom, double y_zoom) throws GLib.Error;
+	[CCode (cheader_filename = "librsvg/rsvg.h")]
+	[Deprecated]
+	public static Gdk.Pixbuf pixbuf_from_file_at_zoom_with_max (string file_name, double x_zoom, double y_zoom, int max_width, int max_height) throws GLib.Error;
+	[CCode (cheader_filename = "librsvg/rsvg.h")]
+	public static void set_default_dpi (double dpi);
+	[CCode (cheader_filename = "librsvg/rsvg.h")]
+	public static void set_default_dpi_x_y (double dpi_x, double dpi_y);
+	[CCode (cheader_filename = "librsvg/rsvg.h")]
+	[Deprecated (since = "2.36")]
+	public static void term ();
+}
diff --git a/waf b/waf
deleted file mode 100755
index 8d19581..0000000
--- a/waf
+++ /dev/null
@@ -1,162 +0,0 @@
-#!/usr/bin/env python
-# encoding: ISO8859-1
-# Thomas Nagy, 2005-2011
-
-"""
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-3. The name of the author may not be used to endorse or promote products
-   derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
-IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-"""
-
-import os, sys
-
-VERSION="1.6.8"
-REVISION="43817e6f8f78c3c700017868bea7c4b5"
-INSTALL=''
-C1='#5'
-C2='#4'
-cwd = os.getcwd()
-join = os.path.join
-
-
-WAF='waf'
-def b(x):
-	return x
-if sys.hexversion>0x300000f:
-	WAF='waf3'
-	def b(x):
-		return x.encode()
-
-def err(m):
-	print(('\033[91mError: %s\033[0m' % m))
-	sys.exit(1)
-
-def unpack_wafdir(dir):
-	f = open(sys.argv[0],'rb')
-	c = 'corrupt archive (%d)'
-	while 1:
-		line = f.readline()
-		if not line: err('run waf-light from a folder containing waflib')
-		if line == b('#==>\n'):
-			txt = f.readline()
-			if not txt: err(c % 1)
-			if f.readline() != b('#<==\n'): err(c % 2)
-			break
-	if not txt: err(c % 3)
-	txt = txt[1:-1].replace(b(C1), b('\n')).replace(b(C2), b('\r'))
-
-	import shutil, tarfile
-	try: shutil.rmtree(dir)
-	except OSError: pass
-	try:
-		for x in ['Tools', 'extras']:
-			os.makedirs(join(dir, 'waflib', x))
-	except OSError:
-		err("Cannot unpack waf lib into %s\nMove waf into a writeable directory" % dir)
-
-	os.chdir(dir)
-	tmp = 't.bz2'
-	t = open(tmp,'wb')
-	t.write(txt)
-	t.close()
-
-	try:
-		t = tarfile.open(tmp)
-	except:
-		try:
-			os.system('bunzip2 t.bz2')
-			t = tarfile.open('t')
-			tmp = 't'
-		except:
-			os.chdir(cwd)
-			try: shutil.rmtree(dir)
-			except OSError: pass
-			err("Waf cannot be unpacked, check that bzip2 support is present")
-
-	for x in t: t.extract(x)
-	t.close()
-
-	for x in ['Tools', 'extras']:
-		os.chmod(join('waflib',x), 493)
-
-	if sys.hexversion<0x300000f:
-		sys.path = [join(dir, 'waflib')] + sys.path
-		import fixpy2
-		fixpy2.fixdir(dir)
-
-	os.unlink(tmp)
-	os.chdir(cwd)
-
-	try: dir = unicode(dir, 'mbcs')
-	except: pass
-	try:
-		from ctypes import windll
-		windll.kernel32.SetFileAttributesW(dir, 2)
-	except:
-		pass
-
-def test(dir):
-	try:
-		os.stat(join(dir, 'waflib'))
-		return os.path.abspath(dir)
-	except OSError:
-		pass
-
-def find_lib():
-	name = sys.argv[0]
-	base = os.path.dirname(os.path.abspath(name))
-
-	#devs use $WAFDIR
-	w=test(os.environ.get('WAFDIR', ''))
-	if w: return w
-
-	#waf-light
-	if name.endswith('waf-light'):
-		w = test(base)
-		if w: return w
-		err('waf-light requires waflib -> export WAFDIR=/folder')
-
-	dirname = '%s-%s-%s' % (WAF, VERSION, REVISION)
-	for i in [INSTALL,'/usr','/usr/local','/opt']:
-		w = test(i + '/lib/' + dirname)
-		if w: return w
-
-	#waf-local
-	dir = join(base, (sys.platform != 'win32' and '.' or '') + dirname)
-	w = test(dir)
-	if w: return w
-
-	#unpack
-	unpack_wafdir(dir)
-	return dir
-
-wafdir = find_lib()
-sys.path.insert(0, wafdir)
-
-if __name__ == '__main__':
-	import waflib.extras.compat15
-	from waflib import Scripting
-	Scripting.waf_entry_point(cwd, VERSION, wafdir)
-
diff --git a/waflib/Build.py b/waflib/Build.py
deleted file mode 100644
index 4476b0f..0000000
--- a/waflib/Build.py
+++ /dev/null
@@ -1,733 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,sys,errno,re,shutil
-try:import cPickle
-except:import pickle as cPickle
-from waflib import Runner,TaskGen,Utils,ConfigSet,Task,Logs,Options,Context,Errors
-import waflib.Node
-CACHE_DIR='c4che'
-CACHE_SUFFIX='_cache.py'
-INSTALL=1337
-UNINSTALL=-1337
-SAVED_ATTRS='root node_deps raw_deps task_sigs'.split()
-CFG_FILES='cfg_files'
-POST_AT_ONCE=0
-POST_LAZY=1
-POST_BOTH=2
-class BuildContext(Context.Context):
-	'''executes the build'''
-	cmd='build'
-	variant=''
-	def __init__(self,**kw):
-		super(BuildContext,self).__init__(**kw)
-		self.is_install=0
-		self.top_dir=kw.get('top_dir',Context.top_dir)
-		self.run_dir=kw.get('run_dir',Context.run_dir)
-		self.post_mode=POST_AT_ONCE
-		self.out_dir=kw.get('out_dir',Context.out_dir)
-		self.cache_dir=kw.get('cache_dir',None)
-		if not self.cache_dir:
-			self.cache_dir=self.out_dir+os.sep+CACHE_DIR
-		self.all_envs={}
-		self.task_sigs={}
-		self.node_deps={}
-		self.raw_deps={}
-		self.cache_dir_contents={}
-		self.task_gen_cache_names={}
-		self.launch_dir=Context.launch_dir
-		self.jobs=Options.options.jobs
-		self.targets=Options.options.targets
-		self.keep=Options.options.keep
-		self.cache_global=Options.cache_global
-		self.nocache=Options.options.nocache
-		self.progress_bar=Options.options.progress_bar
-		self.deps_man=Utils.defaultdict(list)
-		self.current_group=0
-		self.groups=[]
-		self.group_names={}
-	def get_variant_dir(self):
-		if not self.variant:
-			return self.out_dir
-		return os.path.join(self.out_dir,self.variant)
-	variant_dir=property(get_variant_dir,None)
-	def __call__(self,*k,**kw):
-		kw['bld']=self
-		ret=TaskGen.task_gen(*k,**kw)
-		self.task_gen_cache_names={}
-		self.add_to_group(ret,group=kw.get('group',None))
-		return ret
-	def __copy__(self):
-		raise Errors.WafError('build contexts are not supposed to be copied')
-	def install_files(self,*k,**kw):
-		pass
-	def install_as(self,*k,**kw):
-		pass
-	def symlink_as(self,*k,**kw):
-		pass
-	def load_envs(self):
-		try:
-			lst=Utils.listdir(self.cache_dir)
-		except OSError ,e:
-			if e.errno==errno.ENOENT:
-				raise Errors.WafError('The project was not configured: run "waf configure" first!')
-			else:
-				raise
-		if not lst:
-			raise Errors.WafError('The cache directory is empty: reconfigure the project')
-		for fname in lst:
-			if fname.endswith(CACHE_SUFFIX):
-				env=ConfigSet.ConfigSet(os.path.join(self.cache_dir,fname))
-				name=fname[:-len(CACHE_SUFFIX)]
-				self.all_envs[name]=env
-				for f in env[CFG_FILES]:
-					newnode=self.root.find_resource(f)
-					try:
-						h=Utils.h_file(newnode.abspath())
-					except(IOError,AttributeError):
-						Logs.error('cannot find %r'%f)
-						h=Utils.SIG_NIL
-					newnode.sig=h
-	def init_dirs(self):
-		if not(os.path.isabs(self.top_dir)and os.path.isabs(self.out_dir)):
-			raise Errors.WafError('The project was not configured: run "waf configure" first!')
-		self.path=self.srcnode=self.root.find_dir(self.top_dir)
-		self.bldnode=self.root.make_node(self.variant_dir)
-		self.bldnode.mkdir()
-	def execute(self):
-		self.restore()
-		if not self.all_envs:
-			self.load_envs()
-		self.execute_build()
-	def execute_build(self):
-		Logs.info("Waf: Entering directory `%s'"%self.variant_dir)
-		self.recurse([self.run_dir])
-		self.pre_build()
-		self.timer=Utils.Timer()
-		if self.progress_bar:
-			sys.stderr.write(Logs.colors.cursor_off)
-		try:
-			self.compile()
-		finally:
-			if self.progress_bar==1:
-				c=len(self.returned_tasks)or 1
-				self.to_log(self.progress_line(c,c,Logs.colors.BLUE,Logs.colors.NORMAL))
-				print('')
-				sys.stdout.flush()
-				sys.stderr.write(Logs.colors.cursor_on)
-			Logs.info("Waf: Leaving directory `%s'"%self.variant_dir)
-		self.post_build()
-	def restore(self):
-		try:
-			env=ConfigSet.ConfigSet(os.path.join(self.cache_dir,'build.config.py'))
-		except(IOError,OSError):
-			pass
-		else:
-			if env['version']<Context.HEXVERSION:
-				raise Errors.WafError('Version mismatch! reconfigure the project')
-			for t in env['tools']:
-				self.setup(**t)
-		f=None
-		try:
-			dbfn=os.path.join(self.variant_dir,Context.DBFILE)
-			try:
-				f=open(dbfn,'rb')
-			except(IOError,EOFError):
-				Logs.debug('build: could not load the build cache %s (missing)'%dbfn)
-			else:
-				try:
-					waflib.Node.pickle_lock.acquire()
-					waflib.Node.Nod3=self.node_class
-					try:
-						data=cPickle.load(f)
-					except Exception ,e:
-						Logs.debug('build: could not pickle the build cache %s: %r'%(dbfn,e))
-					else:
-						for x in SAVED_ATTRS:
-							setattr(self,x,data[x])
-				finally:
-					waflib.Node.pickle_lock.release()
-		finally:
-			if f:
-				f.close()
-		self.init_dirs()
-	def store(self):
-		data={}
-		for x in SAVED_ATTRS:
-			data[x]=getattr(self,x)
-		db=os.path.join(self.variant_dir,Context.DBFILE)
-		try:
-			waflib.Node.pickle_lock.acquire()
-			waflib.Node.Nod3=self.node_class
-			f=None
-			try:
-				f=open(db+'.tmp','wb')
-				cPickle.dump(data,f)
-			finally:
-				if f:
-					f.close()
-		finally:
-			waflib.Node.pickle_lock.release()
-		try:
-			st=os.stat(db)
-			os.unlink(db)
-			if not Utils.is_win32:
-				os.chown(db+'.tmp',st.st_uid,st.st_gid)
-		except(AttributeError,OSError):
-			pass
-		os.rename(db+'.tmp',db)
-	def compile(self):
-		Logs.debug('build: compile()')
-		self.producer=Runner.Parallel(self,self.jobs)
-		self.producer.biter=self.get_build_iterator()
-		self.returned_tasks=[]
-		try:
-			self.producer.start()
-		except KeyboardInterrupt:
-			self.store()
-			raise
-		else:
-			if self.producer.dirty:
-				self.store()
-		if self.producer.error:
-			raise Errors.BuildError(self.producer.error)
-	def setup(self,tool,tooldir=None,funs=None):
-		if isinstance(tool,list):
-			for i in tool:self.setup(i,tooldir)
-			return
-		module=Context.load_tool(tool,tooldir)
-		if hasattr(module,"setup"):module.setup(self)
-	def get_env(self):
-		try:
-			return self.all_envs[self.variant]
-		except KeyError:
-			return self.all_envs['']
-	def set_env(self,val):
-		self.all_envs[self.variant]=val
-	env=property(get_env,set_env)
-	def add_manual_dependency(self,path,value):
-		if isinstance(path,waflib.Node.Node):
-			node=path
-		elif os.path.isabs(path):
-			node=self.root.find_resource(path)
-		else:
-			node=self.path.find_resource(path)
-		self.deps_man[id(node)].append(value)
-	def launch_node(self):
-		try:
-			return self.p_ln
-		except AttributeError:
-			self.p_ln=self.root.find_dir(self.launch_dir)
-			return self.p_ln
-	def hash_env_vars(self,env,vars_lst):
-		if not env.table:
-			env=env.parent
-			if not env:
-				return Utils.SIG_NIL
-		idx=str(id(env))+str(vars_lst)
-		try:
-			cache=self.cache_env
-		except AttributeError:
-			cache=self.cache_env={}
-		else:
-			try:
-				return self.cache_env[idx]
-			except KeyError:
-				pass
-		lst=[env[a]for a in vars_lst]
-		ret=Utils.h_list(lst)
-		Logs.debug('envhash: %s %r',Utils.to_hex(ret),lst)
-		cache[idx]=ret
-		return ret
-	def get_tgen_by_name(self,name):
-		cache=self.task_gen_cache_names
-		if not cache:
-			for g in self.groups:
-				for tg in g:
-					try:
-						cache[tg.name]=tg
-					except AttributeError:
-						pass
-		try:
-			return cache[name]
-		except KeyError:
-			raise Errors.WafError('Could not find a task generator for the name %r'%name)
-	def progress_line(self,state,total,col1,col2):
-		n=len(str(total))
-		Utils.rot_idx+=1
-		ind=Utils.rot_chr[Utils.rot_idx%4]
-		pc=(100.*state)/total
-		eta=str(self.timer)
-		fs="[%%%dd/%%%dd][%%s%%2d%%%%%%s][%s]["%(n,n,ind)
-		left=fs%(state,total,col1,pc,col2)
-		right='][%s%s%s]'%(col1,eta,col2)
-		cols=Logs.get_term_cols()-len(left)-len(right)+2*len(col1)+2*len(col2)
-		if cols<7:cols=7
-		ratio=((cols*state)//total)-1
-		bar=('='*ratio+'>').ljust(cols)
-		msg=Utils.indicator%(left,bar,right)
-		return msg
-	def declare_chain(self,*k,**kw):
-		return TaskGen.declare_chain(*k,**kw)
-	def pre_build(self):
-		for m in getattr(self,'pre_funs',[]):
-			m(self)
-	def post_build(self):
-		for m in getattr(self,'post_funs',[]):
-			m(self)
-	def add_pre_fun(self,meth):
-		try:
-			self.pre_funs.append(meth)
-		except AttributeError:
-			self.pre_funs=[meth]
-	def add_post_fun(self,meth):
-		try:
-			self.post_funs.append(meth)
-		except AttributeError:
-			self.post_funs=[meth]
-	def get_group(self,x):
-		if not self.groups:
-			self.add_group()
-		if x is None:
-			return self.groups[self.current_group]
-		if x in self.group_names:
-			return self.group_names[x]
-		return self.groups[x]
-	def add_to_group(self,tgen,group=None):
-		assert(isinstance(tgen,TaskGen.task_gen)or isinstance(tgen,Task.TaskBase))
-		tgen.bld=self
-		self.get_group(group).append(tgen)
-	def get_group_name(self,g):
-		if not isinstance(g,list):
-			g=self.groups[g]
-		for x in self.group_names:
-			if id(self.group_names[x])==id(g):
-				return x
-		return''
-	def get_group_idx(self,tg):
-		se=id(tg)
-		for i in range(len(self.groups)):
-			for t in self.groups[i]:
-				if id(t)==se:
-					return i
-		return None
-	def add_group(self,name=None,move=True):
-		if name and name in self.group_names:
-			Logs.error('add_group: name %s already present'%name)
-		g=[]
-		self.group_names[name]=g
-		self.groups.append(g)
-		if move:
-			self.current_group=len(self.groups)-1
-	def set_group(self,idx):
-		if isinstance(idx,str):
-			g=self.group_names[idx]
-			for i in range(len(self.groups)):
-				if id(g)==id(self.groups[i]):
-					self.current_group=i
-		else:
-			self.current_group=idx
-	def total(self):
-		total=0
-		for group in self.groups:
-			for tg in group:
-				try:
-					total+=len(tg.tasks)
-				except AttributeError:
-					total+=1
-		return total
-	def get_targets(self):
-		to_post=[]
-		min_grp=0
-		for name in self.targets.split(','):
-			tg=self.get_tgen_by_name(name)
-			if not tg:
-				raise Errors.WafError('target %r does not exist'%name)
-			m=self.get_group_idx(tg)
-			if m>min_grp:
-				min_grp=m
-				to_post=[tg]
-			elif m==min_grp:
-				to_post.append(tg)
-		return(min_grp,to_post)
-	def post_group(self):
-		if self.targets=='*':
-			for tg in self.groups[self.cur]:
-				try:
-					f=tg.post
-				except AttributeError:
-					pass
-				else:
-					f()
-		elif self.targets:
-			if self.cur<self._min_grp:
-				for tg in self.groups[self.cur]:
-					try:
-						f=tg.post
-					except AttributeError:
-						pass
-					else:
-						f()
-			else:
-				for tg in self._exact_tg:
-					tg.post()
-		else:
-			ln=self.launch_node()
-			for tg in self.groups[self.cur]:
-				try:
-					f=tg.post
-				except AttributeError:
-					pass
-				else:
-					if tg.path.is_child_of(ln):
-						f()
-	def get_tasks_group(self,idx):
-		tasks=[]
-		for tg in self.groups[idx]:
-			if isinstance(tg,Task.TaskBase):
-				tasks.append(tg)
-			else:
-				tasks.extend(tg.tasks)
-		return tasks
-	def get_build_iterator(self):
-		self.cur=0
-		if self.targets and self.targets!='*':
-			(self._min_grp,self._exact_tg)=self.get_targets()
-		global lazy_post
-		if self.post_mode!=POST_LAZY:
-			while self.cur<len(self.groups):
-				self.post_group()
-				self.cur+=1
-			self.cur=0
-		while self.cur<len(self.groups):
-			if self.post_mode!=POST_AT_ONCE:
-				self.post_group()
-			tasks=self.get_tasks_group(self.cur)
-			Task.set_file_constraints(tasks)
-			Task.set_precedence_constraints(tasks)
-			self.cur_tasks=tasks
-			self.cur+=1
-			if not tasks:
-				continue
-			yield tasks
-		while 1:
-			yield[]
-class inst(Task.Task):
-	color='CYAN'
-	def post(self):
-		buf=[]
-		for x in self.source:
-			if isinstance(x,waflib.Node.Node):
-				y=x
-			else:
-				y=self.path.find_resource(x)
-				if not y:
-					idx=self.generator.bld.get_group_idx(self)
-					for tg in self.generator.bld.groups[idx]:
-						if not isinstance(tg,inst)and id(tg)!=id(self):
-							tg.post()
-						y=self.path.find_resource(x)
-						if y:
-							break
-					else:
-						raise Errors.WafError('could not find %r in %r'%(x,self.path))
-			buf.append(y)
-		self.inputs=buf
-	def runnable_status(self):
-		ret=super(inst,self).runnable_status()
-		if ret==Task.SKIP_ME:
-			return Task.RUN_ME
-		return ret
-	def __str__(self):
-		return''
-	def run(self):
-		return self.generator.exec_task()
-	def get_install_path(self,destdir=True):
-		dest=Utils.subst_vars(self.dest,self.env)
-		dest=dest.replace('/',os.sep)
-		if destdir and Options.options.destdir:
-			dest=os.path.join(Options.options.destdir,os.path.splitdrive(dest)[1].lstrip(os.sep))
-		return dest
-	def exec_install_files(self):
-		destpath=self.get_install_path()
-		if not destpath:
-			raise Errors.WafError('unknown installation path %r'%self.generator)
-		for x,y in zip(self.source,self.inputs):
-			if self.relative_trick:
-				destfile=os.path.join(destpath,y.path_from(self.path))
-				Utils.check_dir(os.path.dirname(destfile))
-			else:
-				destfile=os.path.join(destpath,y.name)
-			self.generator.bld.do_install(y.abspath(),destfile,self.chmod)
-	def exec_install_as(self):
-		destfile=self.get_install_path()
-		self.generator.bld.do_install(self.inputs[0].abspath(),destfile,self.chmod)
-	def exec_symlink_as(self):
-		destfile=self.get_install_path()
-		self.generator.bld.do_link(self.link,destfile)
-class InstallContext(BuildContext):
-	'''installs the targets on the system'''
-	cmd='install'
-	def __init__(self,**kw):
-		super(InstallContext,self).__init__(**kw)
-		self.uninstall=[]
-		self.is_install=INSTALL
-	def do_install(self,src,tgt,chmod=Utils.O644):
-		d,_=os.path.split(tgt)
-		if not d:
-			raise Errors.WafError('Invalid installation given %r->%r'%(src,tgt))
-		Utils.check_dir(d)
-		srclbl=src.replace(self.srcnode.abspath()+os.sep,'')
-		if not Options.options.force:
-			try:
-				st1=os.stat(tgt)
-				st2=os.stat(src)
-			except OSError:
-				pass
-			else:
-				if st1.st_mtime+2>=st2.st_mtime and st1.st_size==st2.st_size:
-					if not self.progress_bar:
-						Logs.info('- install %s (from %s)'%(tgt,srclbl))
-					return False
-		if not self.progress_bar:
-			Logs.info('+ install %s (from %s)'%(tgt,srclbl))
-		try:
-			os.remove(tgt)
-		except OSError:
-			pass
-		try:
-			shutil.copy2(src,tgt)
-			os.chmod(tgt,chmod)
-		except IOError:
-			try:
-				os.stat(src)
-			except(OSError,IOError):
-				Logs.error('File %r does not exist'%src)
-			raise Errors.WafError('Could not install the file %r'%tgt)
-	def do_link(self,src,tgt):
-		d,_=os.path.split(tgt)
-		Utils.check_dir(d)
-		link=False
-		if not os.path.islink(tgt):
-			link=True
-		elif os.readlink(tgt)!=src:
-			link=True
-		if link:
-			try:os.remove(tgt)
-			except OSError:pass
-			if not self.progress_bar:
-				Logs.info('+ symlink %s (to %s)'%(tgt,src))
-			os.symlink(src,tgt)
-		else:
-			if not self.progress_bar:
-				Logs.info('- symlink %s (to %s)'%(tgt,src))
-	def run_task_now(self,tsk,postpone):
-		tsk.post()
-		if not postpone:
-			if tsk.runnable_status()==Task.ASK_LATER:
-				raise self.WafError('cannot post the task %r'%tsk)
-			tsk.run()
-	def install_files(self,dest,files,env=None,chmod=Utils.O644,relative_trick=False,cwd=None,add=True,postpone=True):
-		tsk=inst(env=env or self.env)
-		tsk.bld=self
-		tsk.path=cwd or self.path
-		tsk.chmod=chmod
-		if isinstance(files,waflib.Node.Node):
-			tsk.source=[files]
-		else:
-			tsk.source=Utils.to_list(files)
-		tsk.dest=dest
-		tsk.exec_task=tsk.exec_install_files
-		tsk.relative_trick=relative_trick
-		if add:self.add_to_group(tsk)
-		self.run_task_now(tsk,postpone)
-		return tsk
-	def install_as(self,dest,srcfile,env=None,chmod=Utils.O644,cwd=None,add=True,postpone=True):
-		tsk=inst(env=env or self.env)
-		tsk.bld=self
-		tsk.path=cwd or self.path
-		tsk.chmod=chmod
-		tsk.source=[srcfile]
-		tsk.dest=dest
-		tsk.exec_task=tsk.exec_install_as
-		if add:self.add_to_group(tsk)
-		self.run_task_now(tsk,postpone)
-		return tsk
-	def symlink_as(self,dest,src,env=None,cwd=None,add=True,postpone=True):
-		if Utils.is_win32:
-			return
-		tsk=inst(env=env or self.env)
-		tsk.bld=self
-		tsk.dest=dest
-		tsk.path=cwd or self.path
-		tsk.source=[]
-		tsk.link=src
-		tsk.exec_task=tsk.exec_symlink_as
-		if add:self.add_to_group(tsk)
-		self.run_task_now(tsk,postpone)
-		return tsk
-class UninstallContext(InstallContext):
-	'''removes the targets installed'''
-	cmd='uninstall'
-	def __init__(self,**kw):
-		super(UninstallContext,self).__init__(**kw)
-		self.is_install=UNINSTALL
-	def do_install(self,src,tgt,chmod=Utils.O644):
-		if not self.progress_bar:
-			Logs.info('- remove %s'%tgt)
-		self.uninstall.append(tgt)
-		try:
-			os.remove(tgt)
-		except OSError ,e:
-			if e.errno!=errno.ENOENT:
-				if not getattr(self,'uninstall_error',None):
-					self.uninstall_error=True
-					Logs.warn('build: some files could not be uninstalled (retry with -vv to list them)')
-				if Logs.verbose>1:
-					Logs.warn('could not remove %s (error code %r)'%(e.filename,e.errno))
-		while tgt:
-			tgt=os.path.dirname(tgt)
-			try:
-				os.rmdir(tgt)
-			except OSError:
-				break
-	def do_link(self,src,tgt):
-		try:
-			if not self.progress_bar:
-				Logs.info('- unlink %s'%tgt)
-			os.remove(tgt)
-		except OSError:
-			pass
-		while tgt:
-			tgt=os.path.dirname(tgt)
-			try:
-				os.rmdir(tgt)
-			except OSError:
-				break
-	def execute(self):
-		try:
-			def runnable_status(self):
-				return Task.SKIP_ME
-			setattr(Task.Task,'runnable_status_back',Task.Task.runnable_status)
-			setattr(Task.Task,'runnable_status',runnable_status)
-			super(UninstallContext,self).execute()
-		finally:
-			setattr(Task.Task,'runnable_status',Task.Task.runnable_status_back)
-class CleanContext(BuildContext):
-	'''cleans the project'''
-	cmd='clean'
-	def execute(self):
-		self.restore()
-		if not self.all_envs:
-			self.load_envs()
-		self.recurse([self.run_dir])
-		try:
-			self.clean()
-		finally:
-			self.store()
-	def clean(self):
-		Logs.debug('build: clean called')
-		if self.bldnode!=self.srcnode:
-			lst=[self.root.find_or_declare(f)for f in self.env[CFG_FILES]]
-			for n in self.bldnode.ant_glob('**/*',excl='lock* *conf_check_*/** config.log c4che/*'):
-				if n in lst:
-					continue
-				n.delete()
-		self.root.children={}
-		for v in'node_deps task_sigs raw_deps'.split():
-			setattr(self,v,{})
-class ListContext(BuildContext):
-	'''lists the targets to execute'''
-	cmd='list'
-	def execute(self):
-		self.restore()
-		if not self.all_envs:
-			self.load_envs()
-		self.recurse([self.run_dir])
-		self.pre_build()
-		self.timer=Utils.Timer()
-		for g in self.groups:
-			for tg in g:
-				try:
-					f=tg.post
-				except AttributeError:
-					pass
-				else:
-					f()
-		try:
-			self.get_tgen_by_name('')
-		except:
-			pass
-		lst=list(self.task_gen_cache_names.keys())
-		lst.sort()
-		for k in lst:
-			Logs.pprint('GREEN',k)
-class StepContext(BuildContext):
-	'''executes tasks in a step-by-step fashion, for debugging'''
-	cmd='step'
-	def __init__(self,**kw):
-		super(StepContext,self).__init__(**kw)
-		self.files=Options.options.files
-	def compile(self):
-		if not self.files:
-			Logs.warn('Add a pattern for the debug build, for example "waf step --files=main.c,app"')
-			BuildContext.compile(self)
-			return
-		for g in self.groups:
-			for tg in g:
-				try:
-					f=tg.post
-				except AttributeError:
-					pass
-				else:
-					f()
-			for pat in self.files.split(','):
-				matcher=self.get_matcher(pat)
-				for tg in g:
-					if isinstance(tg,Task.TaskBase):
-						lst=[tg]
-					else:
-						lst=tg.tasks
-					for tsk in lst:
-						do_exec=False
-						for node in getattr(tsk,'inputs',[]):
-							if matcher(node,output=False):
-								do_exec=True
-								break
-						for node in getattr(tsk,'outputs',[]):
-							if matcher(node,output=True):
-								do_exec=True
-								break
-						if do_exec:
-							ret=tsk.run()
-							Logs.info('%s -> exit %r'%(str(tsk),ret))
-	def get_matcher(self,pat):
-		inn=True
-		out=True
-		if pat.startswith('in:'):
-			out=False
-			pat=pat.replace('in:','')
-		elif pat.startswith('out:'):
-			inn=False
-			pat=pat.replace('out:','')
-		anode=self.root.find_node(pat)
-		pattern=None
-		if not anode:
-			if not pat.startswith('^'):
-				pat='^.+?%s'%pat
-			if not pat.endswith('$'):
-				pat='%s$'%pat
-			pattern=re.compile(pat)
-		def match(node,output):
-			if output==True and not out:
-				return False
-			if output==False and not inn:
-				return False
-			if anode:
-				return anode==node
-			else:
-				return pattern.match(node.abspath())
-		return match
-BuildContext.store=Utils.nogc(BuildContext.store)
-BuildContext.restore=Utils.nogc(BuildContext.restore)
diff --git a/waflib/ConfigSet.py b/waflib/ConfigSet.py
deleted file mode 100644
index 4dfa86b..0000000
--- a/waflib/ConfigSet.py
+++ /dev/null
@@ -1,147 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import sys
-if sys.hexversion < 0x020400f0: from sets import Set as set
-import copy,re
-from waflib import Logs,Utils
-re_imp=re.compile('^(#)*?([^#=]*?)\ =\ (.*?)$',re.M)
-class ConfigSet(object):
-	__slots__=('table','parent')
-	def __init__(self,filename=None):
-		self.table={}
-		if filename:
-			self.load(filename)
-	def __contains__(self,key):
-		if key in self.table:return True
-		try:return self.parent.__contains__(key)
-		except AttributeError:return False
-	def keys(self):
-		keys=set()
-		cur=self
-		while cur:
-			keys.update(cur.table.keys())
-			cur=getattr(cur,'parent',None)
-		keys=list(keys)
-		keys.sort()
-		return keys
-	def __str__(self):
-		return"\n".join(["%r %r"%(x,self.__getitem__(x))for x in self.keys()])
-	def __getitem__(self,key):
-		try:
-			while 1:
-				x=self.table.get(key,None)
-				if not x is None:
-					return x
-				self=self.parent
-		except AttributeError:
-			return[]
-	def __setitem__(self,key,value):
-		self.table[key]=value
-	def __delitem__(self,key):
-		self[key]=[]
-	def __getattr__(self,name):
-		if name in self.__slots__:
-			return object.__getattr__(self,name)
-		else:
-			return self[name]
-	def __setattr__(self,name,value):
-		if name in self.__slots__:
-			object.__setattr__(self,name,value)
-		else:
-			self[name]=value
-	def __delattr__(self,name):
-		if name in self.__slots__:
-			object.__delattr__(self,name)
-		else:
-			del self[name]
-	def derive(self):
-		newenv=ConfigSet()
-		newenv.parent=self
-		return newenv
-	def detach(self):
-		tbl=self.get_merged_dict()
-		try:
-			delattr(self,'parent')
-		except AttributeError:
-			pass
-		else:
-			keys=tbl.keys()
-			for x in keys:
-				tbl[x]=copy.deepcopy(tbl[x])
-			self.table=tbl
-	def get_flat(self,key):
-		s=self[key]
-		if isinstance(s,str):return s
-		return' '.join(s)
-	def _get_list_value_for_modification(self,key):
-		try:
-			value=self.table[key]
-		except KeyError:
-			try:value=self.parent[key]
-			except AttributeError:value=[]
-			if isinstance(value,list):
-				value=value[:]
-			else:
-				value=[value]
-		else:
-			if not isinstance(value,list):
-				value=[value]
-		self.table[key]=value
-		return value
-	def append_value(self,var,val):
-		current_value=self._get_list_value_for_modification(var)
-		if isinstance(val,str):
-			val=[val]
-		current_value.extend(val)
-	def prepend_value(self,var,val):
-		if isinstance(val,str):
-			val=[val]
-		self.table[var]=val+self._get_list_value_for_modification(var)
-	def append_unique(self,var,val):
-		if isinstance(val,str):
-			val=[val]
-		current_value=self._get_list_value_for_modification(var)
-		for x in val:
-			if x not in current_value:
-				current_value.append(x)
-	def get_merged_dict(self):
-		table_list=[]
-		env=self
-		while 1:
-			table_list.insert(0,env.table)
-			try:env=env.parent
-			except AttributeError:break
-		merged_table={}
-		for table in table_list:
-			merged_table.update(table)
-		return merged_table
-	def store(self,filename):
-		f=None
-		try:
-			f=open(filename,'w')
-			merged_table=self.get_merged_dict()
-			keys=list(merged_table.keys())
-			keys.sort()
-			for k in keys:
-				if k!='undo_stack':
-					f.write('%s = %r\n'%(k,merged_table[k]))
-		finally:
-			if f:
-				f.close()
-	def load(self,filename):
-		tbl=self.table
-		code=Utils.readf(filename)
-		for m in re_imp.finditer(code):
-			g=m.group
-			tbl[g(2)]=eval(g(3))
-		Logs.debug('env: %s'%str(self.table))
-	def update(self,d):
-		for k,v in d.items():
-			self[k]=v
-	def stash(self):
-		self.undo_stack=self.undo_stack+[self.table]
-		self.table=self.table.copy()
-	def revert(self):
-		self.table=self.undo_stack.pop(-1)
diff --git a/waflib/Configure.py b/waflib/Configure.py
deleted file mode 100644
index 93ceef6..0000000
--- a/waflib/Configure.py
+++ /dev/null
@@ -1,314 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,shlex,sys,time
-from waflib import ConfigSet,Utils,Options,Logs,Context,Build,Errors
-try:
-	from urllib import request
-except:
-	from urllib import urlopen
-else:
-	urlopen=request.urlopen
-BREAK='break'
-CONTINUE='continue'
-WAF_CONFIG_LOG='config.log'
-autoconfig=False
-conf_template='''# project %(app)s configured on %(now)s by
-# waf %(wafver)s (abi %(abi)s, python %(pyver)x on %(systype)s)
-# using %(args)s
-#'''
-def download_check(node):
-	pass
-def download_tool(tool,force=False,ctx=None):
-	for x in Utils.to_list(Context.remote_repo):
-		for sub in Utils.to_list(Context.remote_locs):
-			url='/'.join((x,sub,tool+'.py'))
-			try:
-				web=urlopen(url)
-				try:
-					if web.getcode()!=200:
-						continue
-				except AttributeError:
-					pass
-			except Exception:
-				continue
-			else:
-				tmp=ctx.root.make_node(os.sep.join((Context.waf_dir,'waflib','extras',tool+'.py')))
-				tmp.write(web.read())
-				Logs.warn('Downloaded %s from %s'%(tool,url))
-				download_check(tmp)
-				try:
-					module=Context.load_tool(tool)
-				except:
-					Logs.warn('The tool %s from %s is unusable'%(tool,url))
-					try:
-						tmp.delete()
-					except:
-						pass
-					continue
-				return module
-	raise Errors.WafError('Could not load the Waf tool')
-class ConfigurationContext(Context.Context):
-	'''configures the project'''
-	cmd='configure'
-	error_handlers=[]
-	def __init__(self,**kw):
-		super(ConfigurationContext,self).__init__(**kw)
-		self.environ=dict(os.environ)
-		self.all_envs={}
-		self.top_dir=None
-		self.out_dir=None
-		self.tools=[]
-		self.hash=0
-		self.files=[]
-		self.tool_cache=[]
-		self.setenv('')
-	def setenv(self,name,env=None):
-		if not env:
-			env=ConfigSet.ConfigSet()
-			self.prepare_env(env)
-		else:
-			env=env.derive()
-		self.all_envs[name]=env
-		self.variant=name
-	def get_env(self):
-		return self.all_envs[self.variant]
-	def set_env(self,val):
-		self.all_envs[self.variant]=val
-	env=property(get_env,set_env)
-	def init_dirs(self):
-		top=self.top_dir
-		if not top:
-			top=Options.options.top
-		if not top:
-			top=getattr(Context.g_module,Context.TOP,None)
-		if not top:
-			top=self.path.abspath()
-		top=os.path.abspath(top)
-		self.srcnode=(os.path.isabs(top)and self.root or self.path).find_dir(top)
-		assert(self.srcnode)
-		out=self.out_dir
-		if not out:
-			out=Options.options.out
-		if not out:
-			out=getattr(Context.g_module,Context.OUT,None)
-		if not out:
-			out=Options.lockfile.replace('.lock-waf_%s_'%sys.platform,'').replace('.lock-waf','')
-		self.bldnode=(os.path.isabs(out)and self.root or self.path).make_node(out)
-		self.bldnode.mkdir()
-		if not os.path.isdir(self.bldnode.abspath()):
-			conf.fatal('could not create the build directory %s'%self.bldnode.abspath())
-	def execute(self):
-		self.init_dirs()
-		self.cachedir=self.bldnode.make_node(Build.CACHE_DIR)
-		self.cachedir.mkdir()
-		path=os.path.join(self.bldnode.abspath(),WAF_CONFIG_LOG)
-		self.logger=Logs.make_logger(path,'cfg')
-		app=getattr(Context.g_module,'APPNAME','')
-		if app:
-			ver=getattr(Context.g_module,'VERSION','')
-			if ver:
-				app="%s (%s)"%(app,ver)
-		now=time.ctime()
-		pyver=sys.hexversion
-		systype=sys.platform
-		args=" ".join(sys.argv)
-		wafver=Context.WAFVERSION
-		abi=Context.ABI
-		self.to_log(conf_template%vars())
-		self.msg('Setting top to',self.srcnode.abspath())
-		self.msg('Setting out to',self.bldnode.abspath())
-		if id(self.srcnode)==id(self.bldnode):
-			Logs.warn('Setting top == out (remember to use "update_outputs")')
-		elif id(self.path)!=id(self.srcnode):
-			if self.srcnode.is_child_of(self.path):
-				Logs.warn('Are you certain that you do not want to set top="." ?')
-		super(ConfigurationContext,self).execute()
-		self.store()
-		Context.top_dir=self.srcnode.abspath()
-		Context.out_dir=self.bldnode.abspath()
-		env=ConfigSet.ConfigSet()
-		env['argv']=sys.argv
-		env['options']=Options.options.__dict__
-		env.run_dir=Context.run_dir
-		env.top_dir=Context.top_dir
-		env.out_dir=Context.out_dir
-		env['hash']=self.hash
-		env['files']=self.files
-		env['environ']=dict(self.environ)
-		if not self.env.NO_LOCK_IN_RUN:
-			env.store(Context.run_dir+os.sep+Options.lockfile)
-		if not self.env.NO_LOCK_IN_TOP:
-			env.store(Context.top_dir+os.sep+Options.lockfile)
-		if not self.env.NO_LOCK_IN_OUT:
-			env.store(Context.out_dir+os.sep+Options.lockfile)
-	def prepare_env(self,env):
-		if not env.PREFIX:
-			env.PREFIX=os.path.abspath(os.path.expanduser(Options.options.prefix))
-		if not env.BINDIR:
-			env.BINDIR=Utils.subst_vars('${PREFIX}/bin',env)
-		if not env.LIBDIR:
-			env.LIBDIR=Utils.subst_vars('${PREFIX}/lib',env)
-	def store(self):
-		n=self.cachedir.make_node('build.config.py')
-		n.write('version = 0x%x\ntools = %r\n'%(Context.HEXVERSION,self.tools))
-		if not self.all_envs:
-			self.fatal('nothing to store in the configuration context!')
-		for key in self.all_envs:
-			tmpenv=self.all_envs[key]
-			tmpenv.store(os.path.join(self.cachedir.abspath(),key+Build.CACHE_SUFFIX))
-	def load(self,input,tooldir=None,funs=None,download=True):
-		tools=Utils.to_list(input)
-		if tooldir:tooldir=Utils.to_list(tooldir)
-		for tool in tools:
-			mag=(tool,id(self.env),funs)
-			if mag in self.tool_cache:
-				self.to_log('(tool %s is already loaded, skipping)'%tool)
-				continue
-			self.tool_cache.append(mag)
-			module=None
-			try:
-				module=Context.load_tool(tool,tooldir)
-			except ImportError ,e:
-				if Options.options.download:
-					module=download_tool(tool,ctx=self)
-					if not module:
-						self.fatal('Could not load the Waf tool %r or download a suitable replacement from the repository (sys.path %r)\n%s'%(tool,sys.path,e))
-				else:
-					self.fatal('Could not load the Waf tool %r from %r (try the --download option?):\n%s'%(tool,sys.path,e))
-			except Exception ,e:
-				self.to_log('imp %r (%r & %r)'%(tool,tooldir,funs))
-				self.to_log(Utils.ex_stack())
-				raise
-			if funs is not None:
-				self.eval_rules(funs)
-			else:
-				func=getattr(module,'configure',None)
-				if func:
-					if type(func)is type(Utils.readf):func(self)
-					else:self.eval_rules(func)
-			self.tools.append({'tool':tool,'tooldir':tooldir,'funs':funs})
-	def post_recurse(self,node):
-		super(ConfigurationContext,self).post_recurse(node)
-		self.hash=hash((self.hash,node.read('rb')))
-		self.files.append(node.abspath())
-	def eval_rules(self,rules):
-		self.rules=Utils.to_list(rules)
-		for x in self.rules:
-			f=getattr(self,x)
-			if not f:self.fatal("No such method '%s'."%x)
-			try:
-				f()
-			except Exception ,e:
-				ret=self.err_handler(x,e)
-				if ret==BREAK:
-					break
-				elif ret==CONTINUE:
-					continue
-				else:
-					raise
-	def err_handler(self,fun,error):
-		pass
-def conf(f):
-	def fun(*k,**kw):
-		mandatory=True
-		if'mandatory'in kw:
-			mandatory=kw['mandatory']
-			del kw['mandatory']
-		try:
-			return f(*k,**kw)
-		except Errors.ConfigurationError ,e:
-			if mandatory:
-				raise e
-	setattr(ConfigurationContext,f.__name__,fun)
-	setattr(Build.BuildContext,f.__name__,fun)
-	return f
-def add_os_flags(self,var,dest=None):
-	try:self.env.append_value(dest or var,shlex.split(self.environ[var]))
-	except KeyError:pass
-def cmd_to_list(self,cmd):
-	if isinstance(cmd,str)and cmd.find(' '):
-		try:
-			os.stat(cmd)
-		except OSError:
-			return shlex.split(cmd)
-		else:
-			return[cmd]
-	return cmd
-def check_waf_version(self,mini='1.6.0',maxi='1.7.0'):
-	self.start_msg('Checking for waf version in %s-%s'%(str(mini),str(maxi)))
-	ver=Context.HEXVERSION
-	if Utils.num2ver(mini)>ver:
-		self.fatal('waf version should be at least %r (%r found)'%(Utils.num2ver(mini),ver))
-	if Utils.num2ver(maxi)<ver:
-		self.fatal('waf version should be at most %r (%r found)'%(Utils.num2ver(maxi),ver))
-	self.end_msg('ok')
-def find_file(self,filename,path_list=[]):
-	for n in Utils.to_list(filename):
-		for d in Utils.to_list(path_list):
-			p=os.path.join(d,n)
-			if os.path.exists(p):
-				return p
-	self.fatal('Could not find %r'%filename)
-def find_program(self,filename,**kw):
-	exts=kw.get('exts',Utils.is_win32 and'.exe,.com,.bat,.cmd'or',.sh,.pl,.py')
-	environ=kw.get('environ',os.environ)
-	ret=''
-	filename=Utils.to_list(filename)
-	var=kw.get('var','')
-	if not var:
-		var=filename[0].upper()
-	if self.env[var]:
-		ret=self.env[var]
-	elif var in environ:
-		ret=environ[var]
-	path_list=kw.get('path_list','')
-	if not ret:
-		if path_list:
-			path_list=Utils.to_list(path_list)
-		else:
-			path_list=environ.get('PATH','').split(os.pathsep)
-		if not isinstance(filename,list):
-			filename=[filename]
-		for a in exts.split(','):
-			if ret:
-				break
-			for b in filename:
-				if ret:
-					break
-				for c in path_list:
-					if ret:
-						break
-					x=os.path.expanduser(os.path.join(c,b+a))
-					if os.path.isfile(x):
-						ret=x
-	if not ret and Utils.winreg:
-		ret=Utils.get_registry_app_path(Utils.winreg.HKEY_CURRENT_USER,filename)
-	if not ret and Utils.winreg:
-		ret=Utils.get_registry_app_path(Utils.winreg.HKEY_LOCAL_MACHINE,filename)
-	self.msg('Checking for program '+','.join(filename),ret or False)
-	self.to_log('find program=%r paths=%r var=%r -> %r'%(filename,path_list,var,ret))
-	if not ret:
-		self.fatal(kw.get('errmsg','')or'Could not find the program %s'%','.join(filename))
-	if var:
-		self.env[var]=ret
-	return ret
-def find_perl_program(self,filename,path_list=[],var=None,environ=None,exts=''):
-	try:
-		app=self.find_program(filename,path_list=path_list,var=var,environ=environ,exts=exts)
-	except:
-		self.find_program('perl',var='PERL')
-		app=self.find_file(filename,os.environ['PATH'].split(os.pathsep))
-		if not app:
-			raise
-		if var:
-			self.env[var]=Utils.to_list(self.env['PERL'])+[app]
-	self.msg('Checking for %r'%filename,app)
-
-conf(add_os_flags)
-conf(cmd_to_list)
-conf(check_waf_version)
-conf(find_file)
-conf(find_program)
-conf(find_perl_program)
\ No newline at end of file
diff --git a/waflib/Context.py b/waflib/Context.py
deleted file mode 100644
index 025469c..0000000
--- a/waflib/Context.py
+++ /dev/null
@@ -1,298 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,imp,sys
-from waflib import Utils,Errors,Logs
-import waflib.Node
-HEXVERSION=0x1060800
-WAFVERSION="1.6.8"
-WAFREVISION="516a253cbdbb4eef3165c4d47c2074a0fb5dce95"
-ABI=98
-DBFILE='.wafpickle-%d'%ABI
-APPNAME='APPNAME'
-VERSION='VERSION'
-TOP='top'
-OUT='out'
-WSCRIPT_FILE='wscript'
-launch_dir=''
-run_dir=''
-top_dir=''
-out_dir=''
-waf_dir=''
-local_repo=''
-remote_repo='http://waf.googlecode.com/git/'
-remote_locs=['branches/waf-%s/waflib/extras'%WAFVERSION,'trunk/waflib/extras','trunk/waflib/Tools']
-g_module=None
-STDOUT=1
-STDERR=-1
-BOTH=0
-classes=[]
-def create_context(cmd_name,*k,**kw):
-	global classes
-	for x in classes:
-		if x.cmd==cmd_name:
-			return x(*k,**kw)
-	ctx=Context(*k,**kw)
-	ctx.fun=cmd_name
-	return ctx
-class store_context(type):
-	def __init__(cls,name,bases,dict):
-		super(store_context,cls).__init__(name,bases,dict)
-		name=cls.__name__
-		if name=='ctx'or name=='Context':
-			return
-		try:
-			cls.cmd
-		except AttributeError:
-			raise Errors.WafError('Missing command for the context class %r (cmd)'%name)
-		if not getattr(cls,'fun',None):
-			cls.fun=cls.cmd
-		global classes
-		classes.insert(0,cls)
-ctx=store_context('ctx',(object,),{})
-class Context(ctx):
-	errors=Errors
-	tools={}
-	def __init__(self,**kw):
-		try:
-			rd=kw['run_dir']
-		except KeyError:
-			global run_dir
-			rd=run_dir
-		class node_class(waflib.Node.Node):
-			pass
-		self.node_class=node_class
-		self.node_class.__module__="waflib.Node"
-		self.node_class.__name__="Nod3"
-		self.node_class.ctx=self
-		self.root=self.node_class('',None)
-		self.cur_script=None
-		self.path=self.root.find_dir(rd)
-		self.stack_path=[]
-		self.exec_dict={'ctx':self,'conf':self,'bld':self,'opt':self}
-		self.logger=None
-	def __hash__(self):
-		return id(self)
-	def load(self,tool_list,*k,**kw):
-		tools=Utils.to_list(tool_list)
-		path=Utils.to_list(kw.get('tooldir',''))
-		for t in tools:
-			module=load_tool(t,path)
-			fun=getattr(module,kw.get('name',self.fun),None)
-			if fun:
-				fun(self)
-	def execute(self):
-		global g_module
-		self.recurse([os.path.dirname(g_module.root_path)])
-	def pre_recurse(self,node):
-		self.stack_path.append(self.cur_script)
-		self.cur_script=node
-		self.path=node.parent
-	def post_recurse(self,node):
-		self.cur_script=self.stack_path.pop()
-		if self.cur_script:
-			self.path=self.cur_script.parent
-	def recurse(self,dirs,name=None,mandatory=True,once=True):
-		try:
-			cache=self.recurse_cache
-		except:
-			cache=self.recurse_cache={}
-		for d in Utils.to_list(dirs):
-			if not os.path.isabs(d):
-				d=os.path.join(self.path.abspath(),d)
-			WSCRIPT=os.path.join(d,WSCRIPT_FILE)
-			WSCRIPT_FUN=WSCRIPT+'_'+(name or self.fun)
-			node=self.root.find_node(WSCRIPT_FUN)
-			if node and(not once or node not in cache):
-				cache[node]=True
-				self.pre_recurse(node)
-				try:
-					function_code=node.read('rU')
-					exec(compile(function_code,node.abspath(),'exec'),self.exec_dict)
-				finally:
-					self.post_recurse(node)
-			elif not node:
-				node=self.root.find_node(WSCRIPT)
-				if node and(not once or node not in cache):
-					cache[node]=True
-					self.pre_recurse(node)
-					try:
-						wscript_module=load_module(node.abspath())
-						user_function=getattr(wscript_module,(name or self.fun),None)
-						if not user_function:
-							if not mandatory:
-								continue
-							raise Errors.WafError('No function %s defined in %s'%(name or self.fun,node.abspath()))
-						user_function(self)
-					finally:
-						self.post_recurse(node)
-				elif not node:
-					if not mandatory:
-						continue
-					raise Errors.WafError('No wscript file in directory %s'%d)
-	def exec_command(self,cmd,**kw):
-		subprocess=Utils.subprocess
-		kw['shell']=isinstance(cmd,str)
-		Logs.debug('runner: %r'%cmd)
-		Logs.debug('runner_env: kw=%s'%kw)
-		try:
-			if self.logger:
-				self.logger.info(cmd)
-				kw['stdout']=kw['stderr']=subprocess.PIPE
-				p=subprocess.Popen(cmd,**kw)
-				(out,err)=p.communicate()
-				if out:
-					self.logger.debug('out: %s'%out.decode(sys.stdout.encoding or'iso8859-1'))
-				if err:
-					self.logger.error('err: %s'%err.decode(sys.stdout.encoding or'iso8859-1'))
-				return p.returncode
-			else:
-				p=subprocess.Popen(cmd,**kw)
-				return p.wait()
-		except OSError:
-			return-1
-	def cmd_and_log(self,cmd,**kw):
-		subprocess=Utils.subprocess
-		kw['shell']=isinstance(cmd,str)
-		Logs.debug('runner: %r'%cmd)
-		if'quiet'in kw:
-			quiet=kw['quiet']
-			del kw['quiet']
-		else:
-			quiet=None
-		if'output'in kw:
-			to_ret=kw['output']
-			del kw['output']
-		else:
-			to_ret=STDOUT
-		kw['stdout']=kw['stderr']=subprocess.PIPE
-		if quiet is None:
-			self.to_log(cmd)
-		try:
-			p=subprocess.Popen(cmd,**kw)
-			(out,err)=p.communicate()
-		except Exception ,e:
-			raise Errors.WafError('Execution failure: %s'%str(e),ex=e)
-		if not isinstance(out,str):
-			out=out.decode(sys.stdout.encoding or'iso8859-1')
-		if not isinstance(err,str):
-			err=err.decode(sys.stdout.encoding or'iso8859-1')
-		if out and quiet!=STDOUT and quiet!=BOTH:
-			self.to_log('out: %s'%out)
-		if err and quiet!=STDERR and quiet!=BOTH:
-			self.to_log('err: %s'%err)
-		if p.returncode:
-			e=Errors.WafError('Command %r returned %r'%(cmd,p.returncode))
-			e.returncode=p.returncode
-			e.stderr=err
-			e.stdout=out
-			raise e
-		if to_ret==BOTH:
-			return(out,err)
-		elif to_ret==STDERR:
-			return err
-		return out
-	def fatal(self,msg,ex=None):
-		if self.logger:
-			self.logger.info('from %s: %s'%(self.path.abspath(),msg))
-		try:
-			msg='%s\n(complete log in %s)'%(msg,self.logger.handlers[0].baseFilename)
-		except:
-			pass
-		raise self.errors.ConfigurationError(msg,ex=ex)
-	def to_log(self,msg):
-		if not msg:
-			return
-		if self.logger:
-			self.logger.info(msg)
-		else:
-			sys.stderr.write(str(msg))
-			sys.stderr.flush()
-	def msg(self,msg,result,color=None):
-		self.start_msg(msg)
-		if not isinstance(color,str):
-			color=result and'GREEN'or'YELLOW'
-		self.end_msg(result,color)
-	def start_msg(self,msg):
-		try:
-			if self.in_msg:
-				self.in_msg+=1
-				return
-		except:
-			self.in_msg=0
-		self.in_msg+=1
-		try:
-			self.line_just=max(self.line_just,len(msg))
-		except AttributeError:
-			self.line_just=max(40,len(msg))
-		for x in(self.line_just*'-',msg):
-			self.to_log(x)
-		Logs.pprint('NORMAL',"%s :"%msg.ljust(self.line_just),sep='')
-	def end_msg(self,result,color=None):
-		self.in_msg-=1
-		if self.in_msg:
-			return
-		defcolor='GREEN'
-		if result==True:
-			msg='ok'
-		elif result==False:
-			msg='not found'
-			defcolor='YELLOW'
-		else:
-			msg=str(result)
-		self.to_log(msg)
-		Logs.pprint(color or defcolor,msg)
-	def load_special_tools(self,var,ban=[]):
-		global waf_dir
-		lst=self.root.find_node(waf_dir).find_node('waflib/extras').ant_glob(var)
-		for x in lst:
-			if not x.name in ban:
-				load_tool(x.name.replace('.py',''))
-cache_modules={}
-def load_module(path):
-	try:
-		return cache_modules[path]
-	except KeyError:
-		pass
-	module=imp.new_module(WSCRIPT_FILE)
-	try:
-		code=Utils.readf(path,m='rU')
-	except(IOError,OSError):
-		raise Errors.WafError('Could not read the file %r'%path)
-	module_dir=os.path.dirname(path)
-	sys.path.insert(0,module_dir)
-	exec(compile(code,path,'exec'),module.__dict__)
-	sys.path.remove(module_dir)
-	cache_modules[path]=module
-	return module
-def load_tool(tool,tooldir=None):
-	tool=tool.replace('++','xx')
-	tool=tool.replace('java','javaw')
-	tool=tool.replace('compiler_cc','compiler_c')
-	if tooldir:
-		assert isinstance(tooldir,list)
-		sys.path=tooldir+sys.path
-		try:
-			__import__(tool)
-			ret=sys.modules[tool]
-			Context.tools[tool]=ret
-			return ret
-		finally:
-			for d in tooldir:
-				sys.path.remove(d)
-	else:
-		global waf_dir
-		try:
-			os.stat(os.path.join(waf_dir,'waflib','extras',tool+'.py'))
-			d='waflib.extras.%s'%tool
-		except:
-			try:
-				os.stat(os.path.join(waf_dir,'waflib','Tools',tool+'.py'))
-				d='waflib.Tools.%s'%tool
-			except:
-				d=tool
-		__import__(d)
-		ret=sys.modules[d]
-		Context.tools[tool]=ret
-		return ret
diff --git a/waflib/Errors.py b/waflib/Errors.py
deleted file mode 100644
index aacc1a9..0000000
--- a/waflib/Errors.py
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import traceback,sys
-class WafError(Exception):
-	def __init__(self,msg='',ex=None):
-		self.msg=msg
-		assert not isinstance(msg,Exception)
-		self.stack=[]
-		if ex:
-			if not msg:
-				self.msg=str(ex)
-			if isinstance(ex,WafError):
-				self.stack=ex.stack
-			else:
-				self.stack=traceback.extract_tb(sys.exc_info()[2])
-		self.stack+=traceback.extract_stack()[:-1]
-		self.verbose_msg=''.join(traceback.format_list(self.stack))
-	def __str__(self):
-		return str(self.msg)
-class BuildError(WafError):
-	def __init__(self,error_tasks=[]):
-		self.tasks=error_tasks
-		WafError.__init__(self,self.format_error())
-	def format_error(self):
-		lst=['Build failed']
-		for tsk in self.tasks:
-			txt=tsk.format_error()
-			if txt:lst.append(txt)
-		return'\n'.join(lst)
-class ConfigurationError(WafError):
-	pass
-class TaskRescan(WafError):
-	pass
-class TaskNotReady(WafError):
-	pass
diff --git a/waflib/Logs.py b/waflib/Logs.py
deleted file mode 100644
index 2ba46d2..0000000
--- a/waflib/Logs.py
+++ /dev/null
@@ -1,149 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,re,traceback,sys
-_nocolor=os.environ.get('NOCOLOR','no')not in('no','0','false')
-try:
-	if not _nocolor:
-		import waflib.ansiterm
-except:
-	pass
-import logging
-LOG_FORMAT="%(asctime)s %(c1)s%(zone)s%(c2)s %(message)s"
-HOUR_FORMAT="%H:%M:%S"
-zones=''
-verbose=0
-colors_lst={'USE':True,'BOLD':'\x1b[01;1m','RED':'\x1b[01;31m','GREEN':'\x1b[32m','YELLOW':'\x1b[33m','PINK':'\x1b[35m','BLUE':'\x1b[01;34m','CYAN':'\x1b[36m','NORMAL':'\x1b[0m','cursor_on':'\x1b[?25h','cursor_off':'\x1b[?25l',}
-got_tty=not os.environ.get('TERM','dumb')in['dumb','emacs']
-if got_tty:
-	try:
-		got_tty=sys.stderr.isatty()
-	except AttributeError:
-		got_tty=False
-if(not got_tty and os.environ.get('TERM','dumb')!='msys')or _nocolor:
-	colors_lst['USE']=False
-def get_term_cols():
-	return 80
-try:
-	import struct,fcntl,termios
-except ImportError:
-	pass
-else:
-	if got_tty:
-		def get_term_cols_real():
-			dummy_lines,cols=struct.unpack("HHHH",fcntl.ioctl(sys.stderr.fileno(),termios.TIOCGWINSZ,struct.pack("HHHH",0,0,0,0)))[:2]
-			return cols
-		try:
-			get_term_cols_real()
-		except:
-			pass
-		else:
-			get_term_cols=get_term_cols_real
-get_term_cols.__doc__="""
-	Get the console width in characters.
-
-	:return: the number of characters per line
-	:rtype: int
-	"""
-def get_color(cl):
-	if not colors_lst['USE']:return''
-	return colors_lst.get(cl,'')
-class color_dict(object):
-	def __getattr__(self,a):
-		return get_color(a)
-	def __call__(self,a):
-		return get_color(a)
-colors=color_dict()
-re_log=re.compile(r'(\w+): (.*)',re.M)
-class log_filter(logging.Filter):
-	def __init__(self,name=None):
-		pass
-	def filter(self,rec):
-		rec.c1=colors.PINK
-		rec.c2=colors.NORMAL
-		rec.zone=rec.module
-		if rec.levelno>=logging.INFO:
-			if rec.levelno>=logging.ERROR:
-				rec.c1=colors.RED
-			elif rec.levelno>=logging.WARNING:
-				rec.c1=colors.YELLOW
-			else:
-				rec.c1=colors.GREEN
-			return True
-		m=re_log.match(rec.msg)
-		if m:
-			rec.zone=m.group(1)
-			rec.msg=m.group(2)
-		if zones:
-			return getattr(rec,'zone','')in zones or'*'in zones
-		elif not verbose>2:
-			return False
-		return True
-class formatter(logging.Formatter):
-	def __init__(self):
-		logging.Formatter.__init__(self,LOG_FORMAT,HOUR_FORMAT)
-	def format(self,rec):
-		if rec.levelno>=logging.WARNING or rec.levelno==logging.INFO:
-			try:
-				msg=rec.msg.decode('utf-8')
-			except:
-				msg=rec.msg
-			return'%s%s%s'%(rec.c1,msg,rec.c2)
-		return logging.Formatter.format(self,rec)
-log=None
-def debug(*k,**kw):
-	if verbose:
-		k=list(k)
-		k[0]=k[0].replace('\n',' ')
-		global log
-		log.debug(*k,**kw)
-def error(*k,**kw):
-	global log
-	log.error(*k,**kw)
-	if verbose>2:
-		st=traceback.extract_stack()
-		if st:
-			st=st[:-1]
-			buf=[]
-			for filename,lineno,name,line in st:
-				buf.append('  File "%s", line %d, in %s'%(filename,lineno,name))
-				if line:
-					buf.append('	%s'%line.strip())
-			if buf:log.error("\n".join(buf))
-def warn(*k,**kw):
-	global log
-	log.warn(*k,**kw)
-def info(*k,**kw):
-	global log
-	log.info(*k,**kw)
-def init_log():
-	global log
-	log=logging.getLogger('waflib')
-	log.handlers=[]
-	log.filters=[]
-	hdlr=logging.StreamHandler()
-	hdlr.setFormatter(formatter())
-	log.addHandler(hdlr)
-	log.addFilter(log_filter())
-	log.setLevel(logging.DEBUG)
-def make_logger(path,name):
-	logger=logging.getLogger(name)
-	hdlr=logging.FileHandler(path,'w')
-	formatter=logging.Formatter('%(message)s')
-	hdlr.setFormatter(formatter)
-	logger.addHandler(hdlr)
-	logger.setLevel(logging.DEBUG)
-	return logger
-def make_mem_logger(name,to_log,size=10000):
-	from logging.handlers import MemoryHandler
-	logger=logging.getLogger(name)
-	hdlr=MemoryHandler(size,target=to_log)
-	formatter=logging.Formatter('%(message)s')
-	hdlr.setFormatter(formatter)
-	logger.addHandler(hdlr)
-	logger.memhandler=hdlr
-	logger.setLevel(logging.DEBUG)
-	return logger
-def pprint(col,str,label='',sep='\n'):
-	sys.stderr.write("%s%s%s %s%s"%(colors(col),str,colors.NORMAL,label,sep))
diff --git a/waflib/Node.py b/waflib/Node.py
deleted file mode 100644
index 70712ea..0000000
--- a/waflib/Node.py
+++ /dev/null
@@ -1,500 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import sys
-if sys.hexversion < 0x020400f0: from sets import Set as set
-import os,re,sys,shutil
-from waflib import Utils,Errors
-exclude_regs='''
-**/*~
-**/#*#
-**/.#*
-**/%*%
-**/._*
-**/CVS
-**/CVS/**
-**/.cvsignore
-**/SCCS
-**/SCCS/**
-**/vssver.scc
-**/.svn
-**/.svn/**
-**/BitKeeper
-**/.git
-**/.git/**
-**/.gitignore
-**/.bzr
-**/.bzrignore
-**/.bzr/**
-**/.hg
-**/.hg/**
-**/_MTN
-**/_MTN/**
-**/.arch-ids
-**/{arch}
-**/_darcs
-**/_darcs/**
-**/.DS_Store'''
-def split_path(path):
-	return path.split('/')
-def split_path_cygwin(path):
-	if path.startswith('//'):
-		ret=path.split('/')[2:]
-		ret[0]='/'+ret[0]
-		return ret
-	return path.split('/')
-re_sp=re.compile('[/\\\\]')
-def split_path_win32(path):
-	if path.startswith('\\\\'):
-		ret=re.split(re_sp,path)[2:]
-		ret[0]='\\'+ret[0]
-		return ret
-	return re.split(re_sp,path)
-if sys.platform=='cygwin':
-	split_path=split_path_cygwin
-elif Utils.is_win32:
-	split_path=split_path_win32
-class Node(object):
-	__slots__=('name','sig','children','parent','cache_abspath','cache_isdir')
-	def __init__(self,name,parent):
-		self.name=name
-		self.parent=parent
-		if parent:
-			if name in parent.children:
-				raise Errors.WafError('node %s exists in the parent files %r already'%(name,parent))
-			parent.children[name]=self
-	def __setstate__(self,data):
-		self.name=data[0]
-		self.parent=data[1]
-		if data[2]is not None:
-			self.children=data[2]
-		if data[3]is not None:
-			self.sig=data[3]
-	def __getstate__(self):
-		return(self.name,self.parent,getattr(self,'children',None),getattr(self,'sig',None))
-	def __str__(self):
-		return self.name
-	def __repr__(self):
-		return self.abspath()
-	def __hash__(self):
-		return id(self)
-	def __eq__(self,node):
-		return id(self)==id(node)
-	def __copy__(self):
-		raise Errors.WafError('nodes are not supposed to be copied')
-	def read(self,flags='r'):
-		return Utils.readf(self.abspath(),flags)
-	def write(self,data,flags='w'):
-		f=None
-		try:
-			f=open(self.abspath(),flags)
-			f.write(data)
-		finally:
-			if f:
-				f.close()
-	def chmod(self,val):
-		os.chmod(self.abspath(),val)
-	def delete(self):
-		try:
-			if getattr(self,'children',None):
-				shutil.rmtree(self.abspath())
-			else:
-				os.unlink(self.abspath())
-		except:
-			pass
-		try:
-			delattr(self,'children')
-		except:
-			pass
-	def suffix(self):
-		k=max(0,self.name.rfind('.'))
-		return self.name[k:]
-	def height(self):
-		d=self
-		val=-1
-		while d:
-			d=d.parent
-			val+=1
-		return val
-	def listdir(self):
-		lst=Utils.listdir(self.abspath())
-		lst.sort()
-		return lst
-	def mkdir(self):
-		if getattr(self,'cache_isdir',None):
-			return
-		try:
-			self.parent.mkdir()
-		except:
-			pass
-		if self.name:
-			try:
-				os.makedirs(self.abspath())
-			except OSError:
-				pass
-			if not os.path.isdir(self.abspath()):
-				raise Errors.WafError('Could not create the directory %s'%self.abspath())
-			try:
-				self.children
-			except:
-				self.children={}
-		self.cache_isdir=True
-	def find_node(self,lst):
-		if isinstance(lst,str):
-			lst=[x for x in split_path(lst)if x and x!='.']
-		cur=self
-		for x in lst:
-			if x=='..':
-				cur=cur.parent or cur
-				continue
-			try:
-				if x in cur.children:
-					cur=cur.children[x]
-					continue
-			except:
-				cur.children={}
-			cur=self.__class__(x,cur)
-			try:
-				os.stat(cur.abspath())
-			except:
-				del cur.parent.children[x]
-				return None
-		ret=cur
-		try:
-			while not getattr(cur.parent,'cache_isdir',None):
-				cur=cur.parent
-				cur.cache_isdir=True
-		except AttributeError:
-			pass
-		return ret
-	def make_node(self,lst):
-		if isinstance(lst,str):
-			lst=[x for x in split_path(lst)if x and x!='.']
-		cur=self
-		for x in lst:
-			if x=='..':
-				cur=cur.parent or cur
-				continue
-			if getattr(cur,'children',{}):
-				if x in cur.children:
-					cur=cur.children[x]
-					continue
-			else:
-				cur.children={}
-			cur=self.__class__(x,cur)
-		return cur
-	def search(self,lst):
-		if isinstance(lst,str):
-			lst=[x for x in split_path(lst)if x and x!='.']
-		cur=self
-		try:
-			for x in lst:
-				if x=='..':
-					cur=cur.parent or cur
-				else:
-					cur=cur.children[x]
-			return cur
-		except:
-			pass
-	def path_from(self,node):
-		c1=self
-		c2=node
-		c1h=c1.height()
-		c2h=c2.height()
-		lst=[]
-		up=0
-		while c1h>c2h:
-			lst.append(c1.name)
-			c1=c1.parent
-			c1h-=1
-		while c2h>c1h:
-			up+=1
-			c2=c2.parent
-			c2h-=1
-		while id(c1)!=id(c2):
-			lst.append(c1.name)
-			up+=1
-			c1=c1.parent
-			c2=c2.parent
-		for i in range(up):
-			lst.append('..')
-		lst.reverse()
-		return os.sep.join(lst)or'.'
-	def abspath(self):
-		try:
-			return self.cache_abspath
-		except:
-			pass
-		if os.sep=='/':
-			if not self.parent:
-				val=os.sep
-			elif not self.parent.name:
-				val=os.sep+self.name
-			else:
-				val=self.parent.abspath()+os.sep+self.name
-		else:
-			if not self.parent:
-				val=''
-			elif not self.parent.name:
-				val=self.name+os.sep
-			else:
-				val=self.parent.abspath().rstrip(os.sep)+os.sep+self.name
-		self.cache_abspath=val
-		return val
-	def is_child_of(self,node):
-		p=self
-		diff=self.height()-node.height()
-		while diff>0:
-			diff-=1
-			p=p.parent
-		return id(p)==id(node)
-	def ant_iter(self,accept=None,maxdepth=25,pats=[],dir=False,src=True,remove=True):
-		dircont=self.listdir()
-		dircont.sort()
-		try:
-			lst=set(self.children.keys())
-			if remove:
-				for x in lst-set(dircont):
-					del self.children[x]
-		except:
-			self.children={}
-		for name in dircont:
-			npats=accept(name,pats)
-			if npats and npats[0]:
-				accepted=[]in npats[0]
-				node=self.make_node([name])
-				isdir=os.path.isdir(node.abspath())
-				if accepted:
-					if isdir:
-						if dir:
-							yield node
-					else:
-						if src:
-							yield node
-				if getattr(node,'cache_isdir',None)or isdir:
-					node.cache_isdir=True
-					if maxdepth:
-						for k in node.ant_iter(accept=accept,maxdepth=maxdepth-1,pats=npats,dir=dir,src=src):
-							yield k
-		raise StopIteration
-	def ant_glob(self,*k,**kw):
-		src=kw.get('src',True)
-		dir=kw.get('dir',False)
-		excl=kw.get('excl',exclude_regs)
-		incl=k and k[0]or kw.get('incl','**')
-		def to_pat(s):
-			lst=Utils.to_list(s)
-			ret=[]
-			for x in lst:
-				x=x.replace('\\','/').replace('//','/')
-				if x.endswith('/'):
-					x+='**'
-				lst2=x.split('/')
-				accu=[]
-				for k in lst2:
-					if k=='**':
-						accu.append(k)
-					else:
-						k=k.replace('.','[.]').replace('*','.*').replace('?','.').replace('+','\\+')
-						k='^%s$'%k
-						try:
-							accu.append(re.compile(k))
-						except Exception ,e:
-							raise Errors.WafError("Invalid pattern: %s"%k,e)
-				ret.append(accu)
-			return ret
-		def filtre(name,nn):
-			ret=[]
-			for lst in nn:
-				if not lst:
-					pass
-				elif lst[0]=='**':
-					ret.append(lst)
-					if len(lst)>1:
-						if lst[1].match(name):
-							ret.append(lst[2:])
-					else:
-						ret.append([])
-				elif lst[0].match(name):
-					ret.append(lst[1:])
-			return ret
-		def accept(name,pats):
-			nacc=filtre(name,pats[0])
-			nrej=filtre(name,pats[1])
-			if[]in nrej:
-				nacc=[]
-			return[nacc,nrej]
-		ret=[x for x in self.ant_iter(accept=accept,pats=[to_pat(incl),to_pat(excl)],maxdepth=25,dir=dir,src=src,remove=kw.get('remove',True))]
-		if kw.get('flat',False):
-			return' '.join([x.path_from(self)for x in ret])
-		return ret
-	def find_nodes(self,find_dirs=True,find_files=True,match_fun=lambda x:True):
-		x="""
-		Recursively finds nodes::
-
-			def configure(cnf):
-				cnf.find_nodes()
-
-		:param find_dirs: whether to return directories
-		:param find_files: whether to return files
-		:param match_fun: matching function, taking a node as parameter
-		:rtype generator
-		:return: a generator that iterates over all the requested files
-		"""
-		files=self.listdir()
-		for f in files:
-			node=self.make_node([f])
-			if os.path.isdir(node.abspath()):
-				if find_dirs and match_fun(node):
-					yield node
-				gen=node.find_nodes(find_dirs,find_files,match_fun)
-				for g in gen:
-					yield g
-			else:
-				if find_files and match_fun(node):
-					yield node
-	def is_src(self):
-		cur=self
-		x=id(self.ctx.srcnode)
-		y=id(self.ctx.bldnode)
-		while cur.parent:
-			if id(cur)==y:
-				return False
-			if id(cur)==x:
-				return True
-			cur=cur.parent
-		return False
-	def is_bld(self):
-		cur=self
-		y=id(self.ctx.bldnode)
-		while cur.parent:
-			if id(cur)==y:
-				return True
-			cur=cur.parent
-		return False
-	def get_src(self):
-		cur=self
-		x=id(self.ctx.srcnode)
-		y=id(self.ctx.bldnode)
-		lst=[]
-		while cur.parent:
-			if id(cur)==y:
-				lst.reverse()
-				return self.ctx.srcnode.make_node(lst)
-			if id(cur)==x:
-				return self
-			lst.append(cur.name)
-			cur=cur.parent
-		return self
-	def get_bld(self):
-		cur=self
-		x=id(self.ctx.srcnode)
-		y=id(self.ctx.bldnode)
-		lst=[]
-		while cur.parent:
-			if id(cur)==y:
-				return self
-			if id(cur)==x:
-				lst.reverse()
-				return self.ctx.bldnode.make_node(lst)
-			lst.append(cur.name)
-			cur=cur.parent
-		return self
-	def find_resource(self,lst):
-		if isinstance(lst,str):
-			lst=[x for x in split_path(lst)if x and x!='.']
-		node=self.get_bld().search(lst)
-		if not node:
-			self=self.get_src()
-			node=self.search(lst)
-			if not node:
-				node=self.find_node(lst)
-		try:
-			pat=node.abspath()
-			if os.path.isdir(pat):
-				return None
-		except:
-			pass
-		return node
-	def find_or_declare(self,lst):
-		if isinstance(lst,str):
-			lst=[x for x in split_path(lst)if x and x!='.']
-		node=self.get_bld().search(lst)
-		if node:
-			if not os.path.isfile(node.abspath()):
-				node.sig=None
-				try:
-					node.parent.mkdir()
-				except:
-					pass
-			return node
-		self=self.get_src()
-		node=self.find_node(lst)
-		if node:
-			if not os.path.isfile(node.abspath()):
-				node.sig=None
-				try:
-					node.parent.mkdir()
-				except:
-					pass
-			return node
-		node=self.get_bld().make_node(lst)
-		node.parent.mkdir()
-		return node
-	def find_dir(self,lst):
-		if isinstance(lst,str):
-			lst=[x for x in split_path(lst)if x and x!='.']
-		node=self.find_node(lst)
-		try:
-			if not os.path.isdir(node.abspath()):
-				return None
-		except(OSError,AttributeError):
-			return None
-		return node
-	def change_ext(self,ext,ext_in=None):
-		name=self.name
-		if ext_in is None:
-			k=name.rfind('.')
-			if k>=0:
-				name=name[:k]+ext
-			else:
-				name=name+ext
-		else:
-			name=name[:-len(ext_in)]+ext
-		return self.parent.find_or_declare([name])
-	def nice_path(self,env=None):
-		return self.path_from(self.ctx.launch_node())
-	def bldpath(self):
-		return self.path_from(self.ctx.bldnode)
-	def srcpath(self):
-		return self.path_from(self.ctx.srcnode)
-	def relpath(self):
-		cur=self
-		x=id(self.ctx.bldnode)
-		while cur.parent:
-			if id(cur)==x:
-				return self.bldpath()
-			cur=cur.parent
-		return self.srcpath()
-	def bld_dir(self):
-		return self.parent.bldpath()
-	def bld_base(self):
-		s=os.path.splitext(self.name)[0]
-		return self.bld_dir()+os.sep+s
-	def get_bld_sig(self):
-		try:
-			ret=self.ctx.hash_cache[id(self)]
-		except KeyError:
-			pass
-		except AttributeError:
-			self.ctx.hash_cache={}
-		else:
-			return ret
-		if not self.is_bld()or self.ctx.bldnode is self.ctx.srcnode:
-			self.sig=Utils.h_file(self.abspath())
-		self.ctx.hash_cache[id(self)]=ret=self.sig
-		return ret
-pickle_lock=Utils.threading.Lock()
-class Nod3(Node):
-	pass
diff --git a/waflib/Options.py b/waflib/Options.py
deleted file mode 100644
index 474521b..0000000
--- a/waflib/Options.py
+++ /dev/null
@@ -1,130 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,tempfile,optparse,sys,re
-from waflib import Logs,Utils,Context
-cmds='distclean configure build install clean uninstall check dist distcheck'.split()
-options={}
-commands=[]
-lockfile=os.environ.get('WAFLOCK','.lock-waf_%s_build'%sys.platform)
-try:cache_global=os.path.abspath(os.environ['WAFCACHE'])
-except KeyError:cache_global=''
-platform=Utils.unversioned_sys_platform()
-class opt_parser(optparse.OptionParser):
-	def __init__(self,ctx):
-		optparse.OptionParser.__init__(self,conflict_handler="resolve",version='waf %s (%s)'%(Context.WAFVERSION,Context.WAFREVISION))
-		self.formatter.width=Logs.get_term_cols()
-		p=self.add_option
-		self.ctx=ctx
-		jobs=ctx.jobs()
-		p('-j','--jobs',dest='jobs',default=jobs,type='int',help='amount of parallel jobs (%r)'%jobs)
-		p('-k','--keep',dest='keep',default=0,action='count',help='keep running happily even if errors are found')
-		p('-v','--verbose',dest='verbose',default=0,action='count',help='verbosity level -v -vv or -vvv [default: 0]')
-		p('--nocache',dest='nocache',default=False,action='store_true',help='ignore the WAFCACHE (if set)')
-		p('--zones',dest='zones',default='',action='store',help='debugging zones (task_gen, deps, tasks, etc)')
-		gr=optparse.OptionGroup(self,'configure options')
-		self.add_option_group(gr)
-		gr.add_option('-o','--out',action='store',default='',help='build dir for the project',dest='out')
-		gr.add_option('-t','--top',action='store',default='',help='src dir for the project',dest='top')
-		default_prefix=os.environ.get('PREFIX')
-		if not default_prefix:
-			if platform=='win32':
-				d=tempfile.gettempdir()
-				default_prefix=d[0].upper()+d[1:]
-			else:
-				default_prefix='/usr/local/'
-		gr.add_option('--prefix',dest='prefix',default=default_prefix,help='installation prefix [default: %r]'%default_prefix)
-		gr.add_option('--download',dest='download',default=False,action='store_true',help='try to download the tools if missing')
-		gr=optparse.OptionGroup(self,'build and install options')
-		self.add_option_group(gr)
-		gr.add_option('-p','--progress',dest='progress_bar',default=0,action='count',help='-p: progress bar; -pp: ide output')
-		gr.add_option('--targets',dest='targets',default='',action='store',help='task generators, e.g. "target1,target2"')
-		gr=optparse.OptionGroup(self,'step options')
-		self.add_option_group(gr)
-		gr.add_option('--files',dest='files',default='',action='store',help='files to process, by regexp, e.g. "*/main.c,*/test/main.o"')
-		default_destdir=os.environ.get('DESTDIR','')
-		gr=optparse.OptionGroup(self,'install/uninstall options')
-		self.add_option_group(gr)
-		gr.add_option('--destdir',help='installation root [default: %r]'%default_destdir,default=default_destdir,dest='destdir')
-		gr.add_option('-f','--force',dest='force',default=False,action='store_true',help='force file installation')
-	def get_usage(self):
-		cmds_str={}
-		for cls in Context.classes:
-			if not cls.cmd or cls.cmd=='options':
-				continue
-			s=cls.__doc__ or''
-			cmds_str[cls.cmd]=s
-		if Context.g_module:
-			for(k,v)in Context.g_module.__dict__.items():
-				if k in['options','init','shutdown']:
-					continue
-				if type(v)is type(Context.create_context):
-					if v.__doc__ and not k.startswith('_'):
-						cmds_str[k]=v.__doc__
-		just=0
-		for k in cmds_str:
-			just=max(just,len(k))
-		lst=['  %s: %s'%(k.ljust(just),v)for(k,v)in cmds_str.items()]
-		lst.sort()
-		ret='\n'.join(lst)
-		return'''waf [commands] [options]
-
-Main commands (example: ./waf build -j4)
-%s
-'''%ret
-class OptionsContext(Context.Context):
-	cmd='options'
-	fun='options'
-	def __init__(self,**kw):
-		super(OptionsContext,self).__init__(**kw)
-		self.parser=opt_parser(self)
-		self.option_groups={}
-	def jobs(self):
-		count=int(os.environ.get('JOBS',0))
-		if count<1:
-			if'NUMBER_OF_PROCESSORS'in os.environ:
-				count=int(os.environ.get('NUMBER_OF_PROCESSORS',1))
-			else:
-				if hasattr(os,'sysconf_names'):
-					if'SC_NPROCESSORS_ONLN'in os.sysconf_names:
-						count=int(os.sysconf('SC_NPROCESSORS_ONLN'))
-					elif'SC_NPROCESSORS_CONF'in os.sysconf_names:
-						count=int(os.sysconf('SC_NPROCESSORS_CONF'))
-				if not count and os.name not in('nt','java'):
-					tmp=self.cmd_and_log(['sysctl','-n','hw.ncpu'])
-					if re.match('^[0-9]+$',tmp):
-						count=int(tmp)
-		if count<1:
-			count=1
-		elif count>1024:
-			count=1024
-		return count
-	def add_option(self,*k,**kw):
-		self.parser.add_option(*k,**kw)
-	def add_option_group(self,*k,**kw):
-		try:
-			gr=self.option_groups[k[0]]
-		except:
-			gr=self.parser.add_option_group(*k,**kw)
-		self.option_groups[k[0]]=gr
-		return gr
-	def get_option_group(self,opt_str):
-		try:
-			return self.option_groups[opt_str]
-		except KeyError:
-			for group in self.parser.option_groups:
-				if group.title==opt_str:
-					return group
-			return None
-	def parse_args(self,_args=None):
-		global options,commands
-		(options,leftover_args)=self.parser.parse_args(args=_args)
-		commands=leftover_args
-		if options.destdir:
-			options.destdir=os.path.abspath(os.path.expanduser(options.destdir))
-		if options.verbose>=1:
-			self.load('errcheck')
-	def execute(self):
-		super(OptionsContext,self).execute()
-		self.parse_args()
diff --git a/waflib/Runner.py b/waflib/Runner.py
deleted file mode 100644
index a0e091a..0000000
--- a/waflib/Runner.py
+++ /dev/null
@@ -1,191 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import random,atexit
-try:
-	from queue import Queue
-except:
-	from Queue import Queue
-from waflib import Utils,Task,Errors
-GAP=10
-class TaskConsumer(Utils.threading.Thread):
-	def __init__(self):
-		Utils.threading.Thread.__init__(self)
-		self.ready=Queue()
-		self.setDaemon(1)
-		self.start()
-	def run(self):
-		try:
-			self.loop()
-		except:
-			pass
-	def loop(self):
-		while 1:
-			tsk=self.ready.get()
-			if not isinstance(tsk,Task.TaskBase):
-				tsk(self)
-			else:
-				tsk.process()
-pool=Queue()
-def get_pool():
-	try:
-		return pool.get(False)
-	except:
-		return TaskConsumer()
-def put_pool(x):
-	pool.put(x)
-def _free_resources():
-	global pool
-	lst=[]
-	while pool.qsize():
-		lst.append(pool.get())
-	for x in lst:
-		x.ready.put(None)
-	for x in lst:
-		x.join()
-	pool=None
-atexit.register(_free_resources)
-class Parallel(object):
-	def __init__(self,bld,j=2):
-		self.numjobs=j
-		self.bld=bld
-		self.outstanding=[]
-		self.frozen=[]
-		self.out=Queue(0)
-		self.count=0
-		self.processed=1
-		self.stop=False
-		self.error=[]
-		self.biter=None
-		self.dirty=False
-	def get_next_task(self):
-		if not self.outstanding:
-			return None
-		return self.outstanding.pop(0)
-	def postpone(self,tsk):
-		if random.randint(0,1):
-			self.frozen.insert(0,tsk)
-		else:
-			self.frozen.append(tsk)
-	def refill_task_list(self):
-		while self.count>self.numjobs*GAP:
-			self.get_out()
-		while not self.outstanding:
-			if self.count:
-				self.get_out()
-			elif self.frozen:
-				try:
-					cond=self.deadlock==self.processed
-				except:
-					pass
-				else:
-					if cond:
-						msg='check the build order for the tasks'
-						for tsk in self.frozen:
-							if not tsk.run_after:
-								msg='check the methods runnable_status'
-								break
-						lst=[]
-						for tsk in self.frozen:
-							lst.append('%s\t-> %r'%(repr(tsk),[id(x)for x in tsk.run_after]))
-						raise Errors.WafError('Deadlock detected: %s%s'%(msg,''.join(lst)))
-				self.deadlock=self.processed
-			if self.frozen:
-				self.outstanding+=self.frozen
-				self.frozen=[]
-			elif not self.count:
-				self.outstanding.extend(self.biter.next())
-				self.total=self.bld.total()
-				break
-	def add_more_tasks(self,tsk):
-		if getattr(tsk,'more_tasks',None):
-			self.outstanding+=tsk.more_tasks
-			self.total+=len(tsk.more_tasks)
-	def get_out(self):
-		tsk=self.out.get()
-		if not self.stop:
-			self.add_more_tasks(tsk)
-		self.count-=1
-		self.dirty=True
-	def error_handler(self,tsk):
-		if not self.bld.keep:
-			self.stop=True
-		self.error.append(tsk)
-	def add_task(self,tsk):
-		try:
-			self.pool
-		except AttributeError:
-			self.init_task_pool()
-		self.ready.put(tsk)
-	def init_task_pool(self):
-		pool=self.pool=[get_pool()for i in range(self.numjobs)]
-		self.ready=Queue(0)
-		def setq(consumer):
-			consumer.ready=self.ready
-		for x in pool:
-			x.ready.put(setq)
-		return pool
-	def free_task_pool(self):
-		def setq(consumer):
-			consumer.ready=Queue(0)
-			self.out.put(self)
-		try:
-			pool=self.pool
-		except:
-			pass
-		else:
-			for x in pool:
-				self.ready.put(setq)
-			for x in pool:
-				self.get_out()
-			for x in pool:
-				put_pool(x)
-			self.pool=[]
-	def start(self):
-		self.total=self.bld.total()
-		while not self.stop:
-			self.refill_task_list()
-			tsk=self.get_next_task()
-			if not tsk:
-				if self.count:
-					continue
-				else:
-					break
-			if tsk.hasrun:
-				self.processed+=1
-				continue
-			if self.stop:
-				break
-			try:
-				st=tsk.runnable_status()
-			except Exception:
-				self.processed+=1
-				if not self.stop and self.bld.keep:
-					tsk.hasrun=Task.SKIPPED
-					if self.bld.keep==1:
-						self.stop=True
-					continue
-				tsk.err_msg=Utils.ex_stack()
-				tsk.hasrun=Task.EXCEPTION
-				self.error_handler(tsk)
-				continue
-			if st==Task.ASK_LATER:
-				self.postpone(tsk)
-			elif st==Task.SKIP_ME:
-				self.processed+=1
-				tsk.hasrun=Task.SKIPPED
-				self.add_more_tasks(tsk)
-			else:
-				tsk.position=(self.processed,self.total)
-				self.count+=1
-				tsk.master=self
-				self.processed+=1
-				if self.numjobs==1:
-					tsk.process()
-				else:
-					self.add_task(tsk)
-		while self.error and self.count:
-			self.get_out()
-		assert(self.count==0 or self.stop)
-		self.free_task_pool()
diff --git a/waflib/Scripting.py b/waflib/Scripting.py
deleted file mode 100644
index f97a3d5..0000000
--- a/waflib/Scripting.py
+++ /dev/null
@@ -1,358 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,shutil,traceback,errno,sys,stat
-from waflib import Utils,Configure,Logs,Options,ConfigSet,Context,Errors,Build,Node
-build_dir_override=None
-no_climb_commands=['configure']
-default_cmd="build"
-def waf_entry_point(current_directory,version,wafdir):
-	Logs.init_log()
-	if Context.WAFVERSION!=version:
-		Logs.error('Waf script %r and library %r do not match (directory %r)'%(version,Context.WAFVERSION,wafdir))
-		sys.exit(1)
-	if'--version'in sys.argv:
-		ctx=Context.create_context('options')
-		ctx.curdir=current_directory
-		ctx.parse_args()
-		sys.exit(0)
-	Context.waf_dir=wafdir
-	Context.launch_dir=current_directory
-	no_climb=os.environ.get('NOCLIMB',None)
-	if not no_climb:
-		for k in no_climb_commands:
-			if k in sys.argv:
-				no_climb=True
-				break
-	cur=current_directory
-	while cur:
-		lst=os.listdir(cur)
-		if Options.lockfile in lst:
-			env=ConfigSet.ConfigSet()
-			try:
-				env.load(os.path.join(cur,Options.lockfile))
-				ino=os.stat(cur)[stat.ST_INO]
-			except Exception:
-				pass
-			else:
-				for x in[env.run_dir,env.top_dir,env.out_dir]:
-					if Utils.is_win32:
-						if cur==x:
-							load=True
-							break
-					else:
-						try:
-							ino2=os.stat(x)[stat.ST_INO]
-						except:
-							pass
-						else:
-							if ino==ino2:
-								load=True
-								break
-				else:
-					Logs.warn('invalid lock file in %s'%cur)
-					load=False
-				if load:
-					Context.run_dir=env.run_dir
-					Context.top_dir=env.top_dir
-					Context.out_dir=env.out_dir
-					break
-		if not Context.run_dir:
-			if Context.WSCRIPT_FILE in lst:
-				Context.run_dir=cur
-		next=os.path.dirname(cur)
-		if next==cur:
-			break
-		cur=next
-		if no_climb:
-			break
-	if not Context.run_dir:
-		if'-h'in sys.argv or'--help'in sys.argv:
-			Logs.warn('No wscript file found: the help message may be incomplete')
-			ctx=Context.create_context('options')
-			ctx.curdir=current_directory
-			ctx.parse_args()
-			sys.exit(0)
-		Logs.error('Waf: Run from a directory containing a file named %r'%Context.WSCRIPT_FILE)
-		sys.exit(1)
-	try:
-		os.chdir(Context.run_dir)
-	except OSError:
-		Logs.error('Waf: The folder %r is unreadable'%Context.run_dir)
-		sys.exit(1)
-	try:
-		set_main_module(Context.run_dir+os.sep+Context.WSCRIPT_FILE)
-	except Errors.WafError ,e:
-		Logs.pprint('RED',e.verbose_msg)
-		Logs.error(str(e))
-		sys.exit(1)
-	except Exception ,e:
-		Logs.error('Waf: The wscript in %r is unreadable'%Context.run_dir,e)
-		traceback.print_exc(file=sys.stdout)
-		sys.exit(2)
-	try:
-		run_commands()
-	except Errors.WafError ,e:
-		if Logs.verbose>1:
-			Logs.pprint('RED',e.verbose_msg)
-		Logs.error(e.msg)
-		sys.exit(1)
-	except Exception ,e:
-		traceback.print_exc(file=sys.stdout)
-		sys.exit(2)
-	except KeyboardInterrupt:
-		Logs.pprint('RED','Interrupted')
-		sys.exit(68)
-def set_main_module(file_path):
-	Context.g_module=Context.load_module(file_path)
-	Context.g_module.root_path=file_path
-	def set_def(obj):
-		name=obj.__name__
-		if not name in Context.g_module.__dict__:
-			setattr(Context.g_module,name,obj)
-	for k in[update,dist,distclean,distcheck,update]:
-		set_def(k)
-	if not'init'in Context.g_module.__dict__:
-		Context.g_module.init=Utils.nada
-	if not'shutdown'in Context.g_module.__dict__:
-		Context.g_module.shutdown=Utils.nada
-	if not'options'in Context.g_module.__dict__:
-		Context.g_module.options=Utils.nada
-def parse_options():
-	Context.create_context('options').execute()
-	if not Options.commands:
-		Options.commands=[default_cmd]
-	Logs.verbose=Options.options.verbose
-	Logs.init_log()
-	if Options.options.zones:
-		Logs.zones=Options.options.zones.split(',')
-		if not Logs.verbose:
-			Logs.verbose=1
-	elif Logs.verbose>0:
-		Logs.zones=['runner']
-	if Logs.verbose>2:
-		Logs.zones=['*']
-def run_command(cmd_name):
-	ctx=Context.create_context(cmd_name)
-	ctx.options=Options.options
-	ctx.cmd=cmd_name
-	ctx.execute()
-	return ctx
-def run_commands():
-	parse_options()
-	run_command('init')
-	while Options.commands:
-		cmd_name=Options.commands.pop(0)
-		timer=Utils.Timer()
-		run_command(cmd_name)
-		if not Options.options.progress_bar:
-			elapsed=' (%s)'%str(timer)
-			Logs.info('%r finished successfully%s'%(cmd_name,elapsed))
-	run_command('shutdown')
-def _can_distclean(name):
-	for k in'.o .moc .exe'.split():
-		if name.endswith(k):
-			return True
-	return False
-def distclean_dir(dirname):
-	for(root,dirs,files)in os.walk(dirname):
-		for f in files:
-			if _can_distclean(f):
-				fname=root+os.sep+f
-				try:
-					os.unlink(fname)
-				except:
-					Logs.warn('could not remove %r'%fname)
-	for x in[Context.DBFILE,'config.log']:
-		try:
-			os.unlink(x)
-		except:
-			pass
-	try:
-		shutil.rmtree('c4che')
-	except:
-		pass
-def distclean(ctx):
-	'''removes the build directory'''
-	lst=os.listdir('.')
-	for f in lst:
-		if f==Options.lockfile:
-			try:
-				proj=ConfigSet.ConfigSet(f)
-			except:
-				Logs.warn('could not read %r'%f)
-				continue
-			if proj['out_dir']!=proj['top_dir']:
-				try:
-					shutil.rmtree(proj['out_dir'])
-				except IOError:
-					pass
-				except OSError ,e:
-					if e.errno!=errno.ENOENT:
-						Logs.warn('project %r cannot be removed'%proj[Context.OUT])
-			else:
-				distclean_dir(proj['out_dir'])
-			for k in(proj['out_dir'],proj['top_dir'],proj['run_dir']):
-				try:
-					os.remove(os.path.join(k,Options.lockfile))
-				except OSError ,e:
-					if e.errno!=errno.ENOENT:
-						Logs.warn('file %r cannot be removed'%f)
-		if f.startswith('.waf-')and not Options.commands:
-			shutil.rmtree(f,ignore_errors=True)
-class Dist(Context.Context):
-	cmd='dist'
-	fun='dist'
-	algo='tar.bz2'
-	ext_algo={}
-	def execute(self):
-		self.recurse([os.path.dirname(Context.g_module.root_path)])
-		self.archive()
-	def archive(self):
-		import tarfile
-		arch_name=self.get_arch_name()
-		try:
-			self.base_path
-		except:
-			self.base_path=self.path
-		node=self.base_path.make_node(arch_name)
-		try:
-			node.delete()
-		except:
-			pass
-		files=self.get_files()
-		if self.algo.startswith('tar.'):
-			tar=tarfile.open(arch_name,'w:'+self.algo.replace('tar.',''))
-			for x in files:
-				tinfo=tar.gettarinfo(name=x.abspath(),arcname=self.get_tar_prefix()+'/'+x.path_from(self.base_path))
-				tinfo.uid=0
-				tinfo.gid=0
-				tinfo.uname='root'
-				tinfo.gname='root'
-				fu=None
-				try:
-					fu=open(x.abspath(),'rb')
-					tar.addfile(tinfo,fileobj=fu)
-				finally:
-					fu.close()
-			tar.close()
-		elif self.algo=='zip':
-			import zipfile
-			zip=zipfile.ZipFile(arch_name,'w',compression=zipfile.ZIP_DEFLATED)
-			for x in files:
-				archive_name=self.get_base_name()+'/'+x.path_from(self.base_path)
-				zip.write(x.abspath(),archive_name,zipfile.ZIP_DEFLATED)
-			zip.close()
-		else:
-			self.fatal('Valid algo types are tar.bz2, tar.gz or zip')
-		try:
-			from hashlib import sha1 as sha
-		except ImportError:
-			from sha import sha
-		try:
-			digest=" (sha=%r)"%sha(node.read()).hexdigest()
-		except:
-			digest=''
-		Logs.info('New archive created: %s%s'%(self.arch_name,digest))
-	def get_tar_prefix(self):
-		try:
-			return self.tar_prefix
-		except:
-			return self.get_base_name()
-	def get_arch_name(self):
-		try:
-			self.arch_name
-		except:
-			self.arch_name=self.get_base_name()+'.'+self.ext_algo.get(self.algo,self.algo)
-		return self.arch_name
-	def get_base_name(self):
-		try:
-			self.base_name
-		except:
-			appname=getattr(Context.g_module,Context.APPNAME,'noname')
-			version=getattr(Context.g_module,Context.VERSION,'1.0')
-			self.base_name=appname+'-'+version
-		return self.base_name
-	def get_excl(self):
-		try:
-			return self.excl
-		except:
-			self.excl=Node.exclude_regs+' **/waf-1.6.* **/.waf-1.6* **/*~ **/*.rej **/*.orig **/*.pyc **/*.pyo **/*.bak **/*.swp **/.lock-w*'
-			nd=self.root.find_node(Context.out_dir)
-			if nd:
-				self.excl+=' '+nd.path_from(self.base_path)
-			return self.excl
-	def get_files(self):
-		try:
-			files=self.files
-		except:
-			files=self.base_path.ant_glob('**/*',excl=self.get_excl())
-		return files
-def dist(ctx):
-	'''makes a tarball for redistributing the sources'''
-	pass
-class DistCheck(Dist):
-	fun='distcheck'
-	cmd='distcheck'
-	def execute(self):
-		self.recurse([os.path.dirname(Context.g_module.root_path)])
-		self.archive()
-		self.check()
-	def check(self):
-		import tempfile,tarfile
-		t=None
-		try:
-			t=tarfile.open(self.get_arch_name())
-			for x in t:
-				t.extract(x)
-		finally:
-			if t:
-				t.close()
-		instdir=tempfile.mkdtemp('.inst',self.get_base_name())
-		ret=Utils.subprocess.Popen([sys.argv[0],'configure','install','uninstall','--destdir='+instdir],cwd=self.get_base_name()).wait()
-		if ret:
-			raise Errors.WafError('distcheck failed with code %i'%ret)
-		if os.path.exists(instdir):
-			raise Errors.WafError('distcheck succeeded, but files were left in %s'%instdir)
-		shutil.rmtree(self.get_base_name())
-def distcheck(ctx):
-	'''checks if the project compiles (tarball from 'dist')'''
-	pass
-def update(ctx):
-	'''updates the plugins from the *waflib/extras* directory'''
-	lst=Options.options.files.split(',')
-	if not lst:
-		lst=[x for x in Utils.listdir(Context.waf_dir+'/waflib/extras')if x.endswith('.py')]
-	for x in lst:
-		tool=x.replace('.py','')
-		try:
-			Configure.download_tool(tool,force=True,ctx=ctx)
-		except Errors.WafError:
-			Logs.error('Could not find the tool %s in the remote repository'%x)
-def autoconfigure(execute_method):
-	def execute(self):
-		if not Configure.autoconfig:
-			return execute_method(self)
-		env=ConfigSet.ConfigSet()
-		do_config=False
-		try:
-			env.load(os.path.join(Context.top_dir,Options.lockfile))
-		except Exception:
-			Logs.warn('Configuring the project')
-			do_config=True
-		else:
-			if env.run_dir!=Context.run_dir:
-				do_config=True
-			else:
-				h=0
-				for f in env['files']:
-					h=hash((h,Utils.readf(f,'rb')))
-				do_config=h!=env.hash
-		if do_config:
-			Options.commands.insert(0,self.cmd)
-			Options.commands.insert(0,'configure')
-			return
-		return execute_method(self)
-	return execute
-Build.BuildContext.execute=autoconfigure(Build.BuildContext.execute)
diff --git a/waflib/Task.py b/waflib/Task.py
deleted file mode 100644
index 81a10a8..0000000
--- a/waflib/Task.py
+++ /dev/null
@@ -1,669 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import sys
-if sys.hexversion < 0x020400f0: from sets import Set as set
-import os,shutil,re,tempfile
-from waflib import Utils,Logs,Errors
-NOT_RUN=0
-MISSING=1
-CRASHED=2
-EXCEPTION=3
-SKIPPED=8
-SUCCESS=9
-ASK_LATER=-1
-SKIP_ME=-2
-RUN_ME=-3
-COMPILE_TEMPLATE_SHELL='''
-def f(tsk):
-	env = tsk.env
-	gen = tsk.generator
-	bld = gen.bld
-	wd = getattr(tsk, 'cwd', None)
-	p = env.get_flat
-	tsk.last_cmd = cmd = \'\'\' %s \'\'\' % s
-	return tsk.exec_command(cmd, cwd=wd, env=env.env or None)
-'''
-COMPILE_TEMPLATE_NOSHELL='''
-def f(tsk):
-	env = tsk.env
-	gen = tsk.generator
-	bld = gen.bld
-	wd = getattr(tsk, 'cwd', None)
-	def to_list(xx):
-		if isinstance(xx, str): return [xx]
-		return xx
-	tsk.last_cmd = lst = []
-	%s
-	lst = [x for x in lst if x]
-	return tsk.exec_command(lst, cwd=wd, env=env.env or None)
-'''
-def cache_outputs(cls):
-	m1=cls.run
-	def run(self):
-		bld=self.generator.bld
-		if bld.cache_global and not bld.nocache:
-			if self.can_retrieve_cache():
-				return 0
-		return m1(self)
-	cls.run=run
-	m2=cls.post_run
-	def post_run(self):
-		bld=self.generator.bld
-		ret=m2(self)
-		if bld.cache_global and not bld.nocache:
-			self.put_files_cache()
-		return ret
-	cls.post_run=post_run
-	return cls
-classes={}
-class store_task_type(type):
-	def __init__(cls,name,bases,dict):
-		super(store_task_type,cls).__init__(name,bases,dict)
-		name=cls.__name__
-		if name.endswith('_task'):
-			name=name.replace('_task','')
-		if name!='evil'and name!='TaskBase':
-			global classes
-			if getattr(cls,'run_str',None):
-				(f,dvars)=compile_fun(cls.run_str,cls.shell)
-				cls.hcode=cls.run_str
-				cls.run_str=None
-				cls.run=f
-				cls.vars=list(set(cls.vars+dvars))
-				cls.vars.sort()
-			elif getattr(cls,'run',None)and not'hcode'in cls.__dict__:
-				cls.hcode=Utils.h_fun(cls.run)
-			if not getattr(cls,'nocache',None):
-				cls=cache_outputs(cls)
-			classes[name]=cls
-evil=store_task_type('evil',(object,),{})
-class TaskBase(evil):
-	color='GREEN'
-	ext_in=[]
-	ext_out=[]
-	before=[]
-	after=[]
-	hcode=''
-	def __init__(self,*k,**kw):
-		self.hasrun=NOT_RUN
-		try:
-			self.generator=kw['generator']
-		except KeyError:
-			self.generator=self
-	def __repr__(self):
-		return'\n\t{task %r: %s %s}'%(self.__class__.__name__,id(self),str(getattr(self,'fun','')))
-	def __str__(self):
-		if hasattr(self,'fun'):
-			return'executing: %s\n'%self.fun.__name__
-		return self.__class__.__name__+'\n'
-	def __hash__(self):
-		return id(self)
-	def exec_command(self,cmd,**kw):
-		bld=self.generator.bld
-		try:
-			if not kw.get('cwd',None):
-				kw['cwd']=bld.cwd
-		except AttributeError:
-			bld.cwd=kw['cwd']=bld.variant_dir
-		return bld.exec_command(cmd,**kw)
-	def runnable_status(self):
-		return RUN_ME
-	def process(self):
-		m=self.master
-		if m.stop:
-			m.out.put(self)
-			return
-		try:
-			del self.generator.bld.task_sigs[self.uid()]
-		except:
-			pass
-		try:
-			self.generator.bld.returned_tasks.append(self)
-			self.log_display(self.generator.bld)
-			ret=self.run()
-		except Exception:
-			self.err_msg=Utils.ex_stack()
-			self.hasrun=EXCEPTION
-			m.error_handler(self)
-			m.out.put(self)
-			return
-		if ret:
-			self.err_code=ret
-			self.hasrun=CRASHED
-		else:
-			try:
-				self.post_run()
-			except Errors.WafError:
-				pass
-			except Exception:
-				self.err_msg=Utils.ex_stack()
-				self.hasrun=EXCEPTION
-			else:
-				self.hasrun=SUCCESS
-		if self.hasrun!=SUCCESS:
-			m.error_handler(self)
-		m.out.put(self)
-	def run(self):
-		if hasattr(self,'fun'):
-			return self.fun(self)
-		return 0
-	def post_run(self):
-		pass
-	def log_display(self,bld):
-		bld.to_log(self.display())
-	def display(self):
-		col1=Logs.colors(self.color)
-		col2=Logs.colors.NORMAL
-		master=self.master
-		def cur():
-			tmp=-1
-			if hasattr(master,'ready'):
-				tmp-=master.ready.qsize()
-			return master.processed+tmp
-		if self.generator.bld.progress_bar==1:
-			return self.generator.bld.progress_line(cur(),master.total,col1,col2)
-		if self.generator.bld.progress_bar==2:
-			ela=str(self.generator.bld.timer)
-			try:
-				ins=','.join([n.name for n in self.inputs])
-			except AttributeError:
-				ins=''
-			try:
-				outs=','.join([n.name for n in self.outputs])
-			except AttributeError:
-				outs=''
-			return'|Total %s|Current %s|Inputs %s|Outputs %s|Time %s|\n'%(master.total,cur(),ins,outs,ela)
-		s=str(self)
-		if not s:
-			return None
-		total=master.total
-		n=len(str(total))
-		fs='[%%%dd/%%%dd] %%s%%s%%s'%(n,n)
-		return fs%(cur(),total,col1,s,col2)
-	def attr(self,att,default=None):
-		ret=getattr(self,att,self)
-		if ret is self:return getattr(self.__class__,att,default)
-		return ret
-	def hash_constraints(self):
-		cls=self.__class__
-		tup=(str(cls.before),str(cls.after),str(cls.ext_in),str(cls.ext_out),cls.__name__,cls.hcode)
-		h=hash(tup)
-		return h
-	def format_error(self):
-		msg=getattr(self,'last_cmd','')
-		if getattr(self,"err_msg",None):
-			return self.err_msg
-		elif self.hasrun==CRASHED:
-			try:
-				return' -> task failed (exit status %r): %r\n%r'%(self.err_code,self,msg)
-			except AttributeError:
-				return' -> task failed: %r\n%r'%(self,msg)
-		elif self.hasrun==MISSING:
-			return' -> missing files: %r\n%r'%(self,msg)
-		else:
-			return'?'
-	def colon(self,var1,var2):
-		tmp=self.env[var1]
-		if isinstance(var2,str):
-			it=self.env[var2]
-		else:
-			it=var2
-		if isinstance(tmp,str):
-			return[tmp%x for x in it]
-		else:
-			if Logs.verbose and not tmp and it:
-				Logs.warn('Missing env variable %r for task %r (generator %r)'%(var1,self,self.generator))
-			lst=[]
-			for y in it:
-				lst.extend(tmp)
-				lst.append(y)
-			return lst
-class Task(TaskBase):
-	vars=[]
-	shell=False
-	def __init__(self,*k,**kw):
-		TaskBase.__init__(self,*k,**kw)
-		self.env=kw['env']
-		self.inputs=[]
-		self.outputs=[]
-		self.dep_nodes=[]
-		self.run_after=set([])
-	def __str__(self):
-		env=self.env
-		src_str=' '.join([a.nice_path(env)for a in self.inputs])
-		tgt_str=' '.join([a.nice_path(env)for a in self.outputs])
-		if self.outputs:sep=' -> '
-		else:sep=''
-		return'%s: %s%s%s\n'%(self.__class__.__name__.replace('_task',''),src_str,sep,tgt_str)
-	def __repr__(self):
-		return"".join(['\n\t{task %r: '%id(self),self.__class__.__name__," ",",".join([x.name for x in self.inputs])," -> ",",".join([x.name for x in self.outputs]),'}'])
-	def uid(self):
-		try:
-			return self.uid_
-		except AttributeError:
-			m=Utils.md5()
-			up=m.update
-			up(self.__class__.__name__)
-			for x in self.inputs+self.outputs:
-				up(x.abspath())
-			self.uid_=m.digest()
-			return self.uid_
-	def set_inputs(self,inp):
-		if isinstance(inp,list):self.inputs+=inp
-		else:self.inputs.append(inp)
-	def set_outputs(self,out):
-		if isinstance(out,list):self.outputs+=out
-		else:self.outputs.append(out)
-	def set_run_after(self,task):
-		assert isinstance(task,TaskBase)
-		self.run_after.add(task)
-	def signature(self):
-		try:return self.cache_sig
-		except AttributeError:pass
-		self.m=Utils.md5()
-		self.m.update(self.hcode)
-		self.sig_explicit_deps()
-		self.sig_vars()
-		if self.scan:
-			try:
-				self.sig_implicit_deps()
-			except Errors.TaskRescan:
-				return self.signature()
-		ret=self.cache_sig=self.m.digest()
-		return ret
-	def runnable_status(self):
-		for t in self.run_after:
-			if not t.hasrun:
-				return ASK_LATER
-		bld=self.generator.bld
-		try:
-			new_sig=self.signature()
-		except Errors.TaskNotReady:
-			return ASK_LATER
-		key=self.uid()
-		try:
-			prev_sig=bld.task_sigs[key]
-		except KeyError:
-			Logs.debug("task: task %r must run as it was never run before or the task code changed"%self)
-			return RUN_ME
-		for node in self.outputs:
-			try:
-				if node.sig!=new_sig:
-					return RUN_ME
-			except AttributeError:
-				Logs.debug("task: task %r must run as the output nodes do not exist"%self)
-				return RUN_ME
-		if new_sig!=prev_sig:
-			return RUN_ME
-		return SKIP_ME
-	def post_run(self):
-		bld=self.generator.bld
-		sig=self.signature()
-		for node in self.outputs:
-			try:
-				os.stat(node.abspath())
-			except OSError:
-				self.hasrun=MISSING
-				self.err_msg='-> missing file: %r'%node.abspath()
-				raise Errors.WafError(self.err_msg)
-			node.sig=sig
-		bld.task_sigs[self.uid()]=self.cache_sig
-	def sig_explicit_deps(self):
-		bld=self.generator.bld
-		upd=self.m.update
-		for x in self.inputs+self.dep_nodes:
-			try:
-				upd(x.get_bld_sig())
-			except(AttributeError,TypeError):
-				raise Errors.WafError('Missing node signature for %r (required by %r)'%(x,self))
-		if bld.deps_man:
-			additional_deps=bld.deps_man
-			for x in self.inputs+self.outputs:
-				try:
-					d=additional_deps[id(x)]
-				except KeyError:
-					continue
-				for v in d:
-					if isinstance(v,bld.root.__class__):
-						try:
-							v=v.get_bld_sig()
-						except AttributeError:
-							raise Errors.WafError('Missing node signature for %r (required by %r)'%(v,self))
-					elif hasattr(v,'__call__'):
-						v=v()
-					upd(v)
-		return self.m.digest()
-	def sig_vars(self):
-		bld=self.generator.bld
-		env=self.env
-		upd=self.m.update
-		act_sig=bld.hash_env_vars(env,self.__class__.vars)
-		upd(act_sig)
-		dep_vars=getattr(self,'dep_vars',None)
-		if dep_vars:
-			upd(bld.hash_env_vars(env,dep_vars))
-		return self.m.digest()
-	scan=None
-	def sig_implicit_deps(self):
-		bld=self.generator.bld
-		key=self.uid()
-		prev=bld.task_sigs.get((key,'imp'),[])
-		if prev:
-			try:
-				if prev==self.compute_sig_implicit_deps():
-					return prev
-			except:
-				for x in bld.node_deps.get(self.uid(),[]):
-					if x.is_child_of(bld.srcnode):
-						try:
-							os.stat(x.abspath())
-						except:
-							try:
-								del x.parent.children[x.name]
-							except:
-								pass
-			del bld.task_sigs[(key,'imp')]
-			raise Errors.TaskRescan('rescan')
-		(nodes,names)=self.scan()
-		if Logs.verbose:
-			Logs.debug('deps: scanner for %s returned %s %s'%(str(self),str(nodes),str(names)))
-		bld.node_deps[key]=nodes
-		bld.raw_deps[key]=names
-		self.are_implicit_nodes_ready()
-		try:
-			bld.task_sigs[(key,'imp')]=sig=self.compute_sig_implicit_deps()
-		except:
-			if Logs.verbose:
-				for k in bld.node_deps.get(self.uid(),[]):
-					try:
-						k.get_bld_sig()
-					except:
-						Logs.warn('Missing signature for node %r (may cause rebuilds)'%k)
-		else:
-			return sig
-	def compute_sig_implicit_deps(self):
-		upd=self.m.update
-		bld=self.generator.bld
-		self.are_implicit_nodes_ready()
-		for k in bld.node_deps.get(self.uid(),[]):
-			upd(k.get_bld_sig())
-		return self.m.digest()
-	def are_implicit_nodes_ready(self):
-		bld=self.generator.bld
-		try:
-			cache=bld.dct_implicit_nodes
-		except:
-			bld.dct_implicit_nodes=cache={}
-		try:
-			dct=cache[bld.cur]
-		except KeyError:
-			dct=cache[bld.cur]={}
-			for tsk in bld.cur_tasks:
-				for x in tsk.outputs:
-					dct[x]=tsk
-		modified=False
-		for x in bld.node_deps.get(self.uid(),[]):
-			if x in dct:
-				self.run_after.add(dct[x])
-				modified=True
-		if modified:
-			for tsk in self.run_after:
-				if not tsk.hasrun:
-					raise Errors.TaskNotReady('not ready')
-	def can_retrieve_cache(self):
-		if not getattr(self,'outputs',None):
-			return None
-		sig=self.signature()
-		ssig=Utils.to_hex(self.uid())+Utils.to_hex(sig)
-		dname=os.path.join(self.generator.bld.cache_global,ssig)
-		try:
-			t1=os.stat(dname).st_mtime
-		except OSError:
-			return None
-		for node in self.outputs:
-			orig=os.path.join(dname,node.name)
-			try:
-				shutil.copy2(orig,node.abspath())
-				os.utime(orig,None)
-			except(OSError,IOError):
-				Logs.debug('task: failed retrieving file')
-				return None
-		try:
-			t2=os.stat(dname).st_mtime
-		except OSError:
-			return None
-		if t1!=t2:
-			return None
-		for node in self.outputs:
-			node.sig=sig
-			if self.generator.bld.progress_bar<1:
-				self.generator.bld.to_log('restoring from cache %r\n'%node.abspath())
-		self.cached=True
-		return True
-	def put_files_cache(self):
-		if getattr(self,'cached',None):
-			return None
-		if not getattr(self,'outputs',None):
-			return None
-		sig=self.signature()
-		ssig=Utils.to_hex(self.uid())+Utils.to_hex(sig)
-		dname=os.path.join(self.generator.bld.cache_global,ssig)
-		tmpdir=tempfile.mkdtemp(prefix=self.generator.bld.cache_global+os.sep+'waf')
-		try:
-			shutil.rmtree(dname)
-		except:
-			pass
-		try:
-			for node in self.outputs:
-				dest=os.path.join(tmpdir,node.name)
-				shutil.copy2(node.abspath(),dest)
-		except(OSError,IOError):
-			try:
-				shutil.rmtree(tmpdir)
-			except:
-				pass
-		else:
-			try:
-				os.rename(tmpdir,dname)
-			except OSError:
-				try:
-					shutil.rmtree(tmpdir)
-				except:
-					pass
-			else:
-				try:
-					os.chmod(dname,Utils.O755)
-				except:
-					pass
-def is_before(t1,t2):
-	to_list=Utils.to_list
-	for k in to_list(t2.ext_in):
-		if k in to_list(t1.ext_out):
-			return 1
-	if t1.__class__.__name__ in to_list(t2.after):
-		return 1
-	if t2.__class__.__name__ in to_list(t1.before):
-		return 1
-	return 0
-def set_file_constraints(tasks):
-	ins=Utils.defaultdict(set)
-	outs=Utils.defaultdict(set)
-	for x in tasks:
-		for a in getattr(x,'inputs',[])+getattr(x,'dep_nodes',[]):
-			ins[id(a)].add(x)
-		for a in getattr(x,'outputs',[]):
-			outs[id(a)].add(x)
-	links=set(ins.keys()).intersection(outs.keys())
-	for k in links:
-		for a in ins[k]:
-			a.run_after.update(outs[k])
-def set_precedence_constraints(tasks):
-	cstr_groups=Utils.defaultdict(list)
-	for x in tasks:
-		h=x.hash_constraints()
-		cstr_groups[h].append(x)
-	keys=list(cstr_groups.keys())
-	maxi=len(keys)
-	for i in range(maxi):
-		t1=cstr_groups[keys[i]][0]
-		for j in range(i+1,maxi):
-			t2=cstr_groups[keys[j]][0]
-			if is_before(t1,t2):
-				a=i
-				b=j
-			elif is_before(t2,t1):
-				a=j
-				b=i
-			else:
-				continue
-			for x in cstr_groups[keys[b]]:
-				x.run_after.update(cstr_groups[keys[a]])
-def funex(c):
-	dc={}
-	exec(c,dc)
-	return dc['f']
-reg_act=re.compile(r"(?P<backslash>\\)|(?P<dollar>\$\$)|(?P<subst>\$\{(?P<var>\w+)(?P<code>.*?)\})",re.M)
-def compile_fun_shell(line):
-	extr=[]
-	def repl(match):
-		g=match.group
-		if g('dollar'):return"$"
-		elif g('backslash'):return'\\\\'
-		elif g('subst'):extr.append((g('var'),g('code')));return"%s"
-		return None
-	line=reg_act.sub(repl,line)or line
-	parm=[]
-	dvars=[]
-	app=parm.append
-	for(var,meth)in extr:
-		if var=='SRC':
-			if meth:app('tsk.inputs%s'%meth)
-			else:app('" ".join([a.path_from(bld.bldnode) for a in tsk.inputs])')
-		elif var=='TGT':
-			if meth:app('tsk.outputs%s'%meth)
-			else:app('" ".join([a.path_from(bld.bldnode) for a in tsk.outputs])')
-		elif meth:
-			if meth.startswith(':'):
-				m=meth[1:]
-				if m=='SRC':
-					m='[a.path_from(bld.bldnode) for a in tsk.inputs]'
-				elif m=='TGT':
-					m='[a.path_from(bld.bldnode) for a in tsk.outputs]'
-				elif m[:3]not in('tsk','gen','bld'):
-					dvars.extend([var,meth[1:]])
-					m='%r'%m
-				app('" ".join(tsk.colon(%r, %s))'%(var,m))
-			else:
-				app('%s%s'%(var,meth))
-		else:
-			if not var in dvars:dvars.append(var)
-			app("p('%s')"%var)
-	if parm:parm="%% (%s) "%(',\n\t\t'.join(parm))
-	else:parm=''
-	c=COMPILE_TEMPLATE_SHELL%(line,parm)
-	Logs.debug('action: %s'%c)
-	return(funex(c),dvars)
-def compile_fun_noshell(line):
-	extr=[]
-	def repl(match):
-		g=match.group
-		if g('dollar'):return"$"
-		elif g('subst'):extr.append((g('var'),g('code')));return"<<|@|>>"
-		return None
-	line2=reg_act.sub(repl,line)
-	params=line2.split('<<|@|>>')
-	assert(extr)
-	buf=[]
-	dvars=[]
-	app=buf.append
-	for x in range(len(extr)):
-		params[x]=params[x].strip()
-		if params[x]:
-			app("lst.extend(%r)"%params[x].split())
-		(var,meth)=extr[x]
-		if var=='SRC':
-			if meth:app('lst.append(tsk.inputs%s)'%meth)
-			else:app("lst.extend([a.path_from(bld.bldnode) for a in tsk.inputs])")
-		elif var=='TGT':
-			if meth:app('lst.append(tsk.outputs%s)'%meth)
-			else:app("lst.extend([a.path_from(bld.bldnode) for a in tsk.outputs])")
-		elif meth:
-			if meth.startswith(':'):
-				m=meth[1:]
-				if m=='SRC':
-					m='[a.path_from(bld.bldnode) for a in tsk.inputs]'
-				elif m=='TGT':
-					m='[a.path_from(bld.bldnode) for a in tsk.outputs]'
-				elif m[:3]not in('tsk','gen','bld'):
-					dvars.extend([var,m])
-					m='%r'%m
-				app('lst.extend(tsk.colon(%r, %s))'%(var,m))
-			else:
-				app('lst.extend(gen.to_list(%s%s))'%(var,meth))
-		else:
-			app('lst.extend(to_list(env[%r]))'%var)
-			if not var in dvars:dvars.append(var)
-	if extr:
-		if params[-1]:
-			app("lst.extend(%r)"%params[-1].split())
-	fun=COMPILE_TEMPLATE_NOSHELL%"\n\t".join(buf)
-	Logs.debug('action: %s'%fun)
-	return(funex(fun),dvars)
-def compile_fun(line,shell=False):
-	if line.find('<')>0 or line.find('>')>0 or line.find('&&')>0:
-		shell=True
-	if shell:
-		return compile_fun_shell(line)
-	else:
-		return compile_fun_noshell(line)
-def task_factory(name,func=None,vars=None,color='GREEN',ext_in=[],ext_out=[],before=[],after=[],shell=False,scan=None):
-	params={'vars':vars or[],'color':color,'name':name,'ext_in':Utils.to_list(ext_in),'ext_out':Utils.to_list(ext_out),'before':Utils.to_list(before),'after':Utils.to_list(after),'shell':shell,'scan':scan,}
-	if isinstance(func,str):
-		params['run_str']=func
-	else:
-		params['run']=func
-	cls=type(Task)(name,(Task,),params)
-	global classes
-	classes[name]=cls
-	return cls
-def always_run(cls):
-	old=cls.runnable_status
-	def always(self):
-		ret=old(self)
-		if ret==SKIP_ME:
-			ret=RUN_ME
-		return ret
-	cls.runnable_status=always
-	return cls
-def update_outputs(cls):
-	old_post_run=cls.post_run
-	def post_run(self):
-		old_post_run(self)
-		for node in self.outputs:
-			node.sig=Utils.h_file(node.abspath())
-			self.generator.bld.task_sigs[node.abspath()]=self.uid()
-	cls.post_run=post_run
-	old_runnable_status=cls.runnable_status
-	def runnable_status(self):
-		status=old_runnable_status(self)
-		if status!=RUN_ME:
-			return status
-		try:
-			bld=self.generator.bld
-			prev_sig=bld.task_sigs[self.uid()]
-			if prev_sig==self.signature():
-				for x in self.outputs:
-					if not x.sig or bld.task_sigs[x.abspath()]!=self.uid():
-						return RUN_ME
-				return SKIP_ME
-		except KeyError:
-			pass
-		except IndexError:
-			pass
-		except AttributeError:
-			pass
-		return RUN_ME
-	cls.runnable_status=runnable_status
-	return cls
diff --git a/waflib/TaskGen.py b/waflib/TaskGen.py
deleted file mode 100644
index ffa8248..0000000
--- a/waflib/TaskGen.py
+++ /dev/null
@@ -1,341 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import sys
-if sys.hexversion < 0x020400f0: from sets import Set as set
-import copy,re
-from waflib import Task,Utils,Logs,Errors,ConfigSet
-feats=Utils.defaultdict(set)
-class task_gen(object):
-	mappings={}
-	prec=Utils.defaultdict(list)
-	def __init__(self,*k,**kw):
-		self.source=''
-		self.target=''
-		self.meths=[]
-		self.prec=Utils.defaultdict(list)
-		self.mappings={}
-		self.features=[]
-		self.tasks=[]
-		if not'bld'in kw:
-			self.env=ConfigSet.ConfigSet()
-			self.idx=0
-			self.path=None
-		else:
-			self.bld=kw['bld']
-			self.env=self.bld.env.derive()
-			self.path=self.bld.path
-			try:
-				self.idx=self.bld.idx[id(self.path)]=self.bld.idx.get(id(self.path),0)+1
-			except AttributeError:
-				self.bld.idx={}
-				self.idx=self.bld.idx[id(self.path)]=1
-		for key,val in kw.items():
-			setattr(self,key,val)
-	def __str__(self):
-		return"<task_gen %r declared in %s>"%(self.name,self.path.abspath())
-	def __repr__(self):
-		lst=[]
-		for x in self.__dict__.keys():
-			if x not in['env','bld','compiled_tasks','tasks']:
-				lst.append("%s=%s"%(x,repr(getattr(self,x))))
-		return"bld(%s) in %s"%(", ".join(lst),self.path.abspath())
-	def get_name(self):
-		try:
-			return self._name
-		except AttributeError:
-			if isinstance(self.target,list):
-				lst=[str(x)for x in self.target]
-				name=self._name=','.join(lst)
-			else:
-				name=self._name=str(self.target)
-			return name
-	def set_name(self,name):
-		self._name=name
-	name=property(get_name,set_name)
-	def to_list(self,val):
-		if isinstance(val,str):return val.split()
-		else:return val
-	def post(self):
-		if getattr(self,'posted',None):
-			return False
-		self.posted=True
-		keys=set(self.meths)
-		self.features=Utils.to_list(self.features)
-		for x in self.features+['*']:
-			st=feats[x]
-			if not st:
-				if not x in Task.classes:
-					Logs.warn('feature %r does not exist - bind at least one method to it'%x)
-			keys.update(list(st))
-		prec={}
-		prec_tbl=self.prec or task_gen.prec
-		for x in prec_tbl:
-			if x in keys:
-				prec[x]=prec_tbl[x]
-		tmp=[]
-		for a in keys:
-			for x in prec.values():
-				if a in x:break
-			else:
-				tmp.append(a)
-		out=[]
-		while tmp:
-			e=tmp.pop()
-			if e in keys:out.append(e)
-			try:
-				nlst=prec[e]
-			except KeyError:
-				pass
-			else:
-				del prec[e]
-				for x in nlst:
-					for y in prec:
-						if x in prec[y]:
-							break
-					else:
-						tmp.append(x)
-		if prec:
-			raise Errors.WafError('Cycle detected in the method execution %r'%prec)
-		out.reverse()
-		self.meths=out
-		Logs.debug('task_gen: posting %s %d'%(self,id(self)))
-		for x in out:
-			try:
-				v=getattr(self,x)
-			except AttributeError:
-				raise Errors.WafError('%r is not a valid task generator method'%x)
-			Logs.debug('task_gen: -> %s (%d)'%(x,id(self)))
-			v()
-		Logs.debug('task_gen: posted %s'%self.name)
-		return True
-	def get_hook(self,node):
-		name=node.name
-		for k in self.mappings:
-			if name.endswith(k):
-				return self.mappings[k]
-		for k in task_gen.mappings:
-			if name.endswith(k):
-				return task_gen.mappings[k]
-		raise Errors.WafError("File %r has no mapping in %r (did you forget to load a waf tool?)"%(node,task_gen.mappings.keys()))
-	def create_task(self,name,src=None,tgt=None):
-		task=Task.classes[name](env=self.env.derive(),generator=self)
-		if src:
-			task.set_inputs(src)
-		if tgt:
-			task.set_outputs(tgt)
-		self.tasks.append(task)
-		return task
-	def clone(self,env):
-		newobj=self.bld()
-		for x in self.__dict__:
-			if x in['env','bld']:
-				continue
-			elif x in['path','features']:
-				setattr(newobj,x,getattr(self,x))
-			else:
-				setattr(newobj,x,copy.copy(getattr(self,x)))
-		newobj.posted=False
-		if isinstance(env,str):
-			newobj.env=self.bld.all_envs[env].derive()
-		else:
-			newobj.env=env.derive()
-		return newobj
-def declare_chain(name='',rule=None,reentrant=True,color='BLUE',ext_in=[],ext_out=[],before=[],after=[],decider=None,scan=None,install_path=None,shell=False):
-	ext_in=Utils.to_list(ext_in)
-	ext_out=Utils.to_list(ext_out)
-	if not name:
-		name=rule
-	cls=Task.task_factory(name,rule,color=color,ext_in=ext_in,ext_out=ext_out,before=before,after=after,scan=scan,shell=shell)
-	def x_file(self,node):
-		ext=decider and decider(self,node)or cls.ext_out
-		if ext_in:
-			_ext_in=ext_in[0]
-		out_source=[node.change_ext(x,ext_in=_ext_in)for x in ext]
-		if reentrant:
-			for i in range(reentrant):
-				self.source.append(out_source[i])
-		tsk=self.create_task(name,node,out_source)
-		if install_path:
-			self.bld.install_files(install_path,out_source)
-		return tsk
-	for x in cls.ext_in:
-		task_gen.mappings[x]=x_file
-	return x_file
-def taskgen_method(func):
-	setattr(task_gen,func.__name__,func)
-	return func
-def feature(*k):
-	def deco(func):
-		setattr(task_gen,func.__name__,func)
-		for name in k:
-			feats[name].update([func.__name__])
-		return func
-	return deco
-def before_method(*k):
-	def deco(func):
-		setattr(task_gen,func.__name__,func)
-		for fun_name in k:
-			if not func.__name__ in task_gen.prec[fun_name]:
-				task_gen.prec[fun_name].append(func.__name__)
-		return func
-	return deco
-before=before_method
-def after_method(*k):
-	def deco(func):
-		setattr(task_gen,func.__name__,func)
-		for fun_name in k:
-			if not fun_name in task_gen.prec[func.__name__]:
-				task_gen.prec[func.__name__].append(fun_name)
-		return func
-	return deco
-after=after_method
-def extension(*k):
-	def deco(func):
-		setattr(task_gen,func.__name__,func)
-		for x in k:
-			task_gen.mappings[x]=func
-		return func
-	return deco
-def to_nodes(self,lst,path=None):
-	tmp=[]
-	path=path or self.path
-	find=path.find_resource
-	if isinstance(lst,self.path.__class__):
-		lst=[lst]
-	for x in Utils.to_list(lst):
-		if isinstance(x,str):
-			node=find(x)
-			if not node:
-				raise Errors.WafError("source not found: %r in %r"%(x,self))
-		else:
-			node=x
-		tmp.append(node)
-	return tmp
-def process_source(self):
-	self.source=self.to_nodes(getattr(self,'source',[]))
-	for node in self.source:
-		self.get_hook(node)(self,node)
-def process_rule(self):
-	if not getattr(self,'rule',None):
-		return
-	name=str(getattr(self,'name',None)or self.target or self.rule)
-	cls=Task.task_factory(name,self.rule,getattr(self,'vars',[]),shell=getattr(self,'shell',True),color=getattr(self,'color','BLUE'))
-	tsk=self.create_task(name)
-	if getattr(self,'target',None):
-		if isinstance(self.target,str):
-			self.target=self.target.split()
-		if not isinstance(self.target,list):
-			self.target=[self.target]
-		for x in self.target:
-			if isinstance(x,str):
-				tsk.outputs.append(self.path.find_or_declare(x))
-			else:
-				x.parent.mkdir()
-				tsk.outputs.append(x)
-		if getattr(self,'install_path',None):
-			self.bld.install_files(self.install_path,tsk.outputs)
-	if getattr(self,'source',None):
-		tsk.inputs=self.to_nodes(self.source)
-		self.source=[]
-	if getattr(self,'scan',None):
-		cls.scan=self.scan
-	elif getattr(self,'deps',None):
-		def scan(self):
-			nodes=[]
-			for x in self.generator.to_list(self.generator.deps):
-				node=self.generator.path.find_resource(x)
-				if not node:
-					self.generator.bld.fatal('Could not find %r (was it declared?)'%x)
-				nodes.append(node)
-			return[nodes,[]]
-		cls.scan=scan
-	if getattr(self,'cwd',None):
-		tsk.cwd=self.cwd
-	if getattr(self,'update_outputs',None)or getattr(self,'on_results',None):
-		Task.update_outputs(cls)
-	if getattr(self,'always',None):
-		Task.always_run(cls)
-	for x in['after','before','ext_in','ext_out']:
-		setattr(cls,x,getattr(self,x,[]))
-def sequence_order(self):
-	if self.meths and self.meths[-1]!='sequence_order':
-		self.meths.append('sequence_order')
-		return
-	if getattr(self,'seq_start',None):
-		return
-	if getattr(self.bld,'prev',None):
-		self.bld.prev.post()
-		for x in self.bld.prev.tasks:
-			for y in self.tasks:
-				y.set_run_after(x)
-	self.bld.prev=self
-re_m4=re.compile('@(\w+)@',re.M)
-class subst_pc(Task.Task):
-	def run(self):
-		code=self.inputs[0].read()
-		code=code.replace('%','%%')
-		lst=[]
-		def repl(match):
-			g=match.group
-			if g(1):
-				lst.append(g(1))
-				return"%%(%s)s"%g(1)
-			return''
-		code=re_m4.sub(repl,code)
-		try:
-			d=self.generator.dct
-		except AttributeError:
-			d={}
-			for x in lst:
-				tmp=getattr(self.generator,x,'')or self.env.get_flat(x)or self.env.get_flat(x.upper())
-				d[x]=str(tmp)
-		self.outputs[0].write(code%d)
-		self.generator.bld.raw_deps[self.uid()]=self.dep_vars=lst
-		try:delattr(self,'cache_sig')
-		except AttributeError:pass
-	def sig_vars(self):
-		bld=self.generator.bld
-		env=self.env
-		upd=self.m.update
-		vars=self.generator.bld.raw_deps.get(self.uid(),[])
-		act_sig=bld.hash_env_vars(env,vars)
-		upd(act_sig)
-		lst=[getattr(self.generator,x,'')for x in vars]
-		upd(Utils.h_list(lst))
-		return self.m.digest()
-def add_pcfile(self,node):
-	tsk=self.create_task('subst_pc',node,node.change_ext('.pc','.pc.in'))
-	self.bld.install_files(getattr(self,'install_path','${LIBDIR}/pkgconfig/'),tsk.outputs)
-class subst(subst_pc):
-	pass
-def process_subst(self):
-	src=self.to_nodes(getattr(self,'source',[]))
-	tgt=getattr(self,'target',[])
-	if isinstance(tgt,self.path.__class__):
-		tgt=[tgt]
-	tgt=[isinstance(x,self.path.__class__)and x or self.path.find_or_declare(x)for x in Utils.to_list(tgt)]
-	if len(src)!=len(tgt):
-		raise Errors.WafError('invalid source or target for %r'%self)
-	for x,y in zip(src,tgt):
-		if not(x and y):
-			raise Errors.WafError('invalid source or target for %r'%self)
-		tsk=self.create_task('subst',x,y)
-		for a in('after','before','ext_in','ext_out'):
-			val=getattr(self,a,None)
-			if val:
-				setattr(tsk,a,val)
-	inst_to=getattr(self,'install_path',None)
-	if inst_to:
-		self.bld.install_files(inst_to,tgt,chmod=getattr(self,'chmod',Utils.O644))
-	self.source=[]
-
-taskgen_method(to_nodes)
-feature('*')(process_source)
-feature('*')(process_rule)
-before_method('process_source')(process_rule)
-feature('seq')(sequence_order)
-extension('.pc.in')(add_pcfile)
-feature('subst')(process_subst)
-before_method('process_source','process_rule')(process_subst)
\ No newline at end of file
diff --git a/waflib/Tools/__init__.py b/waflib/Tools/__init__.py
deleted file mode 100644
index efeed79..0000000
--- a/waflib/Tools/__init__.py
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
diff --git a/waflib/Tools/ar.py b/waflib/Tools/ar.py
deleted file mode 100644
index fd0b7d5..0000000
--- a/waflib/Tools/ar.py
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-from waflib.Configure import conf
-def find_ar(conf):
-	conf.load('ar')
-def configure(conf):
-	conf.find_program('ar',var='AR')
-	conf.env.ARFLAGS='rcs'
-
-conf(find_ar)
\ No newline at end of file
diff --git a/waflib/Tools/asm.py b/waflib/Tools/asm.py
deleted file mode 100644
index e73c858..0000000
--- a/waflib/Tools/asm.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,sys
-from waflib import Task,Utils
-import waflib.Task
-from waflib.Tools.ccroot import link_task,stlink_task
-from waflib.TaskGen import extension,feature
-class asm(Task.Task):
-	color='BLUE'
-	run_str='${AS} ${ASFLAGS} ${CPPPATH_ST:INCPATHS} ${AS_SRC_F}${SRC} ${AS_TGT_F}${TGT}'
-def asm_hook(self,node):
-	return self.create_compiled_task('asm',node)
-class asmprogram(link_task):
-	run_str='${ASLINK} ${AS_TGT_F}${TGT} ${SRC}'
-	ext_out=['.bin']
-	inst_to='${BINDIR}'
-	chmod=Utils.O755
-class asmshlib(asmprogram):
-	inst_to='${LIBDIR}'
-class asmstlib(stlink_task):
-	pass
-
-extension('.s','.S','.asm','.ASM','.spp','.SPP')(asm_hook)
\ No newline at end of file
diff --git a/waflib/Tools/bison.py b/waflib/Tools/bison.py
deleted file mode 100644
index a354e3e..0000000
--- a/waflib/Tools/bison.py
+++ /dev/null
@@ -1,29 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-from waflib import Task
-from waflib.TaskGen import extension
-class bison(Task.Task):
-	color='BLUE'
-	run_str='${BISON} ${BISONFLAGS} ${SRC[0].abspath()} -o ${TGT[0].name}'
-	ext_out=['.h']
-def big_bison(self,node):
-	has_h='-d'in self.env['BISONFLAGS']
-	outs=[]
-	if node.name.endswith('.yc'):
-		outs.append(node.change_ext('.tab.cc'))
-		if has_h:
-			outs.append(node.change_ext('.tab.hh'))
-	else:
-		outs.append(node.change_ext('.tab.c'))
-		if has_h:
-			outs.append(node.change_ext('.tab.h'))
-	tsk=self.create_task('bison',node,outs)
-	tsk.cwd=node.parent.get_bld().abspath()
-	self.source.append(outs[0])
-def configure(conf):
-	conf.find_program('bison',var='BISON')
-	conf.env.BISONFLAGS=['-d']
-
-extension('.y','.yc','.yy')(big_bison)
\ No newline at end of file
diff --git a/waflib/Tools/c.py b/waflib/Tools/c.py
deleted file mode 100644
index 3c941de..0000000
--- a/waflib/Tools/c.py
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-from waflib import TaskGen,Task,Utils
-from waflib.Tools import c_preproc
-from waflib.Tools.ccroot import link_task,stlink_task
-def c_hook(self,node):
-	return self.create_compiled_task('c',node)
-class c(Task.Task):
-	run_str='${CC} ${ARCH_ST:ARCH} ${CFLAGS} ${CPPFLAGS} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${CC_SRC_F}${SRC} ${CC_TGT_F}${TGT}'
-	vars=['CCDEPS']
-	ext_in=['.h']
-	scan=c_preproc.scan
-Task.classes['cc']=cc=c
-class cprogram(link_task):
-	run_str='${LINK_CC} ${LINKFLAGS} ${CCLNK_SRC_F}${SRC} ${CCLNK_TGT_F}${TGT[0].abspath()} ${RPATH_ST:RPATH} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${FRAMEWORK_ST:FRAMEWORK} ${ARCH_ST:ARCH} ${STLIB_MARKER} ${STLIBPATH_ST:STLIBPATH} ${STLIB_ST:STLIB} ${SHLIB_MARKER} ${LIBPATH_ST:LIBPATH} ${LIB_ST:LIB}'
-	ext_out=['.bin']
-	vars=['LINKDEPS']
-	inst_to='${BINDIR}'
-	chmod=Utils.O755
-class cshlib(cprogram):
-	inst_to='${LIBDIR}'
-class cstlib(stlink_task):
-	pass
-
-TaskGen.extension('.c')(c_hook)
\ No newline at end of file
diff --git a/waflib/Tools/c_aliases.py b/waflib/Tools/c_aliases.py
deleted file mode 100644
index f21fb9e..0000000
--- a/waflib/Tools/c_aliases.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,sys,re
-from waflib import Utils,Build
-from waflib.Configure import conf
-def get_extensions(lst):
-	ret=[]
-	for x in Utils.to_list(lst):
-		try:
-			if not isinstance(x,str):
-				x=x.name
-			ret.append(x[x.rfind('.')+1:])
-		except:
-			pass
-	return ret
-def sniff_features(**kw):
-	exts=get_extensions(kw['source'])
-	type=kw['_type']
-	feats=[]
-	if'cxx'in exts or'cpp'in exts or'c++'in exts or'cc'in exts or'C'in exts:
-		feats.append('cxx')
-	if'c'in exts or'vala'in exts:
-		feats.append('c')
-	if'd'in exts:
-		feats.append('d')
-	if'java'in exts:
-		feats.append('java')
-	if'java'in exts:
-		return'java'
-	if type in['program','shlib','stlib']:
-		for x in feats:
-			if x in['cxx','d','c']:
-				feats.append(x+type)
-	return feats
-def set_features(kw,_type):
-	kw['_type']=_type
-	kw['features']=Utils.to_list(kw.get('features',[]))+Utils.to_list(sniff_features(**kw))
-def program(bld,*k,**kw):
-	set_features(kw,'program')
-	return bld(*k,**kw)
-def shlib(bld,*k,**kw):
-	set_features(kw,'shlib')
-	return bld(*k,**kw)
-def stlib(bld,*k,**kw):
-	set_features(kw,'stlib')
-	return bld(*k,**kw)
-def objects(bld,*k,**kw):
-	set_features(kw,'objects')
-	return bld(*k,**kw)
-
-conf(program)
-conf(shlib)
-conf(stlib)
-conf(objects)
\ No newline at end of file
diff --git a/waflib/Tools/c_config.py b/waflib/Tools/c_config.py
deleted file mode 100644
index db89518..0000000
--- a/waflib/Tools/c_config.py
+++ /dev/null
@@ -1,708 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import sys
-if sys.hexversion < 0x020400f0: from sets import Set as set
-import os,imp,sys,re,shlex,shutil
-from waflib import Build,Utils,Configure,Task,Options,Logs,TaskGen,Errors,ConfigSet,Runner
-from waflib.TaskGen import before_method,after_method,feature
-from waflib.Configure import conf
-WAF_CONFIG_H='config.h'
-DEFKEYS='define_key'
-INCKEYS='include_key'
-cfg_ver={'atleast-version':'>=','exact-version':'==','max-version':'<=',}
-SNIP_FUNCTION='''
-	int main() {
-	void *p;
-	p=(void*)(%s);
-	return 0;
-}
-'''
-SNIP_TYPE='''
-int main() {
-	if ((%(type_name)s *) 0) return 0;
-	if (sizeof (%(type_name)s)) return 0;
-}
-'''
-SNIP_CLASS='''
-int main() {
-	if (
-}
-'''
-SNIP_EMPTY_PROGRAM='''
-int main() {
-	return 0;
-}
-'''
-SNIP_FIELD='''
-int main() {
-	char *off;
-	off = (char*) &((%(type_name)s*)0)->%(field_name)s;
-	return (size_t) off < sizeof(%(type_name)s);
-}
-'''
-MACRO_TO_DESTOS={'__linux__':'linux','__GNU__':'gnu','__FreeBSD__':'freebsd','__NetBSD__':'netbsd','__OpenBSD__':'openbsd','__sun':'sunos','__hpux':'hpux','__sgi':'irix','_AIX':'aix','__CYGWIN__':'cygwin','__MSYS__':'msys','_UWIN':'uwin','_WIN64':'win32','_WIN32':'win32','__POWERPC__':'powerpc','__QNX__':'qnx'}
-MACRO_TO_DEST_CPU={'__x86_64__':'x86_64','__i386__':'x86','__ia64__':'ia','__mips__':'mips','__sparc__':'sparc','__alpha__':'alpha','__arm__':'arm','__hppa__':'hppa','__powerpc__':'powerpc',}
-def parse_flags(self,line,uselib,env=None):
-	assert(isinstance(line,str))
-	env=env or self.env
-	app=env.append_value
-	appu=env.append_unique
-	lex=shlex.shlex(line,posix=False)
-	lex.whitespace_split=True
-	lex.commenters=''
-	lst=list(lex)
-	while lst:
-		x=lst.pop(0)
-		st=x[:2]
-		ot=x[2:]
-		if st=='-I'or st=='/I':
-			if not ot:ot=lst.pop(0)
-			appu('INCLUDES_'+uselib,[ot])
-		elif st=='-include':
-			tmp=[x,lst.pop(0)]
-			app('CFLAGS',tmp)
-			app('CXXFLAGS',tmp)
-		elif st=='-D'or(self.env.CXX_NAME=='msvc'and st=='/D'):
-			if not ot:ot=lst.pop(0)
-			app('DEFINES_'+uselib,[ot])
-		elif st=='-l':
-			if not ot:ot=lst.pop(0)
-			appu('LIB_'+uselib,[ot])
-		elif st=='-L':
-			if not ot:ot=lst.pop(0)
-			appu('LIBPATH_'+uselib,[ot])
-		elif x=='-pthread'or x.startswith('+')or x.startswith('-std'):
-			app('CFLAGS_'+uselib,[x])
-			app('CXXFLAGS_'+uselib,[x])
-			app('LINKFLAGS_'+uselib,[x])
-		elif x=='-framework':
-			appu('FRAMEWORK_'+uselib,[lst.pop(0)])
-		elif x.startswith('-F'):
-			appu('FRAMEWORKPATH_'+uselib,[x[2:]])
-		elif x.startswith('-Wl'):
-			app('LINKFLAGS_'+uselib,[x])
-		elif x.startswith('-m')or x.startswith('-f')or x.startswith('-dynamic'):
-			app('CFLAGS_'+uselib,[x])
-			app('CXXFLAGS_'+uselib,[x])
-		elif x.startswith('-bundle'):
-			app('LINKFLAGS_'+uselib,[x])
-		elif x.startswith('-undefined'):
-			arg=lst.pop(0)
-			app('LINKFLAGS_'+uselib,[x,arg])
-		elif x.startswith('-arch')or x.startswith('-isysroot'):
-			tmp=[x,lst.pop(0)]
-			app('CFLAGS_'+uselib,tmp)
-			app('CXXFLAGS_'+uselib,tmp)
-			app('LINKFLAGS_'+uselib,tmp)
-		elif x.endswith('.a')or x.endswith('.so')or x.endswith('.dylib'):
-			appu('LINKFLAGS_'+uselib,[x])
-def ret_msg(self,f,kw):
-	if isinstance(f,str):
-		return f
-	return f(kw)
-def validate_cfg(self,kw):
-	if not'path'in kw:
-		if not self.env.PKGCONFIG:
-			self.find_program('pkg-config',var='PKGCONFIG')
-		kw['path']=self.env.PKGCONFIG
-	if'atleast_pkgconfig_version'in kw:
-		if not'msg'in kw:
-			kw['msg']='Checking for pkg-config version >= %r'%kw['atleast_pkgconfig_version']
-		return
-	if not'okmsg'in kw:
-		kw['okmsg']='yes'
-	if not'errmsg'in kw:
-		kw['errmsg']='not found'
-	if'modversion'in kw:
-		if not'msg'in kw:
-			kw['msg']='Checking for %r version'%kw['modversion']
-		return
-	for x in cfg_ver.keys():
-		y=x.replace('-','_')
-		if y in kw:
-			if not'package'in kw:
-				raise ValueError('%s requires a package'%x)
-			if not'msg'in kw:
-				kw['msg']='Checking for %r %s %s'%(kw['package'],cfg_ver[x],kw[y])
-			return
-	if not'msg'in kw:
-		kw['msg']='Checking for %r'%(kw['package']or kw['path'])
-def exec_cfg(self,kw):
-	if'atleast_pkgconfig_version'in kw:
-		cmd=[kw['path'],'--atleast-pkgconfig-version=%s'%kw['atleast_pkgconfig_version']]
-		self.cmd_and_log(cmd)
-		if not'okmsg'in kw:
-			kw['okmsg']='yes'
-		return
-	for x in cfg_ver:
-		y=x.replace('-','_')
-		if y in kw:
-			self.cmd_and_log([kw['path'],'--%s=%s'%(x,kw[y]),kw['package']])
-			if not'okmsg'in kw:
-				kw['okmsg']='yes'
-			self.define(self.have_define(kw.get('uselib_store',kw['package'])),1,0)
-			break
-	if'modversion'in kw:
-		version=self.cmd_and_log([kw['path'],'--modversion',kw['modversion']]).strip()
-		self.define('%s_VERSION'%Utils.quote_define_name(kw.get('uselib_store',kw['modversion'])),version)
-		return version
-	lst=[kw['path']]
-	defi=kw.get('define_variable',None)
-	if not defi:
-		defi=self.env.PKG_CONFIG_DEFINES or{}
-	for key,val in defi.items():
-		lst.append('--define-variable=%s=%s'%(key,val))
-	if kw['package']:
-		lst.extend(Utils.to_list(kw['package']))
-	if'variables'in kw:
-		env=kw.get('env',self.env)
-		uselib=kw.get('uselib_store',kw['package'].upper())
-		vars=Utils.to_list(kw['variables'])
-		for v in vars:
-			val=self.cmd_and_log(lst+['--variable='+v]).strip()
-			var='%s_%s'%(uselib,v)
-			env[var]=val
-		if not'okmsg'in kw:
-			kw['okmsg']='yes'
-		return
-	if'args'in kw:
-		lst+=Utils.to_list(kw['args'])
-	ret=self.cmd_and_log(lst)
-	if not'okmsg'in kw:
-		kw['okmsg']='yes'
-	self.define(self.have_define(kw.get('uselib_store',kw['package'])),1,0)
-	self.parse_flags(ret,kw.get('uselib_store',kw['package'].upper()),kw.get('env',self.env))
-	return ret
-def check_cfg(self,*k,**kw):
-	if k:
-		lst=k[0].split()
-		kw['package']=lst[0]
-		kw['args']=' '.join(lst[1:])
-	self.validate_cfg(kw)
-	if'msg'in kw:
-		self.start_msg(kw['msg'])
-	ret=None
-	try:
-		ret=self.exec_cfg(kw)
-	except self.errors.WafError ,e:
-		if'errmsg'in kw:
-			self.end_msg(kw['errmsg'],'YELLOW')
-		if Logs.verbose>1:
-			raise
-		else:
-			self.fatal('The configuration failed')
-	else:
-		kw['success']=ret
-		if'okmsg'in kw:
-			self.end_msg(self.ret_msg(kw['okmsg'],kw))
-	return ret
-def validate_c(self,kw):
-	if not'env'in kw:
-		kw['env']=self.env.derive()
-	env=kw['env']
-	if not'compiler'in kw and not'features'in kw:
-		kw['compiler']='c'
-		if env['CXX_NAME']and Task.classes.get('cxx',None):
-			kw['compiler']='cxx'
-			if not self.env['CXX']:
-				self.fatal('a c++ compiler is required')
-		else:
-			if not self.env['CC']:
-				self.fatal('a c compiler is required')
-	if not'compile_mode'in kw:
-		kw['compile_mode']='c'
-		if'cxx'in Utils.to_list(kw.get('features',[]))or kw.get('compiler','')=='cxx':
-			kw['compile_mode']='cxx'
-	if not'type'in kw:
-		kw['type']='cprogram'
-	if not'features'in kw:
-		kw['features']=[kw['compile_mode'],kw['type']]
-	else:
-		kw['features']=Utils.to_list(kw['features'])
-	if not'compile_filename'in kw:
-		kw['compile_filename']='test.c'+((kw['compile_mode']=='cxx')and'pp'or'')
-	def to_header(dct):
-		if'header_name'in dct:
-			dct=Utils.to_list(dct['header_name'])
-			return''.join(['#include <%s>\n'%x for x in dct])
-		return''
-	if'framework_name'in kw:
-		fwkname=kw['framework_name']
-		if not'uselib_store'in kw:
-			kw['uselib_store']=fwkname.upper()
-		if not kw.get('no_header',False):
-			if not'header_name'in kw:
-				kw['header_name']=[]
-			fwk='%s/%s.h'%(fwkname,fwkname)
-			if kw.get('remove_dot_h',None):
-				fwk=fwk[:-2]
-			kw['header_name']=Utils.to_list(kw['header_name'])+[fwk]
-		kw['msg']='Checking for framework %s'%fwkname
-		kw['framework']=fwkname
-	if'function_name'in kw:
-		fu=kw['function_name']
-		if not'msg'in kw:
-			kw['msg']='Checking for function %s'%fu
-		kw['code']=to_header(kw)+SNIP_FUNCTION%fu
-		if not'uselib_store'in kw:
-			kw['uselib_store']=fu.upper()
-		if not'define_name'in kw:
-			kw['define_name']=self.have_define(fu)
-	elif'type_name'in kw:
-		tu=kw['type_name']
-		if not'header_name'in kw:
-			kw['header_name']='stdint.h'
-		if'field_name'in kw:
-			field=kw['field_name']
-			kw['code']=to_header(kw)+SNIP_FIELD%{'type_name':tu,'field_name':field}
-			if not'msg'in kw:
-				kw['msg']='Checking for field %s in %s'%(field,tu)
-			if not'define_name'in kw:
-				kw['define_name']=self.have_define((tu+'_'+field).upper())
-		else:
-			kw['code']=to_header(kw)+SNIP_TYPE%{'type_name':tu}
-			if not'msg'in kw:
-				kw['msg']='Checking for type %s'%tu
-			if not'define_name'in kw:
-				kw['define_name']=self.have_define(tu.upper())
-	elif'header_name'in kw:
-		if not'msg'in kw:
-			kw['msg']='Checking for header %s'%kw['header_name']
-		l=Utils.to_list(kw['header_name'])
-		assert len(l)>0,'list of headers in header_name is empty'
-		kw['code']=to_header(kw)+SNIP_EMPTY_PROGRAM
-		if not'uselib_store'in kw:
-			kw['uselib_store']=l[0].upper()
-		if not'define_name'in kw:
-			kw['define_name']=self.have_define(l[0])
-	if'lib'in kw:
-		if not'msg'in kw:
-			kw['msg']='Checking for library %s'%kw['lib']
-		if not'uselib_store'in kw:
-			kw['uselib_store']=kw['lib'].upper()
-	if'stlib'in kw:
-		if not'msg'in kw:
-			kw['msg']='Checking for static library %s'%kw['stlib']
-		if not'uselib_store'in kw:
-			kw['uselib_store']=kw['stlib'].upper()
-	if'fragment'in kw:
-		kw['code']=kw['fragment']
-		if not'msg'in kw:
-			kw['msg']='Checking for code snippet'
-		if not'errmsg'in kw:
-			kw['errmsg']='no'
-	for(flagsname,flagstype)in[('cxxflags','compiler'),('cflags','compiler'),('linkflags','linker')]:
-		if flagsname in kw:
-			if not'msg'in kw:
-				kw['msg']='Checking for %s flags %s'%(flagstype,kw[flagsname])
-			if not'errmsg'in kw:
-				kw['errmsg']='no'
-	if not'execute'in kw:
-		kw['execute']=False
-	if kw['execute']:
-		kw['features'].append('test_exec')
-	if not'errmsg'in kw:
-		kw['errmsg']='not found'
-	if not'okmsg'in kw:
-		kw['okmsg']='yes'
-	if not'code'in kw:
-		kw['code']=SNIP_EMPTY_PROGRAM
-	if self.env[INCKEYS]:
-		kw['code']='\n'.join(['#include <%s>'%x for x in self.env[INCKEYS]])+'\n'+kw['code']
-	if not kw.get('success'):kw['success']=None
-	if'define_name'in kw:
-		self.undefine(kw['define_name'])
-	assert'msg'in kw,'invalid parameters, read http://freehackers.org/~tnagy/wafbook/single.html#config_helpers_c'
-def post_check(self,*k,**kw):
-	is_success=0
-	if kw['execute']:
-		if kw['success']is not None:
-			if kw.get('define_ret',False):
-				is_success=kw['success']
-			else:
-				is_success=(kw['success']==0)
-	else:
-		is_success=(kw['success']==0)
-	if'define_name'in kw:
-		if'header_name'in kw or'function_name'in kw or'type_name'in kw or'fragment'in kw:
-			nm=kw['define_name']
-			if kw['execute']and kw.get('define_ret',None)and isinstance(is_success,str):
-				self.define(kw['define_name'],is_success,quote=kw.get('quote',1))
-			else:
-				self.define_cond(kw['define_name'],is_success)
-		else:
-			self.define_cond(kw['define_name'],is_success)
-	if'header_name'in kw:
-		if kw.get('auto_add_header_name',False):
-			self.env.append_value(INCKEYS,Utils.to_list(kw['header_name']))
-	if is_success and'uselib_store'in kw:
-		from waflib.Tools import ccroot
-		_vars=set([])
-		for x in kw['features']:
-			if x in ccroot.USELIB_VARS:
-				_vars|=ccroot.USELIB_VARS[x]
-		for k in _vars:
-			lk=k.lower()
-			if k=='INCLUDES':lk='includes'
-			if k=='DEFINES':lk='defines'
-			if lk in kw:
-				val=kw[lk]
-				if isinstance(val,str):
-					val=val.rstrip(os.path.sep)
-				self.env.append_unique(k+'_'+kw['uselib_store'],val)
-	return is_success
-def check(self,*k,**kw):
-	self.validate_c(kw)
-	self.start_msg(kw['msg'])
-	ret=None
-	try:
-		ret=self.run_c_code(*k,**kw)
-	except self.errors.ConfigurationError ,e:
-		self.end_msg(kw['errmsg'],'YELLOW')
-		if Logs.verbose>1:
-			raise
-		else:
-			self.fatal('The configuration failed')
-	else:
-		kw['success']=ret
-		self.end_msg(self.ret_msg(kw['okmsg'],kw))
-	ret=self.post_check(*k,**kw)
-	if not ret:
-		self.fatal('The configuration failed %r'%ret)
-	return ret
-class test_exec(Task.Task):
-	color='PINK'
-	def run(self):
-		if getattr(self.generator,'rpath',None):
-			if getattr(self.generator,'define_ret',False):
-				self.generator.bld.retval=self.generator.bld.cmd_and_log([self.inputs[0].abspath()])
-			else:
-				self.generator.bld.retval=self.generator.bld.exec_command([self.inputs[0].abspath()])
-		else:
-			env=self.env.env or{}
-			env.update(dict(os.environ))
-			for var in('LD_LIBRARY_PATH','DYLD_LIBRARY_PATH','PATH'):
-				env[var]=self.inputs[0].parent.abspath()+os.path.pathsep+env.get(var,'')
-			if getattr(self.generator,'define_ret',False):
-				self.generator.bld.retval=self.generator.bld.cmd_and_log([self.inputs[0].abspath()],env=env)
-			else:
-				self.generator.bld.retval=self.generator.bld.exec_command([self.inputs[0].abspath()],env=env)
-def test_exec_fun(self):
-	self.create_task('test_exec',self.link_task.outputs[0])
-CACHE_RESULTS=1
-COMPILE_ERRORS=2
-def run_c_code(self,*k,**kw):
-	lst=[str(v)for(p,v)in kw.items()if p!='env']
-	h=Utils.h_list(lst)
-	dir=self.bldnode.abspath()+os.sep+(not Utils.is_win32 and'.'or'')+'conf_check_'+Utils.to_hex(h)
-	try:
-		os.makedirs(dir)
-	except:
-		pass
-	try:
-		os.stat(dir)
-	except:
-		self.fatal('cannot use the configuration test folder %r'%dir)
-	cachemode=getattr(Options.options,'confcache',None)
-	if cachemode==CACHE_RESULTS:
-		try:
-			proj=ConfigSet.ConfigSet(os.path.join(dir,'cache_run_c_code'))
-			ret=proj['cache_run_c_code']
-		except:
-			pass
-		else:
-			if isinstance(ret,str)and ret.startswith('Test does not build'):
-				self.fatal(ret)
-			return ret
-	bdir=os.path.join(dir,'testbuild')
-	if not os.path.exists(bdir):
-		os.makedirs(bdir)
-	self.test_bld=bld=Build.BuildContext(top_dir=dir,out_dir=bdir)
-	bld.init_dirs()
-	bld.progress_bar=0
-	bld.targets='*'
-	if kw['compile_filename']:
-		node=bld.srcnode.make_node(kw['compile_filename'])
-		node.write(kw['code'])
-	bld.logger=self.logger
-	bld.all_envs.update(self.all_envs)
-	bld.env=kw['env']
-	o=bld(features=kw['features'],source=kw['compile_filename'],target='testprog')
-	for k,v in kw.items():
-		setattr(o,k,v)
-	self.to_log("==>\n%s\n<=="%kw['code'])
-	bld.targets='*'
-	ret=-1
-	try:
-		try:
-			bld.compile()
-		except Errors.WafError:
-			ret='Test does not build: %s'%Utils.ex_stack()
-			self.fatal(ret)
-		else:
-			ret=getattr(bld,'retval',0)
-	finally:
-		proj=ConfigSet.ConfigSet()
-		proj['cache_run_c_code']=ret
-		proj.store(os.path.join(dir,'cache_run_c_code'))
-	return ret
-def check_cxx(self,*k,**kw):
-	kw['compiler']='cxx'
-	return self.check(*k,**kw)
-def check_cc(self,*k,**kw):
-	kw['compiler']='c'
-	return self.check(*k,**kw)
-def define(self,key,val,quote=True):
-	assert key and isinstance(key,str)
-	if isinstance(val,int)or isinstance(val,float):
-		s='%s=%s'
-	else:
-		s=quote and'%s="%s"'or'%s=%s'
-	app=s%(key,str(val))
-	ban=key+'='
-	lst=self.env['DEFINES']
-	for x in lst:
-		if x.startswith(ban):
-			lst[lst.index(x)]=app
-			break
-	else:
-		self.env.append_value('DEFINES',app)
-	self.env.append_unique(DEFKEYS,key)
-def undefine(self,key):
-	assert key and isinstance(key,str)
-	ban=key+'='
-	lst=[x for x in self.env['DEFINES']if not x.startswith(ban)]
-	self.env['DEFINES']=lst
-	self.env.append_unique(DEFKEYS,key)
-def define_cond(self,key,val):
-	assert key and isinstance(key,str)
-	if val:
-		self.define(key,1)
-	else:
-		self.undefine(key)
-def is_defined(self,key):
-	assert key and isinstance(key,str)
-	ban=key+'='
-	for x in self.env['DEFINES']:
-		if x.startswith(ban):
-			return True
-	return False
-def get_define(self,key):
-	assert key and isinstance(key,str)
-	ban=key+'='
-	for x in self.env['DEFINES']:
-		if x.startswith(ban):
-			return x[len(ban):]
-	return None
-def have_define(self,key):
-	return self.__dict__.get('HAVE_PAT','HAVE_%s')%Utils.quote_define_name(key)
-def write_config_header(self,configfile='',guard='',top=False,env=None,defines=True,headers=False,remove=True):
-	if not configfile:configfile=WAF_CONFIG_H
-	waf_guard=guard or'_%s_WAF'%Utils.quote_define_name(configfile)
-	node=top and self.bldnode or self.path.get_bld()
-	node=node.make_node(configfile)
-	node.parent.mkdir()
-	lst=['/* WARNING! All changes made to this file will be lost! */\n']
-	lst.append('#ifndef %s\n#define %s\n'%(waf_guard,waf_guard))
-	lst.append(self.get_config_header(defines,headers))
-	lst.append('\n#endif /* %s */\n'%waf_guard)
-	node.write('\n'.join(lst))
-	env=env or self.env
-	env.append_unique(Build.CFG_FILES,[node.abspath()])
-	if remove:
-		for key in self.env[DEFKEYS]:
-			self.undefine(key)
-		self.env[DEFKEYS]=[]
-def get_config_header(self,defines=True,headers=False):
-	lst=[]
-	if headers:
-		for x in self.env[INCKEYS]:
-			lst.append('#include <%s>'%x)
-	if defines:
-		for x in self.env[DEFKEYS]:
-			if self.is_defined(x):
-				val=self.get_define(x)
-				lst.append('#define %s %s'%(x,val))
-			else:
-				lst.append('/* #undef %s */'%x)
-	return"\n".join(lst)
-def cc_add_flags(conf):
-	conf.add_os_flags('CPPFLAGS','CFLAGS')
-	conf.add_os_flags('CFLAGS')
-def cxx_add_flags(conf):
-	conf.add_os_flags('CPPFLAGS','CXXFLAGS')
-	conf.add_os_flags('CXXFLAGS')
-def link_add_flags(conf):
-	conf.add_os_flags('LINKFLAGS')
-	conf.add_os_flags('LDFLAGS','LINKFLAGS')
-def cc_load_tools(conf):
-	if not conf.env.DEST_OS:
-		conf.env.DEST_OS=Utils.unversioned_sys_platform()
-	conf.load('c')
-def cxx_load_tools(conf):
-	if not conf.env.DEST_OS:
-		conf.env.DEST_OS=Utils.unversioned_sys_platform()
-	conf.load('cxx')
-def get_cc_version(conf,cc,gcc=False,icc=False):
-	cmd=cc+['-dM','-E','-']
-	try:
-		p=Utils.subprocess.Popen(cmd,stdin=Utils.subprocess.PIPE,stdout=Utils.subprocess.PIPE,stderr=Utils.subprocess.PIPE)
-		p.stdin.write('\n')
-		out=p.communicate()[0]
-	except:
-		conf.fatal('could not determine the compiler version %r'%cmd)
-	if not isinstance(out,str):
-		out=out.decode(sys.stdout.encoding)
-	if gcc:
-		if out.find('__INTEL_COMPILER')>=0:
-			conf.fatal('The intel compiler pretends to be gcc')
-		if out.find('__GNUC__')<0:
-			conf.fatal('Could not determine the compiler type')
-	if icc and out.find('__INTEL_COMPILER')<0:
-		conf.fatal('Not icc/icpc')
-	k={}
-	if icc or gcc:
-		out=out.split('\n')
-		import shlex
-		for line in out:
-			lst=shlex.split(line)
-			if len(lst)>2:
-				key=lst[1]
-				val=lst[2]
-				k[key]=val
-		def isD(var):
-			return var in k
-		def isT(var):
-			return var in k and k[var]!='0'
-		if not conf.env.DEST_OS:
-			conf.env.DEST_OS=''
-		for i in MACRO_TO_DESTOS:
-			if isD(i):
-				conf.env.DEST_OS=MACRO_TO_DESTOS[i]
-				break
-		else:
-			if isD('__APPLE__')and isD('__MACH__'):
-				conf.env.DEST_OS='darwin'
-			elif isD('__unix__'):
-				conf.env.DEST_OS='generic'
-		if isD('__ELF__'):
-			conf.env.DEST_BINFMT='elf'
-		elif isD('__WINNT__')or isD('__CYGWIN__'):
-			conf.env.DEST_BINFMT='pe'
-			conf.env.LIBDIR=conf.env['PREFIX']+'/bin'
-		elif isD('__APPLE__'):
-			conf.env.DEST_BINFMT='mac-o'
-		if not conf.env.DEST_BINFMT:
-			conf.env.DEST_BINFMT=Utils.destos_to_binfmt(conf.env.DEST_OS)
-		for i in MACRO_TO_DEST_CPU:
-			if isD(i):
-				conf.env.DEST_CPU=MACRO_TO_DEST_CPU[i]
-				break
-		Logs.debug('ccroot: dest platform: '+' '.join([conf.env[x]or'?'for x in('DEST_OS','DEST_BINFMT','DEST_CPU')]))
-		if icc:
-			ver=k['__INTEL_COMPILER']
-			conf.env['CC_VERSION']=(ver[:-2],ver[-2],ver[-1])
-		else:
-			conf.env['CC_VERSION']=(k['__GNUC__'],k['__GNUC_MINOR__'],k['__GNUC_PATCHLEVEL__'])
-	return k
-def get_xlc_version(conf,cc):
-	version_re=re.compile(r"IBM XL C/C\+\+.*, V(?P<major>\d*)\.(?P<minor>\d*)",re.I).search
-	cmd=cc+['-qversion']
-	try:
-		out,err=conf.cmd_and_log(cmd,output=0)
-	except Errors.WafError:
-		conf.fatal('Could not find xlc %r'%cmd)
-	if out:match=version_re(out)
-	else:match=version_re(err)
-	if not match:
-		conf.fatal('Could not determine the XLC version.')
-	k=match.groupdict()
-	conf.env['CC_VERSION']=(k['major'],k['minor'])
-def add_as_needed(self):
-	if self.env.DEST_BINFMT=='elf'and'gcc'in(self.env.CXX_NAME,self.env.CC_NAME):
-		self.env.append_unique('LINKFLAGS','--as-needed')
-class cfgtask(Task.TaskBase):
-	def display(self):
-		return''
-	def runnable_status(self):
-		return Task.RUN_ME
-	def run(self):
-		conf=self.conf
-		bld=Build.BuildContext(top_dir=conf.srcnode.abspath(),out_dir=conf.bldnode.abspath())
-		bld.env=conf.env
-		bld.init_dirs()
-		bld.in_msg=1
-		bld.logger=self.logger
-		try:
-			bld.check(**self.args)
-		except:
-			return 1
-def multicheck(self,*k,**kw):
-	self.start_msg(kw.get('msg','Executing %d configuration tests'%len(k)))
-	class par(object):
-		def __init__(self):
-			self.keep=False
-			self.cache_global=Options.cache_global
-			self.nocache=Options.options.nocache
-			self.returned_tasks=[]
-		def total(self):
-			return len(tasks)
-		def to_log(self,*k,**kw):
-			return
-	bld=par()
-	tasks=[]
-	for dct in k:
-		x=cfgtask(bld=bld)
-		tasks.append(x)
-		x.args=dct
-		x.bld=bld
-		x.conf=self
-		x.args=dct
-		x.logger=Logs.make_mem_logger(str(id(x)),self.logger)
-	def it():
-		yield tasks
-		while 1:
-			yield[]
-	p=Runner.Parallel(bld,Options.options.jobs)
-	p.biter=it()
-	p.start()
-	for x in tasks:
-		x.logger.memhandler.flush()
-	for x in tasks:
-		if x.hasrun!=Task.SUCCESS:
-			self.end_msg(kw.get('errmsg','no'),color='YELLOW')
-			self.fatal(kw.get('fatalmsg',None)or'One of the tests has failed, see the config.log for more information')
-	self.end_msg('ok')
-
-conf(parse_flags)
-conf(ret_msg)
-conf(validate_cfg)
-conf(exec_cfg)
-conf(check_cfg)
-conf(validate_c)
-conf(post_check)
-conf(check)
-feature('test_exec')(test_exec_fun)
-after_method('apply_link')(test_exec_fun)
-conf(run_c_code)
-conf(check_cxx)
-conf(check_cc)
-conf(define)
-conf(undefine)
-conf(define_cond)
-conf(is_defined)
-conf(get_define)
-conf(have_define)
-conf(write_config_header)
-conf(get_config_header)
-conf(cc_add_flags)
-conf(cxx_add_flags)
-conf(link_add_flags)
-conf(cc_load_tools)
-conf(cxx_load_tools)
-conf(get_cc_version)
-conf(get_xlc_version)
-conf(add_as_needed)
-conf(multicheck)
\ No newline at end of file
diff --git a/waflib/Tools/c_osx.py b/waflib/Tools/c_osx.py
deleted file mode 100644
index 9299174..0000000
--- a/waflib/Tools/c_osx.py
+++ /dev/null
@@ -1,121 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,shutil,sys,platform
-from waflib import TaskGen,Task,Build,Options,Utils,Errors
-from waflib.TaskGen import taskgen_method,feature,after_method,before_method
-app_info='''
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
-<plist version="0.9">
-<dict>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleGetInfoString</key>
-	<string>Created by Waf</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>NOTE</key>
-	<string>THIS IS A GENERATED FILE, DO NOT MODIFY</string>
-	<key>CFBundleExecutable</key>
-	<string>%s</string>
-</dict>
-</plist>
-'''
-def set_macosx_deployment_target(self):
-	if self.env['MACOSX_DEPLOYMENT_TARGET']:
-		os.environ['MACOSX_DEPLOYMENT_TARGET']=self.env['MACOSX_DEPLOYMENT_TARGET']
-	elif'MACOSX_DEPLOYMENT_TARGET'not in os.environ:
-		if sys.platform=='darwin':
-			os.environ['MACOSX_DEPLOYMENT_TARGET']='.'.join(platform.mac_ver()[0].split('.')[:2])
-def create_bundle_dirs(self,name,out):
-	bld=self.bld
-	dir=out.parent.find_or_declare(name)
-	dir.mkdir()
-	macos=dir.find_or_declare(['Contents','MacOS'])
-	macos.mkdir()
-	return dir
-def bundle_name_for_output(out):
-	name=out.name
-	k=name.rfind('.')
-	if k>=0:
-		name=name[:k]+'.app'
-	else:
-		name=name+'.app'
-	return name
-def create_task_macapp(self):
-	if self.env['MACAPP']or getattr(self,'mac_app',False):
-		out=self.link_task.outputs[0]
-		name=bundle_name_for_output(out)
-		dir=self.create_bundle_dirs(name,out)
-		n1=dir.find_or_declare(['Contents','MacOS',out.name])
-		self.apptask=self.create_task('macapp',self.link_task.outputs,n1)
-		inst_to=getattr(self,'install_path','/Applications')+'/%s/Contents/MacOS/'%name
-		self.bld.install_files(inst_to,n1,chmod=Utils.O755)
-		if getattr(self,'mac_resources',None):
-			res_dir=n1.parent.parent.make_node('Resources')
-			inst_to=getattr(self,'install_path','/Applications')+'/%s/Resources'%name
-			for x in self.to_list(self.mac_resources):
-				node=self.path.find_node(x)
-				if not node:
-					raise Errors.WafError('Missing mac_resource %r in %r'%(x,self))
-				parent=node.parent
-				if os.path.isdir(node.abspath()):
-					nodes=node.ant_glob('**')
-				else:
-					nodes=[node]
-				for node in nodes:
-					rel=node.path_from(parent)
-					tsk=self.create_task('macapp',node,res_dir.make_node(rel))
-					self.bld.install_as(inst_to+'/%s'%rel,node)
-		if getattr(self.bld,'is_install',None):
-			self.install_task.hasrun=Task.SKIP_ME
-def create_task_macplist(self):
-	if self.env['MACAPP']or getattr(self,'mac_app',False):
-		out=self.link_task.outputs[0]
-		name=bundle_name_for_output(out)
-		dir=self.create_bundle_dirs(name,out)
-		n1=dir.find_or_declare(['Contents','Info.plist'])
-		self.plisttask=plisttask=self.create_task('macplist',[],n1)
-		if getattr(self,'mac_plist',False):
-			node=self.path.find_resource(self.mac_plist)
-			if node:
-				plisttask.inputs.append(node)
-			else:
-				plisttask.code=self.mac_plist
-		else:
-			plisttask.code=app_info%self.link_task.outputs[0].name
-		inst_to=getattr(self,'install_path','/Applications')+'/%s/Contents/'%name
-		self.bld.install_files(inst_to,n1)
-def apply_bundle(self):
-	if self.env['MACBUNDLE']or getattr(self,'mac_bundle',False):
-		self.env['LINKFLAGS_cshlib']=self.env['LINKFLAGS_cxxshlib']=[]
-		self.env['cshlib_PATTERN']=self.env['cxxshlib_PATTERN']=self.env['macbundle_PATTERN']
-		use=self.use=self.to_list(getattr(self,'use',[]))
-		if not'MACBUNDLE'in use:
-			use.append('MACBUNDLE')
-app_dirs=['Contents','Contents/MacOS','Contents/Resources']
-class macapp(Task.Task):
-	color='PINK'
-	def run(self):
-		self.outputs[0].parent.mkdir()
-		shutil.copy2(self.inputs[0].srcpath(),self.outputs[0].abspath())
-class macplist(Task.Task):
-	color='PINK'
-	ext_in=['.bin']
-	def run(self):
-		if getattr(self,'code',None):
-			txt=self.code
-		else:
-			txt=self.inputs[0].read()
-		self.outputs[0].write(txt)
-
-feature('c','cxx')(set_macosx_deployment_target)
-taskgen_method(create_bundle_dirs)
-feature('cprogram','cxxprogram')(create_task_macapp)
-after_method('apply_link')(create_task_macapp)
-feature('cprogram','cxxprogram')(create_task_macplist)
-after_method('apply_link')(create_task_macplist)
-feature('cshlib','cxxshlib')(apply_bundle)
-before_method('apply_link','propagate_uselib_vars')(apply_bundle)
\ No newline at end of file
diff --git a/waflib/Tools/c_preproc.py b/waflib/Tools/c_preproc.py
deleted file mode 100644
index b5d9fe2..0000000
--- a/waflib/Tools/c_preproc.py
+++ /dev/null
@@ -1,606 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import sys
-if sys.hexversion < 0x020400f0: from sets import Set as set
-import re,sys,os,string,traceback
-from waflib import Logs,Build,Utils,Errors
-from waflib.Logs import debug,error
-class PreprocError(Errors.WafError):
-	pass
-POPFILE='-'
-recursion_limit=150
-go_absolute=False
-standard_includes=['/usr/include']
-if Utils.is_win32:
-	standard_includes=[]
-use_trigraphs=0
-strict_quotes=0
-g_optrans={'not':'!','and':'&&','bitand':'&','and_eq':'&=','or':'||','bitor':'|','or_eq':'|=','xor':'^','xor_eq':'^=','compl':'~',}
-re_lines=re.compile('^[ \t]*(#|%:)[ \t]*(ifdef|ifndef|if|else|elif|endif|include|import|define|undef|pragma)[ \t]*(.*)\r*$',re.IGNORECASE|re.MULTILINE)
-re_mac=re.compile("^[a-zA-Z_]\w*")
-re_fun=re.compile('^[a-zA-Z_][a-zA-Z0-9_]*[(]')
-re_pragma_once=re.compile('^\s*once\s*',re.IGNORECASE)
-re_nl=re.compile('\\\\\r*\n',re.MULTILINE)
-re_cpp=re.compile(r"""(/\*[^*]*\*+([^/*][^*]*\*+)*/)|//[^\n]*|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)""",re.MULTILINE)
-trig_def=[('??'+a,b)for a,b in zip("=-/!'()<>",r'#~\|^[]{}')]
-chr_esc={'0':0,'a':7,'b':8,'t':9,'n':10,'f':11,'v':12,'r':13,'\\':92,"'":39}
-NUM='i'
-OP='O'
-IDENT='T'
-STR='s'
-CHAR='c'
-tok_types=[NUM,STR,IDENT,OP]
-exp_types=[r"""0[xX](?P<hex>[a-fA-F0-9]+)(?P<qual1>[uUlL]*)|L*?'(?P<char>(\\.|[^\\'])+)'|(?P<n1>\d+)[Ee](?P<exp0>[+-]*?\d+)(?P<float0>[fFlL]*)|(?P<n2>\d*\.\d+)([Ee](?P<exp1>[+-]*?\d+))?(?P<float1>[fFlL]*)|(?P<n4>\d+\.\d*)([Ee](?P<exp2>[+-]*?\d+))?(?P<float2>[fFlL]*)|(?P<oct>0*)(?P<n0>\d+)(?P<qual2>[uUlL]*)""",r'L?"([^"\\]|\\.)*"',r'[a-zA-Z_]\w*',r'%:%:|<<=|>>=|\.\.\.|<<|<%|<:|<=|>>|>=|\+\+|\+=|--|->|-=|\*=|/=|%:|%=|%>|==|&&|&=|\|\||\|=|\^=|:>|!=|##|[\(\)\{\}\[\]<>\?\|\^\*\+&=:!#;,%/\-\?\~\.]',]
-re_clexer=re.compile('|'.join(["(?P<%s>%s)"%(name,part)for name,part in zip(tok_types,exp_types)]),re.M)
-accepted='a'
-ignored='i'
-undefined='u'
-skipped='s'
-def repl(m):
-	s=m.group(1)
-	if s:
-		return' '
-	return m.group(3)or''
-def filter_comments(filename):
-	code=Utils.readf(filename)
-	if use_trigraphs:
-		for(a,b)in trig_def:code=code.split(a).join(b)
-	code=re_nl.sub('',code)
-	code=re_cpp.sub(repl,code)
-	return[(m.group(2),m.group(3))for m in re.finditer(re_lines,code)]
-prec={}
-ops=['* / %','+ -','<< >>','< <= >= >','== !=','& | ^','&& ||',',']
-for x in range(len(ops)):
-	syms=ops[x]
-	for u in syms.split():
-		prec[u]=x
-def trimquotes(s):
-	if not s:return''
-	s=s.rstrip()
-	if s[0]=="'"and s[-1]=="'":return s[1:-1]
-	return s
-def reduce_nums(val_1,val_2,val_op):
-	try:a=0+val_1
-	except TypeError:a=int(val_1)
-	try:b=0+val_2
-	except TypeError:b=int(val_2)
-	d=val_op
-	if d=='%':c=a%b
-	elif d=='+':c=a+b
-	elif d=='-':c=a-b
-	elif d=='*':c=a*b
-	elif d=='/':c=a/b
-	elif d=='^':c=a^b
-	elif d=='|':c=a|b
-	elif d=='||':c=int(a or b)
-	elif d=='&':c=a&b
-	elif d=='&&':c=int(a and b)
-	elif d=='==':c=int(a==b)
-	elif d=='!=':c=int(a!=b)
-	elif d=='<=':c=int(a<=b)
-	elif d=='<':c=int(a<b)
-	elif d=='>':c=int(a>b)
-	elif d=='>=':c=int(a>=b)
-	elif d=='^':c=int(a^b)
-	elif d=='<<':c=a<<b
-	elif d=='>>':c=a>>b
-	else:c=0
-	return c
-def get_num(lst):
-	if not lst:raise PreprocError("empty list for get_num")
-	(p,v)=lst[0]
-	if p==OP:
-		if v=='(':
-			count_par=1
-			i=1
-			while i<len(lst):
-				(p,v)=lst[i]
-				if p==OP:
-					if v==')':
-						count_par-=1
-						if count_par==0:
-							break
-					elif v=='(':
-						count_par+=1
-				i+=1
-			else:
-				raise PreprocError("rparen expected %r"%lst)
-			(num,_)=get_term(lst[1:i])
-			return(num,lst[i+1:])
-		elif v=='+':
-			return get_num(lst[1:])
-		elif v=='-':
-			num,lst=get_num(lst[1:])
-			return(reduce_nums('-1',num,'*'),lst)
-		elif v=='!':
-			num,lst=get_num(lst[1:])
-			return(int(not int(num)),lst)
-		elif v=='~':
-			return(~int(num),lst)
-		else:
-			raise PreprocError("Invalid op token %r for get_num"%lst)
-	elif p==NUM:
-		return v,lst[1:]
-	elif p==IDENT:
-		return 0,lst[1:]
-	else:
-		raise PreprocError("Invalid token %r for get_num"%lst)
-def get_term(lst):
-	if not lst:raise PreprocError("empty list for get_term")
-	num,lst=get_num(lst)
-	if not lst:
-		return(num,[])
-	(p,v)=lst[0]
-	if p==OP:
-		if v=='&&'and not num:
-			return(num,[])
-		elif v=='||'and num:
-			return(num,[])
-		elif v==',':
-			return get_term(lst[1:])
-		elif v=='?':
-			count_par=0
-			i=1
-			while i<len(lst):
-				(p,v)=lst[i]
-				if p==OP:
-					if v==')':
-						count_par-=1
-					elif v=='(':
-						count_par+=1
-					elif v==':':
-						if count_par==0:
-							break
-				i+=1
-			else:
-				raise PreprocError("rparen expected %r"%lst)
-			if int(num):
-				return get_term(lst[1:i])
-			else:
-				return get_term(lst[i+1:])
-		else:
-			num2,lst=get_num(lst[1:])
-			if not lst:
-				num2=reduce_nums(num,num2,v)
-				return get_term([(NUM,num2)]+lst)
-			p2,v2=lst[0]
-			if p2!=OP:
-				raise PreprocError("op expected %r"%lst)
-			if prec[v2]>=prec[v]:
-				num2=reduce_nums(num,num2,v)
-				return get_term([(NUM,num2)]+lst)
-			else:
-				num3,lst=get_num(lst[1:])
-				num3=reduce_nums(num2,num3,v2)
-				return get_term([(NUM,num),(p,v),(NUM,num3)]+lst)
-	raise PreprocError("cannot reduce %r"%lst)
-def reduce_eval(lst):
-	num,lst=get_term(lst)
-	return(NUM,num)
-def stringize(lst):
-	lst=[str(v2)for(p2,v2)in lst]
-	return"".join(lst)
-def paste_tokens(t1,t2):
-	p1=None
-	if t1[0]==OP and t2[0]==OP:
-		p1=OP
-	elif t1[0]==IDENT and(t2[0]==IDENT or t2[0]==NUM):
-		p1=IDENT
-	elif t1[0]==NUM and t2[0]==NUM:
-		p1=NUM
-	if not p1:
-		raise PreprocError('tokens do not make a valid paste %r and %r'%(t1,t2))
-	return(p1,t1[1]+t2[1])
-def reduce_tokens(lst,defs,ban=[]):
-	i=0
-	while i<len(lst):
-		(p,v)=lst[i]
-		if p==IDENT and v=="defined":
-			del lst[i]
-			if i<len(lst):
-				(p2,v2)=lst[i]
-				if p2==IDENT:
-					if v2 in defs:
-						lst[i]=(NUM,1)
-					else:
-						lst[i]=(NUM,0)
-				elif p2==OP and v2=='(':
-					del lst[i]
-					(p2,v2)=lst[i]
-					del lst[i]
-					if v2 in defs:
-						lst[i]=(NUM,1)
-					else:
-						lst[i]=(NUM,0)
-				else:
-					raise PreprocError("Invalid define expression %r"%lst)
-		elif p==IDENT and v in defs:
-			if isinstance(defs[v],str):
-				a,b=extract_macro(defs[v])
-				defs[v]=b
-			macro_def=defs[v]
-			to_add=macro_def[1]
-			if isinstance(macro_def[0],list):
-				del lst[i]
-				for x in range(len(to_add)):
-					lst.insert(i,to_add[x])
-					i+=1
-			else:
-				args=[]
-				del lst[i]
-				if i>=len(lst):
-					raise PreprocError("expected '(' after %r (got nothing)"%v)
-				(p2,v2)=lst[i]
-				if p2!=OP or v2!='(':
-					raise PreprocError("expected '(' after %r"%v)
-				del lst[i]
-				one_param=[]
-				count_paren=0
-				while i<len(lst):
-					p2,v2=lst[i]
-					del lst[i]
-					if p2==OP and count_paren==0:
-						if v2=='(':
-							one_param.append((p2,v2))
-							count_paren+=1
-						elif v2==')':
-							if one_param:args.append(one_param)
-							break
-						elif v2==',':
-							if not one_param:raise PreprocError("empty param in funcall %s"%p)
-							args.append(one_param)
-							one_param=[]
-						else:
-							one_param.append((p2,v2))
-					else:
-						one_param.append((p2,v2))
-						if v2=='(':count_paren+=1
-						elif v2==')':count_paren-=1
-				else:
-					raise PreprocError('malformed macro')
-				accu=[]
-				arg_table=macro_def[0]
-				j=0
-				while j<len(to_add):
-					(p2,v2)=to_add[j]
-					if p2==OP and v2=='#':
-						if j+1<len(to_add)and to_add[j+1][0]==IDENT and to_add[j+1][1]in arg_table:
-							toks=args[arg_table[to_add[j+1][1]]]
-							accu.append((STR,stringize(toks)))
-							j+=1
-						else:
-							accu.append((p2,v2))
-					elif p2==OP and v2=='##':
-						if accu and j+1<len(to_add):
-							t1=accu[-1]
-							if to_add[j+1][0]==IDENT and to_add[j+1][1]in arg_table:
-								toks=args[arg_table[to_add[j+1][1]]]
-								if toks:
-									accu[-1]=paste_tokens(t1,toks[0])
-									accu.extend(toks[1:])
-								else:
-									accu.append((p2,v2))
-									accu.extend(toks)
-							elif to_add[j+1][0]==IDENT and to_add[j+1][1]=='__VA_ARGS__':
-								va_toks=[]
-								st=len(macro_def[0])
-								pt=len(args)
-								for x in args[pt-st+1:]:
-									va_toks.extend(x)
-									va_toks.append((OP,','))
-								if va_toks:va_toks.pop()
-								if len(accu)>1:
-									(p3,v3)=accu[-1]
-									(p4,v4)=accu[-2]
-									if v3=='##':
-										accu.pop()
-										if v4==','and pt<st:
-											accu.pop()
-								accu+=va_toks
-							else:
-								accu[-1]=paste_tokens(t1,to_add[j+1])
-							j+=1
-						else:
-							accu.append((p2,v2))
-					elif p2==IDENT and v2 in arg_table:
-						toks=args[arg_table[v2]]
-						reduce_tokens(toks,defs,ban+[v])
-						accu.extend(toks)
-					else:
-						accu.append((p2,v2))
-					j+=1
-				reduce_tokens(accu,defs,ban+[v])
-				for x in range(len(accu)-1,-1,-1):
-					lst.insert(i,accu[x])
-		i+=1
-def eval_macro(lst,defs):
-	reduce_tokens(lst,defs,[])
-	if not lst:raise PreprocError("missing tokens to evaluate")
-	(p,v)=reduce_eval(lst)
-	return int(v)!=0
-def extract_macro(txt):
-	t=tokenize(txt)
-	if re_fun.search(txt):
-		p,name=t[0]
-		p,v=t[1]
-		if p!=OP:raise PreprocError("expected open parenthesis")
-		i=1
-		pindex=0
-		params={}
-		prev='('
-		while 1:
-			i+=1
-			p,v=t[i]
-			if prev=='(':
-				if p==IDENT:
-					params[v]=pindex
-					pindex+=1
-					prev=p
-				elif p==OP and v==')':
-					break
-				else:
-					raise PreprocError("unexpected token (3)")
-			elif prev==IDENT:
-				if p==OP and v==',':
-					prev=v
-				elif p==OP and v==')':
-					break
-				else:
-					raise PreprocError("comma or ... expected")
-			elif prev==',':
-				if p==IDENT:
-					params[v]=pindex
-					pindex+=1
-					prev=p
-				elif p==OP and v=='...':
-					raise PreprocError("not implemented (1)")
-				else:
-					raise PreprocError("comma or ... expected (2)")
-			elif prev=='...':
-				raise PreprocError("not implemented (2)")
-			else:
-				raise PreprocError("unexpected else")
-		return(name,[params,t[i+1:]])
-	else:
-		(p,v)=t[0]
-		return(v,[[],t[1:]])
-re_include=re.compile('^\s*(<(?P<a>.*)>|"(?P<b>.*)")')
-def extract_include(txt,defs):
-	m=re_include.search(txt)
-	if m:
-		if m.group('a'):return'<',m.group('a')
-		if m.group('b'):return'"',m.group('b')
-	toks=tokenize(txt)
-	reduce_tokens(toks,defs,['waf_include'])
-	if not toks:
-		raise PreprocError("could not parse include %s"%txt)
-	if len(toks)==1:
-		if toks[0][0]==STR:
-			return'"',toks[0][1]
-	else:
-		if toks[0][1]=='<'and toks[-1][1]=='>':
-			return stringize(toks).lstrip('<').rstrip('>')
-	raise PreprocError("could not parse include %s."%txt)
-def parse_char(txt):
-	if not txt:raise PreprocError("attempted to parse a null char")
-	if txt[0]!='\\':
-		return ord(txt)
-	c=txt[1]
-	if c=='x':
-		if len(txt)==4 and txt[3]in string.hexdigits:return int(txt[2:],16)
-		return int(txt[2:],16)
-	elif c.isdigit():
-		if c=='0'and len(txt)==2:return 0
-		for i in 3,2,1:
-			if len(txt)>i and txt[1:1+i].isdigit():
-				return(1+i,int(txt[1:1+i],8))
-	else:
-		try:return chr_esc[c]
-		except KeyError:raise PreprocError("could not parse char literal '%s'"%txt)
-def tokenize(s):
-	ret=[]
-	for match in re_clexer.finditer(s):
-		m=match.group
-		for name in tok_types:
-			v=m(name)
-			if v:
-				if name==IDENT:
-					try:v=g_optrans[v];name=OP
-					except KeyError:
-						if v.lower()=="true":
-							v=1
-							name=NUM
-						elif v.lower()=="false":
-							v=0
-							name=NUM
-				elif name==NUM:
-					if m('oct'):v=int(v,8)
-					elif m('hex'):v=int(m('hex'),16)
-					elif m('n0'):v=m('n0')
-					else:
-						v=m('char')
-						if v:v=parse_char(v)
-						else:v=m('n2')or m('n4')
-				elif name==OP:
-					if v=='%:':v='#'
-					elif v=='%:%:':v='##'
-				elif name==STR:
-					v=v[1:-1]
-				ret.append((name,v))
-				break
-	return ret
-def define_name(line):
-	return re_mac.match(line).group(0)
-class c_parser(object):
-	def __init__(self,nodepaths=None,defines=None):
-		self.lines=[]
-		if defines is None:
-			self.defs={}
-		else:
-			self.defs=dict(defines)
-		self.state=[]
-		self.count_files=0
-		self.currentnode_stack=[]
-		self.nodepaths=nodepaths or[]
-		self.nodes=[]
-		self.names=[]
-		self.curfile=''
-		self.ban_includes=set([])
-	def cached_find_resource(self,node,filename):
-		try:
-			nd=node.ctx.cache_nd
-		except:
-			nd=node.ctx.cache_nd={}
-		tup=(node,filename)
-		try:
-			return nd[tup]
-		except KeyError:
-			ret=node.find_resource(filename)
-			if ret:
-				if getattr(ret,'children',None):
-					ret=None
-				elif ret.is_child_of(node.ctx.bldnode):
-					tmp=node.ctx.srcnode.search(ret.path_from(node.ctx.bldnode))
-					if tmp and getattr(tmp,'children',None):
-						ret=None
-			nd[tup]=ret
-			return ret
-	def tryfind(self,filename):
-		self.curfile=filename
-		found=self.cached_find_resource(self.currentnode_stack[-1],filename)
-		for n in self.nodepaths:
-			if found:
-				break
-			found=self.cached_find_resource(n,filename)
-		if found:
-			self.nodes.append(found)
-			if filename[-4:]!='.moc':
-				self.addlines(found)
-		else:
-			if not filename in self.names:
-				self.names.append(filename)
-		return found
-	def addlines(self,node):
-		self.currentnode_stack.append(node.parent)
-		filepath=node.abspath()
-		self.count_files+=1
-		if self.count_files>recursion_limit:
-			raise PreprocError("recursion limit exceeded")
-		pc=self.parse_cache
-		debug('preproc: reading file %r',filepath)
-		try:
-			lns=pc[filepath]
-		except KeyError:
-			pass
-		else:
-			self.lines.extend(lns)
-			return
-		try:
-			lines=filter_comments(filepath)
-			lines.append((POPFILE,''))
-			lines.reverse()
-			pc[filepath]=lines
-			self.lines.extend(lines)
-		except IOError:
-			raise PreprocError("could not read the file %s"%filepath)
-		except Exception:
-			if Logs.verbose>0:
-				error("parsing %s failed"%filepath)
-				traceback.print_exc()
-	def start(self,node,env):
-		debug('preproc: scanning %s (in %s)',node.name,node.parent.name)
-		bld=node.ctx
-		try:
-			self.parse_cache=bld.parse_cache
-		except AttributeError:
-			bld.parse_cache={}
-			self.parse_cache=bld.parse_cache
-		self.addlines(node)
-		if env['DEFINES']:
-			try:
-				lst=['%s %s'%(x[0],trimquotes('='.join(x[1:])))for x in[y.split('=')for y in env['DEFINES']]]
-				lst.reverse()
-				self.lines.extend([('define',x)for x in lst])
-			except AttributeError:
-				pass
-		while self.lines:
-			(token,line)=self.lines.pop()
-			if token==POPFILE:
-				self.count_files-=1
-				self.currentnode_stack.pop()
-				continue
-			try:
-				ve=Logs.verbose
-				if ve:debug('preproc: line is %s - %s state is %s',token,line,self.state)
-				state=self.state
-				if token[:2]=='if':
-					state.append(undefined)
-				elif token=='endif':
-					state.pop()
-				if token[0]!='e':
-					if skipped in self.state or ignored in self.state:
-						continue
-				if token=='if':
-					ret=eval_macro(tokenize(line),self.defs)
-					if ret:state[-1]=accepted
-					else:state[-1]=ignored
-				elif token=='ifdef':
-					m=re_mac.match(line)
-					if m and m.group(0)in self.defs:state[-1]=accepted
-					else:state[-1]=ignored
-				elif token=='ifndef':
-					m=re_mac.match(line)
-					if m and m.group(0)in self.defs:state[-1]=ignored
-					else:state[-1]=accepted
-				elif token=='include'or token=='import':
-					(kind,inc)=extract_include(line,self.defs)
-					if inc in self.ban_includes:
-						continue
-					if token=='import':self.ban_includes.add(inc)
-					if ve:debug('preproc: include found %s    (%s) ',inc,kind)
-					if kind=='"'or not strict_quotes:
-						self.tryfind(inc)
-				elif token=='elif':
-					if state[-1]==accepted:
-						state[-1]=skipped
-					elif state[-1]==ignored:
-						if eval_macro(tokenize(line),self.defs):
-							state[-1]=accepted
-				elif token=='else':
-					if state[-1]==accepted:state[-1]=skipped
-					elif state[-1]==ignored:state[-1]=accepted
-				elif token=='define':
-					try:
-						self.defs[define_name(line)]=line
-					except:
-						raise PreprocError("Invalid define line %s"%line)
-				elif token=='undef':
-					m=re_mac.match(line)
-					if m and m.group(0)in self.defs:
-						self.defs.__delitem__(m.group(0))
-				elif token=='pragma':
-					if re_pragma_once.match(line.lower()):
-						self.ban_includes.add(self.curfile)
-			except Exception ,e:
-				if Logs.verbose:
-					debug('preproc: line parsing failed (%s): %s %s',e,line,Utils.ex_stack())
-def scan(task):
-	global go_absolute
-	try:
-		incn=task.generator.includes_nodes
-	except AttributeError:
-		raise Errors.WafError('%r is missing a feature such as "c", "cxx" or "includes": '%task.generator)
-	if go_absolute:
-		nodepaths=incn
-	else:
-		nodepaths=[x for x in incn if x.is_child_of(x.ctx.srcnode)or x.is_child_of(x.ctx.bldnode)]
-	tmp=c_parser(nodepaths)
-	tmp.start(task.inputs[0],task.env)
-	if Logs.verbose:
-		debug('deps: deps for %r: %r; unresolved %r'%(task.inputs,tmp.nodes,tmp.names))
-	return(tmp.nodes,tmp.names)
-
-Utils.run_once(tokenize)
-Utils.run_once(define_name)
\ No newline at end of file
diff --git a/waflib/Tools/c_tests.py b/waflib/Tools/c_tests.py
deleted file mode 100644
index 9e6342a..0000000
--- a/waflib/Tools/c_tests.py
+++ /dev/null
@@ -1,110 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-from waflib.Configure import conf
-from waflib.TaskGen import feature,before_method
-import sys
-LIB_CODE='''
-#ifdef _MSC_VER
-#define testEXPORT __declspec(dllexport)
-#else
-#define testEXPORT
-#endif
-testEXPORT int lib_func(void) { return 9; }
-'''
-MAIN_CODE='''
-#ifdef _MSC_VER
-#define testEXPORT __declspec(dllimport)
-#else
-#define testEXPORT
-#endif
-testEXPORT int lib_func(void);
-int main(void) {return !(lib_func() == 9);}
-'''
-def link_lib_test_fun(self):
-	def write_test_file(task):
-		task.outputs[0].write(task.generator.code)
-	rpath=[]
-	if getattr(self,'add_rpath',False):
-		rpath=[self.bld.path.get_bld().abspath()]
-	mode=self.mode
-	m='%s %s'%(mode,mode)
-	bld=self.bld
-	bld(rule=write_test_file,target='test.'+mode,code=LIB_CODE)
-	bld(rule=write_test_file,target='main.'+mode,code=MAIN_CODE)
-	bld(features=m+'shlib',source='test.'+mode,target='test')
-	bld(features=m+'program test_exec',source='main.'+mode,target='app',use='test',rpath=rpath)
-def check_library(self,mode=None):
-	if not mode:
-		mode='c'
-		if self.env.CXX:
-			mode='cxx'
-	self.check(compile_filename=[],features='link_lib_test',msg='Checking for libraries',mode=mode)
-INLINE_CODE='''
-typedef int foo_t;
-static %s foo_t static_foo () {return 0; }
-%s foo_t foo () {
-	return 0;
-}
-'''
-INLINE_VALUES=['inline','__inline__','__inline']
-def check_inline(self,**kw):
-	self.start_msg('Checking for inline')
-	if not'define_name'in kw:
-		kw['define_name']='INLINE_MACRO'
-	if not'features'in kw:
-		if self.env.CXX:
-			kw['features']=['cxx']
-		else:
-			kw['features']=['c']
-	for x in INLINE_VALUES:
-		kw['fragment']=INLINE_CODE%(x,x)
-		try:
-			self.check(**kw)
-		except self.errors.ConfigurationError:
-			continue
-		else:
-			self.end_msg(x)
-			if x!='inline':
-				self.define('inline',x,quote=False)
-			return x
-	self.fatal('could not use inline functions')
-LARGE_FRAGMENT='#include <unistd.h>\nint main() { return !(sizeof(off_t) >= 8); }\n'
-def check_large_file(self,**kw):
-	if not'define_name'in kw:
-		kw['define_name']='HAVE_LARGEFILE'
-	if not'execute'in kw:
-		kw['execute']=True
-	if not'features'in kw:
-		if self.env.CXX:
-			kw['features']=['cxx','cxxprogram']
-		else:
-			kw['features']=['c','cprogram']
-	kw['fragment']=LARGE_FRAGMENT
-	kw['msg']='Checking for large file support'
-	ret=True
-	try:
-		if self.env.DEST_BINFMT!='pe':
-			ret=self.check(**kw)
-	except self.errors.ConfigurationError:
-		pass
-	else:
-		if ret:
-			return True
-	kw['msg']='Checking for -D_FILE_OFFSET_BITS=64'
-	kw['defines']=['_FILE_OFFSET_BITS=64']
-	try:
-		ret=self.check(**kw)
-	except self.errors.ConfigurationError:
-		pass
-	else:
-		self.define('_FILE_OFFSET_BITS',64)
-		return ret
-	self.fatal('There is no support for large files')
-
-feature('link_lib_test')(link_lib_test_fun)
-before_method('process_source')(link_lib_test_fun)
-conf(check_library)
-conf(check_inline)
-conf(check_large_file)
\ No newline at end of file
diff --git a/waflib/Tools/ccroot.py b/waflib/Tools/ccroot.py
deleted file mode 100644
index 02104b5..0000000
--- a/waflib/Tools/ccroot.py
+++ /dev/null
@@ -1,372 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import sys
-if sys.hexversion < 0x020400f0: from sets import Set as set
-import os,sys,re
-from waflib import TaskGen,Task,Utils,Logs,Build,Options,Node,Errors
-from waflib.Logs import error,debug,warn
-from waflib.TaskGen import after_method,before_method,feature,taskgen_method,extension
-from waflib.Tools import c_aliases,c_preproc,c_config,c_osx,c_tests
-from waflib.Configure import conf
-USELIB_VARS=Utils.defaultdict(set)
-USELIB_VARS['c']=set(['INCLUDES','FRAMEWORKPATH','DEFINES','CPPFLAGS','CCDEPS','CFLAGS','ARCH'])
-USELIB_VARS['cxx']=set(['INCLUDES','FRAMEWORKPATH','DEFINES','CPPFLAGS','CXXDEPS','CXXFLAGS','ARCH'])
-USELIB_VARS['d']=set(['INCLUDES','DFLAGS'])
-USELIB_VARS['cprogram']=USELIB_VARS['cxxprogram']=set(['LIB','STLIB','LIBPATH','STLIBPATH','LINKFLAGS','RPATH','LINKDEPS','FRAMEWORK','FRAMEWORKPATH','ARCH'])
-USELIB_VARS['cshlib']=USELIB_VARS['cxxshlib']=set(['LIB','STLIB','LIBPATH','STLIBPATH','LINKFLAGS','RPATH','LINKDEPS','FRAMEWORK','FRAMEWORKPATH','ARCH'])
-USELIB_VARS['cstlib']=USELIB_VARS['cxxstlib']=set(['ARFLAGS','LINKDEPS'])
-USELIB_VARS['dprogram']=set(['LIB','STLIB','LIBPATH','STLIBPATH','LINKFLAGS','RPATH','LINKDEPS'])
-USELIB_VARS['dshlib']=set(['LIB','STLIB','LIBPATH','STLIBPATH','LINKFLAGS','RPATH','LINKDEPS'])
-USELIB_VARS['dstlib']=set(['ARFLAGS','LINKDEPS'])
-USELIB_VARS['go']=set(['GOCFLAGS'])
-USELIB_VARS['goprogram']=set(['GOLFLAGS'])
-USELIB_VARS['asm']=set(['ASFLAGS'])
-def create_compiled_task(self,name,node):
-	out='%s.%d.o'%(node.name,self.idx)
-	task=self.create_task(name,node,node.parent.find_or_declare(out))
-	try:
-		self.compiled_tasks.append(task)
-	except AttributeError:
-		self.compiled_tasks=[task]
-	return task
-def to_incnodes(self,inlst):
-	lst=[]
-	seen=set([])
-	for x in self.to_list(inlst):
-		if x in seen or not x:
-			continue
-		seen.add(x)
-		if isinstance(x,Node.Node):
-			lst.append(x)
-		else:
-			if os.path.isabs(x):
-				lst.append(self.bld.root.make_node(x)or x)
-			else:
-				if x[0]=='#':
-					p=self.bld.bldnode.make_node(x[1:])
-					v=self.bld.srcnode.make_node(x[1:])
-				else:
-					p=self.path.get_bld().make_node(x)
-					v=self.path.make_node(x)
-				p.mkdir()
-				lst.append(p)
-				lst.append(v)
-	return lst
-def apply_incpaths(self):
-	lst=self.to_incnodes(self.to_list(getattr(self,'includes',[]))+self.env['INCLUDES'])
-	self.includes_nodes=lst
-	self.env['INCPATHS']=[x.abspath()for x in lst]
-class link_task(Task.Task):
-	color='YELLOW'
-	inst_to=None
-	chmod=Utils.O644
-	def add_target(self,target):
-		if isinstance(target,str):
-			pattern=self.env[self.__class__.__name__+'_PATTERN']
-			if not pattern:
-				pattern='%s'
-			folder,name=os.path.split(target)
-			if self.__class__.__name__.find('shlib')>0:
-				if self.env.DEST_BINFMT=='pe'and getattr(self.generator,'vnum',None):
-					name=name+'-'+self.generator.vnum.split('.')[0]
-			tmp=folder+os.sep+pattern%name
-			target=self.generator.path.find_or_declare(tmp)
-		self.set_outputs(target)
-class stlink_task(link_task):
-	run_str='${AR} ${ARFLAGS} ${AR_TGT_F}${TGT} ${AR_SRC_F}${SRC}'
-def rm_tgt(cls):
-	old=cls.run
-	def wrap(self):
-		try:os.remove(self.outputs[0].abspath())
-		except OSError:pass
-		return old(self)
-	setattr(cls,'run',wrap)
-rm_tgt(stlink_task)
-def apply_link(self):
-	for x in self.features:
-		if x=='cprogram'and'cxx'in self.features:
-			x='cxxprogram'
-		elif x=='cshlib'and'cxx'in self.features:
-			x='cxxshlib'
-		if x in Task.classes:
-			if issubclass(Task.classes[x],link_task):
-				link=x
-				break
-	else:
-		return
-	objs=[t.outputs[0]for t in getattr(self,'compiled_tasks',[])]
-	self.link_task=self.create_task(link,objs)
-	self.link_task.add_target(self.target)
-	if getattr(self.bld,'is_install',None):
-		try:
-			inst_to=self.install_path
-		except AttributeError:
-			inst_to=self.link_task.__class__.inst_to
-		if inst_to:
-			self.install_task=self.bld.install_files(inst_to,self.link_task.outputs[:],env=self.env,chmod=self.link_task.chmod)
-def use_rec(self,name,**kw):
-	if name in self.tmp_use_not or name in self.tmp_use_seen:
-		return
-	try:
-		y=self.bld.get_tgen_by_name(name)
-	except Errors.WafError:
-		self.uselib.append(name)
-		self.tmp_use_not.add(name)
-		return
-	self.tmp_use_seen.append(name)
-	y.post()
-	y.tmp_use_objects=objects=kw.get('objects',True)
-	y.tmp_use_stlib=stlib=kw.get('stlib',True)
-	try:
-		link_task=y.link_task
-	except AttributeError:
-		y.tmp_use_var=''
-	else:
-		objects=False
-		if not isinstance(y.link_task,stlink_task):
-			stlib=False
-			y.tmp_use_var='LIB'
-		else:
-			y.tmp_use_var='STLIB'
-	p=self.tmp_use_prec
-	for x in self.to_list(getattr(y,'use',[])):
-		try:
-			p[x].append(name)
-		except:
-			p[x]=[name]
-		self.use_rec(x,objects=objects,stlib=stlib)
-def process_use(self):
-	use_not=self.tmp_use_not=set([])
-	use_seen=self.tmp_use_seen=[]
-	use_prec=self.tmp_use_prec={}
-	self.uselib=self.to_list(getattr(self,'uselib',[]))
-	self.includes=self.to_list(getattr(self,'includes',[]))
-	names=self.to_list(getattr(self,'use',[]))
-	for x in names:
-		self.use_rec(x)
-	for x in use_not:
-		if x in use_prec:
-			del use_prec[x]
-	out=[]
-	tmp=[]
-	for x in self.tmp_use_seen:
-		for k in use_prec.values():
-			if x in k:
-				break
-		else:
-			tmp.append(x)
-	while tmp:
-		e=tmp.pop()
-		out.append(e)
-		try:
-			nlst=use_prec[e]
-		except KeyError:
-			pass
-		else:
-			del use_prec[e]
-			for x in nlst:
-				for y in use_prec:
-					if x in use_prec[y]:
-						break
-				else:
-					tmp.append(x)
-	if use_prec:
-		raise Errors.WafError('Cycle detected in the use processing %r'%use_prec)
-	out.reverse()
-	link_task=getattr(self,'link_task',None)
-	for x in out:
-		y=self.bld.get_tgen_by_name(x)
-		var=y.tmp_use_var
-		if var and link_task:
-			if var=='LIB'or y.tmp_use_stlib:
-				self.env.append_value(var,[y.target[y.target.rfind(os.sep)+1:]])
-				self.link_task.dep_nodes.extend(y.link_task.outputs)
-				tmp_path=y.link_task.outputs[0].parent.path_from(self.bld.bldnode)
-				self.env.append_value(var+'PATH',[tmp_path])
-		else:
-			if y.tmp_use_objects:
-				self.add_objects_from_tgen(y)
-		if getattr(y,'export_includes',None):
-			self.includes.extend(y.to_incnodes(y.export_includes))
-	for x in names:
-		try:
-			y=self.bld.get_tgen_by_name(x)
-		except:
-			if not self.env['STLIB_'+x]and not x in self.uselib:
-				self.uselib.append(x)
-		else:
-			for k in self.to_list(getattr(y,'uselib',[])):
-				if not self.env['STLIB_'+k]and not k in self.uselib:
-					self.uselib.append(k)
-def add_objects_from_tgen(self,tg):
-	try:
-		link_task=self.link_task
-	except AttributeError:
-		pass
-	else:
-		for tsk in getattr(tg,'compiled_tasks',[]):
-			for x in tsk.outputs:
-				if x.name.endswith('.o')or x.name.endswith('.obj'):
-					link_task.inputs.append(x)
-def get_uselib_vars(self):
-	_vars=set([])
-	for x in self.features:
-		if x in USELIB_VARS:
-			_vars|=USELIB_VARS[x]
-	return _vars
-def propagate_uselib_vars(self):
-	_vars=self.get_uselib_vars()
-	env=self.env
-	for x in _vars:
-		y=x.lower()
-		env.append_unique(x,self.to_list(getattr(self,y,[])))
-	for x in self.features:
-		for var in _vars:
-			compvar='%s_%s'%(var,x)
-			env.append_value(var,env[compvar])
-	for x in self.to_list(getattr(self,'uselib',[])):
-		for v in _vars:
-			env.append_value(v,env[v+'_'+x])
-def apply_implib(self):
-	if not self.env.DEST_BINFMT=='pe':
-		return
-	dll=self.link_task.outputs[0]
-	if isinstance(self.target,Node.Node):
-		name=self.target.name
-	else:
-		name=os.path.split(self.target)[1]
-	implib=self.env['implib_PATTERN']%name
-	implib=dll.parent.find_or_declare(implib)
-	self.env.append_value('LINKFLAGS',self.env['IMPLIB_ST']%implib.bldpath())
-	self.link_task.outputs.append(implib)
-	if getattr(self,'defs',None)and self.env.DEST_BINFMT=='pe':
-		node=self.path.find_resource(self.defs)
-		if not node:
-			raise Errors.WafError('invalid def file %r'%self.defs)
-		if'msvc'in(self.env.CC_NAME,self.env.CXX_NAME):
-			self.env.append_value('LINKFLAGS','/def:%s'%node.path_from(self.bld.bldnode))
-			self.link_task.dep_nodes.append(node)
-		else:
-			self.link_task.inputs.append(node)
-	try:
-		inst_to=self.install_path
-	except AttributeError:
-		inst_to=self.link_task.__class__.inst_to
-	if not inst_to:
-		return
-	self.implib_install_task=self.bld.install_as('${PREFIX}/lib/%s'%implib.name,implib,self.env)
-def apply_vnum(self):
-	if not getattr(self,'vnum','')or os.name!='posix'or self.env.DEST_BINFMT not in('elf','mac-o'):
-		return
-	link=self.link_task
-	nums=self.vnum.split('.')
-	node=link.outputs[0]
-	libname=node.name
-	if libname.endswith('.dylib'):
-		name3=libname.replace('.dylib','.%s.dylib'%self.vnum)
-		name2=libname.replace('.dylib','.%s.dylib'%nums[0])
-	else:
-		name3=libname+'.'+self.vnum
-		name2=libname+'.'+nums[0]
-	if self.env.SONAME_ST:
-		v=self.env.SONAME_ST%name2
-		self.env.append_value('LINKFLAGS',v.split())
-	tsk=self.create_task('vnum',node,[node.parent.find_or_declare(name2),node.parent.find_or_declare(name3)])
-	if getattr(self.bld,'is_install',None):
-		self.install_task.hasrun=Task.SKIP_ME
-		bld=self.bld
-		path=self.install_task.dest
-		t1=bld.install_as(path+os.sep+name3,node,env=self.env)
-		t2=bld.symlink_as(path+os.sep+name2,name3)
-		t3=bld.symlink_as(path+os.sep+libname,name3)
-		self.vnum_install_task=(t1,t2,t3)
-class vnum(Task.Task):
-	color='CYAN'
-	quient=True
-	ext_in=['.bin']
-	def run(self):
-		for x in self.outputs:
-			path=x.abspath()
-			try:
-				os.remove(path)
-			except OSError:
-				pass
-			try:
-				os.symlink(self.inputs[0].name,path)
-			except OSError:
-				return 1
-class fake_shlib(link_task):
-	def runnable_status(self):
-		for t in self.run_after:
-			if not t.hasrun:
-				return Task.ASK_LATER
-		for x in self.outputs:
-			x.sig=Utils.h_file(x.abspath())
-		return Task.SKIP_ME
-class fake_stlib(stlink_task):
-	def runnable_status(self):
-		for t in self.run_after:
-			if not t.hasrun:
-				return Task.ASK_LATER
-		for x in self.outputs:
-			x.sig=Utils.h_file(x.abspath())
-		return Task.SKIP_ME
-def read_shlib(self,name,paths=[]):
-	return self(name=name,features='fake_lib',lib_paths=paths,lib_type='shlib')
-def read_stlib(self,name,paths=[]):
-	return self(name=name,features='fake_lib',lib_paths=paths,lib_type='stlib')
-lib_patterns={'shlib':['lib%s.so','%s.so','lib%s.dll','%s.dll'],'stlib':['lib%s.a','%s.a','lib%s.dll','%s.dll','lib%s.lib','%s.lib'],}
-def process_lib(self):
-	node=None
-	names=[x%self.name for x in lib_patterns[self.lib_type]]
-	for x in self.lib_paths+[self.path,'/usr/lib64','/usr/lib','/usr/local/lib64','/usr/local/lib']:
-		if not isinstance(x,Node.Node):
-			x=self.bld.root.find_node(x)or self.path.find_node(x)
-			if not x:
-				continue
-		for y in names:
-			node=x.find_node(y)
-			if node:
-				node.sig=Utils.h_file(node.abspath())
-				break
-		else:
-			continue
-		break
-	else:
-		raise Errors.WafError('could not find library %r'%self.name)
-	self.link_task=self.create_task('fake_%s'%self.lib_type,[],[node])
-	self.target=self.name
-class fake_o(Task.Task):
-	def runnable_status(self):
-		return Task.SKIP_ME
-def add_those_o_files(self,node):
-	tsk=self.create_task('fake_o',[],node)
-	try:
-		self.compiled_tasks.append(tsk)
-	except AttributeError:
-		self.compiled_tasks=[tsk]
-
-taskgen_method(create_compiled_task)
-taskgen_method(to_incnodes)
-feature('c','cxx','d','go','asm','fc','includes')(apply_incpaths)
-after_method('propagate_uselib_vars','process_source')(apply_incpaths)
-feature('c','cxx','d','go','fc','asm')(apply_link)
-after_method('process_source')(apply_link)
-taskgen_method(use_rec)
-feature('c','cxx','d','use','fc')(process_use)
-before_method('apply_incpaths','propagate_uselib_vars')(process_use)
-after_method('apply_link','process_source')(process_use)
-taskgen_method(add_objects_from_tgen)
-taskgen_method(get_uselib_vars)
-feature('c','cxx','d','fc','javac','cs','uselib')(propagate_uselib_vars)
-after_method('process_use')(propagate_uselib_vars)
-feature('cshlib','cxxshlib','fcshlib')(apply_implib)
-after_method('apply_link')(apply_implib)
-feature('cshlib','cxxshlib','dshlib','fcshlib','vnum')(apply_vnum)
-after_method('apply_link')(apply_vnum)
-conf(read_shlib)
-conf(read_stlib)
-feature('fake_lib')(process_lib)
-extension('.o','.obj')(add_those_o_files)
\ No newline at end of file
diff --git a/waflib/Tools/compiler_c.py b/waflib/Tools/compiler_c.py
deleted file mode 100644
index 04504fa..0000000
--- a/waflib/Tools/compiler_c.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,sys,imp,types
-from waflib.Tools import ccroot
-from waflib import Utils,Configure
-from waflib.Logs import debug
-c_compiler={'win32':['msvc','gcc'],'cygwin':['gcc'],'darwin':['gcc'],'aix':['xlc','gcc'],'linux':['gcc','icc'],'sunos':['suncc','gcc'],'irix':['gcc','irixcc'],'hpux':['gcc'],'gnu':['gcc'],'java':['gcc','msvc','icc'],'default':['gcc'],}
-def configure(conf):
-	try:test_for_compiler=conf.options.check_c_compiler
-	except AttributeError:conf.fatal("Add options(opt): opt.load('compiler_c')")
-	for compiler in test_for_compiler.split():
-		conf.env.stash()
-		conf.start_msg('Checking for %r (c compiler)'%compiler)
-		try:
-			conf.load(compiler)
-		except conf.errors.ConfigurationError ,e:
-			conf.env.revert()
-			conf.end_msg(False)
-			debug('compiler_c: %r'%e)
-		else:
-			if conf.env['CC']:
-				conf.end_msg(conf.env.get_flat('CC'))
-				conf.env['COMPILER_CC']=compiler
-				break
-			conf.end_msg(False)
-	else:
-		conf.fatal('could not configure a c compiler!')
-def options(opt):
-	opt.load_special_tools('c_*.py',ban=['c_dumbpreproc.py'])
-	global c_compiler
-	build_platform=Utils.unversioned_sys_platform()
-	possible_compiler_list=c_compiler[build_platform in c_compiler and build_platform or'default']
-	test_for_compiler=' '.join(possible_compiler_list)
-	cc_compiler_opts=opt.add_option_group("C Compiler Options")
-	cc_compiler_opts.add_option('--check-c-compiler',default="%s"%test_for_compiler,help='On this platform (%s) the following C-Compiler will be checked by default: "%s"'%(build_platform,test_for_compiler),dest="check_c_compiler")
-	for x in test_for_compiler.split():
-		opt.load('%s'%x)
diff --git a/waflib/Tools/compiler_cxx.py b/waflib/Tools/compiler_cxx.py
deleted file mode 100644
index 14b7c7d..0000000
--- a/waflib/Tools/compiler_cxx.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,sys,imp,types
-from waflib.Tools import ccroot
-from waflib import Utils,Configure
-from waflib.Logs import debug
-cxx_compiler={'win32':['msvc','g++'],'cygwin':['g++'],'darwin':['g++'],'aix':['xlc++','g++'],'linux':['g++','icpc'],'sunos':['sunc++','g++'],'irix':['g++'],'hpux':['g++'],'gnu':['g++'],'java':['g++','msvc','icpc'],'default':['g++']}
-def configure(conf):
-	try:test_for_compiler=conf.options.check_cxx_compiler
-	except AttributeError:conf.fatal("Add options(opt): opt.load('compiler_cxx')")
-	for compiler in test_for_compiler.split():
-		conf.env.stash()
-		conf.start_msg('Checking for %r (c++ compiler)'%compiler)
-		try:
-			conf.load(compiler)
-		except conf.errors.ConfigurationError ,e:
-			conf.env.revert()
-			conf.end_msg(False)
-			debug('compiler_cxx: %r'%e)
-		else:
-			if conf.env['CXX']:
-				conf.end_msg(conf.env.get_flat('CXX'))
-				conf.env['COMPILER_CXX']=compiler
-				break
-			conf.end_msg(False)
-	else:
-		conf.fatal('could not configure a c++ compiler!')
-def options(opt):
-	opt.load_special_tools('cxx_*.py')
-	global cxx_compiler
-	build_platform=Utils.unversioned_sys_platform()
-	possible_compiler_list=cxx_compiler[build_platform in cxx_compiler and build_platform or'default']
-	test_for_compiler=' '.join(possible_compiler_list)
-	cxx_compiler_opts=opt.add_option_group('C++ Compiler Options')
-	cxx_compiler_opts.add_option('--check-cxx-compiler',default="%s"%test_for_compiler,help='On this platform (%s) the following C++ Compiler will be checked by default: "%s"'%(build_platform,test_for_compiler),dest="check_cxx_compiler")
-	for x in test_for_compiler.split():
-		opt.load('%s'%x)
diff --git a/waflib/Tools/compiler_d.py b/waflib/Tools/compiler_d.py
deleted file mode 100644
index b5396b0..0000000
--- a/waflib/Tools/compiler_d.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,sys,imp,types
-from waflib import Utils,Configure,Options,Logs
-def configure(conf):
-	for compiler in conf.options.dcheck.split(','):
-		conf.env.stash()
-		conf.start_msg('Checking for %r (d compiler)'%compiler)
-		try:
-			conf.load(compiler)
-		except conf.errors.ConfigurationError ,e:
-			conf.env.revert()
-			conf.end_msg(False)
-			Logs.debug('compiler_cxx: %r'%e)
-		else:
-			if conf.env.D:
-				conf.end_msg(conf.env.get_flat('D'))
-				conf.env['COMPILER_D']=compiler
-				conf.env.D_COMPILER=conf.env.D
-				break
-			conf.end_msg(False)
-	else:
-		conf.fatal('no suitable d compiler was found')
-def options(opt):
-	d_compiler_opts=opt.add_option_group('D Compiler Options')
-	d_compiler_opts.add_option('--check-d-compiler',default='gdc,dmd',action='store',help='check for the compiler [Default:gdc,dmd]',dest='dcheck')
-	for d_compiler in['gdc','dmd']:
-		opt.load('%s'%d_compiler)
diff --git a/waflib/Tools/compiler_fc.py b/waflib/Tools/compiler_fc.py
deleted file mode 100644
index f1f4068..0000000
--- a/waflib/Tools/compiler_fc.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,sys,imp,types
-from waflib import Utils,Configure,Options,Logs,Errors
-from waflib.Tools import fc
-fc_compiler={'win32':['gfortran','ifort'],'darwin':['gfortran','g95','ifort'],'linux':['gfortran','g95','ifort'],'java':['gfortran','g95','ifort'],'default':['gfortran'],'aix':['gfortran']}
-def __list_possible_compiler(platform):
-	try:
-		return fc_compiler[platform]
-	except KeyError:
-		return fc_compiler["default"]
-def configure(conf):
-	try:test_for_compiler=conf.options.check_fc
-	except AttributeError:conf.fatal("Add options(opt): opt.load('compiler_fc')")
-	orig=conf.env
-	for compiler in test_for_compiler.split():
-		try:
-			conf.start_msg('Checking for %r (fortran compiler)'%compiler)
-			conf.env=orig.derive()
-			conf.load(compiler)
-		except conf.errors.ConfigurationError ,e:
-			conf.end_msg(False)
-			Logs.debug('compiler_fortran: %r'%e)
-		else:
-			if conf.env['FC']:
-				orig.table=conf.env.get_merged_dict()
-				conf.env=orig
-				conf.end_msg(conf.env.get_flat('FC'))
-				conf.env.COMPILER_FORTRAN=compiler
-				break
-			conf.end_msg(False)
-	else:
-		conf.fatal('could not configure a fortran compiler!')
-def options(opt):
-	opt.load_special_tools('fc_*.py')
-	build_platform=Utils.unversioned_sys_platform()
-	detected_platform=Options.platform
-	possible_compiler_list=__list_possible_compiler(detected_platform)
-	test_for_compiler=' '.join(possible_compiler_list)
-	fortran_compiler_opts=opt.add_option_group("Fortran Compiler Options")
-	fortran_compiler_opts.add_option('--check-fortran-compiler',default="%s"%test_for_compiler,help='On this platform (%s) the following Fortran Compiler will be checked by default: "%s"'%(detected_platform,test_for_compiler),dest="check_fc")
-	for compiler in test_for_compiler.split():
-		opt.load('%s'%compiler)
diff --git a/waflib/Tools/cs.py b/waflib/Tools/cs.py
deleted file mode 100644
index 0fdf761..0000000
--- a/waflib/Tools/cs.py
+++ /dev/null
@@ -1,98 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import sys
-if sys.hexversion < 0x020400f0: from sets import Set as set
-from waflib import Utils,Task,Options,Logs,Errors
-from waflib.TaskGen import before_method,after_method,feature
-from waflib.Tools import ccroot
-from waflib.Configure import conf
-ccroot.USELIB_VARS['cs']=set(['CSFLAGS','ASSEMBLIES','RESOURCES'])
-ccroot.lib_patterns['csshlib']=['%s']
-def apply_cs(self):
-	cs_nodes=[]
-	no_nodes=[]
-	for x in self.to_nodes(self.source):
-		if x.name.endswith('.cs'):
-			cs_nodes.append(x)
-		else:
-			no_nodes.append(x)
-	self.source=no_nodes
-	bintype=getattr(self,'type',self.gen.endswith('.dll')and'library'or'exe')
-	self.cs_task=tsk=self.create_task('mcs',cs_nodes,self.path.find_or_declare(self.gen))
-	tsk.env.CSTYPE='/target:%s'%bintype
-	tsk.env.OUT='/out:%s'%tsk.outputs[0].abspath()
-	inst_to=getattr(self,'install_path',bintype=='exe'and'${BINDIR}'or'${LIBDIR}')
-	if inst_to:
-		mod=getattr(self,'chmod',bintype=='exe'and Utils.O755 or Utils.O644)
-		self.install_task=self.bld.install_files(inst_to,self.cs_task.outputs[:],env=self.env,chmod=mod)
-def use_cs(self):
-	names=self.to_list(getattr(self,'use',[]))
-	get=self.bld.get_tgen_by_name
-	for x in names:
-		try:
-			y=get(x)
-		except Errors.WafError:
-			self.cs_task.env.append_value('CSFLAGS','/reference:%s'%x)
-			continue
-		y.post()
-		tsk=getattr(y,'cs_task',None)or getattr(y,'link_task',None)
-		if not tsk:
-			self.bld.fatal('cs task has no link task for use %r'%self)
-		self.cs_task.dep_nodes.extend(tsk.outputs)
-		self.cs_task.set_run_after(tsk)
-		self.cs_task.env.append_value('CSFLAGS','/reference:%s'%tsk.outputs[0].abspath())
-def debug_cs(self):
-	csdebug=getattr(self,'csdebug',self.env.CSDEBUG)
-	if not csdebug:
-		return
-	node=self.cs_task.outputs[0]
-	if self.env.CS_NAME=='mono':
-		out=node.parent.find_or_declare(node.name+'.mdb')
-	else:
-		out=node.change_ext('.pdb')
-	self.cs_task.outputs.append(out)
-	try:
-		self.install_task.source.append(out)
-	except AttributeError:
-		pass
-	if csdebug=='pdbonly':
-		val=['/debug+','/debug:pdbonly']
-	elif csdebug=='full':
-		val=['/debug+','/debug:full']
-	else:
-		val=['/debug-']
-	self.cs_task.env.append_value('CSFLAGS',val)
-class mcs(Task.Task):
-	color='YELLOW'
-	run_str='${MCS} ${CSTYPE} ${CSFLAGS} ${ASS_ST:ASSEMBLIES} ${RES_ST:RESOURCES} ${OUT} ${SRC}'
-def configure(conf):
-	csc=getattr(Options.options,'cscbinary',None)
-	if csc:
-		conf.env.MCS=csc
-	conf.find_program(['csc','mcs','gmcs'],var='MCS')
-	conf.env.ASS_ST='/r:%s'
-	conf.env.RES_ST='/resource:%s'
-	conf.env.CS_NAME='csc'
-	if str(conf.env.MCS).lower().find('mcs')>-1:
-		conf.env.CS_NAME='mono'
-def options(opt):
-	opt.add_option('--with-csc-binary',type='string',dest='cscbinary')
-class fake_csshlib(Task.Task):
-	color='YELLOW'
-	inst_to=None
-	def runnable_status(self):
-		for x in self.outputs:
-			x.sig=Utils.h_file(x.abspath())
-		return Task.SKIP_ME
-def read_csshlib(self,name,paths=[]):
-	return self(name=name,features='fake_lib',lib_paths=paths,lib_type='csshlib')
-
-feature('cs')(apply_cs)
-before_method('process_source')(apply_cs)
-feature('cs')(use_cs)
-after_method('apply_cs')(use_cs)
-feature('cs')(debug_cs)
-after_method('apply_cs','use_cs')(debug_cs)
-conf(read_csshlib)
\ No newline at end of file
diff --git a/waflib/Tools/cxx.py b/waflib/Tools/cxx.py
deleted file mode 100644
index e378383..0000000
--- a/waflib/Tools/cxx.py
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-from waflib import TaskGen,Task,Utils
-from waflib.Tools import c_preproc
-from waflib.Tools.ccroot import link_task,stlink_task
-def cxx_hook(self,node):
-	return self.create_compiled_task('cxx',node)
-TaskGen.extension('.cpp','.cc','.cxx','.C','.c++')(cxx_hook)
-if not'.c'in TaskGen.task_gen.mappings:
-	TaskGen.task_gen.mappings['.c']=TaskGen.task_gen.mappings['.cpp']
-class cxx(Task.Task):
-	run_str='${CXX} ${ARCH_ST:ARCH} ${CXXFLAGS} ${CPPFLAGS} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${CXX_SRC_F}${SRC} ${CXX_TGT_F}${TGT}'
-	vars=['CXXDEPS']
-	ext_in=['.h']
-	scan=c_preproc.scan
-class cxxprogram(link_task):
-	run_str='${LINK_CXX} ${LINKFLAGS} ${CXXLNK_SRC_F}${SRC} ${CXXLNK_TGT_F}${TGT[0].abspath()} ${RPATH_ST:RPATH} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${FRAMEWORK_ST:FRAMEWORK} ${ARCH_ST:ARCH} ${STLIB_MARKER} ${STLIBPATH_ST:STLIBPATH} ${STLIB_ST:STLIB} ${SHLIB_MARKER} ${LIBPATH_ST:LIBPATH} ${LIB_ST:LIB}'
-	vars=['LINKDEPS']
-	ext_out=['.bin']
-	inst_to='${BINDIR}'
-	chmod=Utils.O755
-class cxxshlib(cxxprogram):
-	inst_to='${LIBDIR}'
-class cxxstlib(stlink_task):
-	pass
diff --git a/waflib/Tools/d.py b/waflib/Tools/d.py
deleted file mode 100644
index b1d401c..0000000
--- a/waflib/Tools/d.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,sys
-from waflib import Utils,Task,Errors
-from waflib.TaskGen import taskgen_method,feature,after_method,before_method,extension
-from waflib.Configure import conf
-from waflib.Tools.ccroot import link_task
-from waflib.Tools import d_scan,d_config
-from waflib.Tools.ccroot import link_task,stlink_task
-class d(Task.Task):
-	color='GREEN'
-	run_str='${D} ${DFLAGS} ${DINC_ST:INCPATHS} ${D_SRC_F:SRC} ${D_TGT_F:TGT}'
-	scan=d_scan.scan
-class d_with_header(d):
-	run_str='${D} ${DFLAGS} ${DINC_ST:INCPATHS} ${D_HDR_F:tgt.outputs[1].bldpath()} ${D_SRC_F:SRC} ${D_TGT_F:tgt.outputs[0].bldpath()}'
-class d_header(Task.Task):
-	color='BLUE'
-	run_str='${D} ${D_HEADER} ${SRC}'
-class dprogram(link_task):
-	run_str='${D_LINKER} ${LINKFLAGS} ${DLNK_SRC_F}${SRC} ${DLNK_TGT_F:TGT} ${RPATH_ST:RPATH} ${DSTLIB_MARKER} ${DSTLIBPATH_ST:STLIBPATH} ${DSTLIB_ST:STLIB} ${DSHLIB_MARKER} ${LIBPATH_ST:LIBPATH} ${DSHLIB_ST:LIB}'
-	inst_to='${BINDIR}'
-	chmod=Utils.O755
-class dshlib(dprogram):
-	inst_to='${LIBDIR}'
-class dstlib(stlink_task):
-	pass
-def d_hook(self,node):
-	if getattr(self,'generate_headers',None):
-		task=self.create_compiled_task('d_with_header',node)
-		header_node=node.change_ext(self.env['DHEADER_ext'])
-		task.outputs.append(header_node)
-	else:
-		task=self.create_compiled_task('d',node)
-	return task
-def generate_header(self,filename,install_path=None):
-	try:
-		self.header_lst.append([filename,install_path])
-	except AttributeError:
-		self.header_lst=[[filename,install_path]]
-def process_header(self):
-	for i in getattr(self,'header_lst',[]):
-		node=self.path.find_resource(i[0])
-		if not node:
-			raise Errors.WafError('file %r not found on d obj'%i[0])
-		self.create_task('d_header',node,node.change_ext('.di'))
-
-extension('.d','.di','.D')(d_hook)
-taskgen_method(generate_header)
-feature('d')(process_header)
\ No newline at end of file
diff --git a/waflib/Tools/d_config.py b/waflib/Tools/d_config.py
deleted file mode 100644
index a61ac80..0000000
--- a/waflib/Tools/d_config.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-from waflib import Utils
-from waflib.Configure import conf
-def d_platform_flags(self):
-	v=self.env
-	if not v.DEST_OS:
-		v.DEST_OS=Utils.unversioned_sys_platform()
-	if Utils.destos_to_binfmt(self.env.DEST_OS)=='pe':
-		v['dprogram_PATTERN']='%s.exe'
-		v['dshlib_PATTERN']='lib%s.dll'
-		v['dstlib_PATTERN']='lib%s.a'
-	else:
-		v['dprogram_PATTERN']='%s'
-		v['dshlib_PATTERN']='lib%s.so'
-		v['dstlib_PATTERN']='lib%s.a'
-DLIB='''
-version(D_Version2) {
-	import std.stdio;
-	int main() {
-		writefln("phobos2");
-		return 0;
-	}
-} else {
-	version(Tango) {
-		import tango.stdc.stdio;
-		int main() {
-			printf("tango");
-			return 0;
-		}
-	} else {
-		import std.stdio;
-		int main() {
-			writefln("phobos1");
-			return 0;
-		}
-	}
-}
-'''
-def check_dlibrary(self):
-	ret=self.check_cc(features='d dprogram',fragment=DLIB,compile_filename='test.d',execute=True,define_ret=True)
-	self.env.DLIBRARY=ret.strip()
-
-conf(d_platform_flags)
-conf(check_dlibrary)
\ No newline at end of file
diff --git a/waflib/Tools/d_scan.py b/waflib/Tools/d_scan.py
deleted file mode 100644
index ee80c5f..0000000
--- a/waflib/Tools/d_scan.py
+++ /dev/null
@@ -1,133 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import re
-from waflib import Utils,Logs
-def filter_comments(filename):
-	txt=Utils.readf(filename)
-	i=0
-	buf=[]
-	max=len(txt)
-	begin=0
-	while i<max:
-		c=txt[i]
-		if c=='"'or c=="'":
-			buf.append(txt[begin:i])
-			delim=c
-			i+=1
-			while i<max:
-				c=txt[i]
-				if c==delim:break
-				elif c=='\\':
-					i+=1
-				i+=1
-			i+=1
-			begin=i
-		elif c=='/':
-			buf.append(txt[begin:i])
-			i+=1
-			if i==max:break
-			c=txt[i]
-			if c=='+':
-				i+=1
-				nesting=1
-				c=None
-				while i<max:
-					prev=c
-					c=txt[i]
-					if prev=='/'and c=='+':
-						nesting+=1
-						c=None
-					elif prev=='+'and c=='/':
-						nesting-=1
-						if nesting==0:break
-						c=None
-					i+=1
-			elif c=='*':
-				i+=1
-				c=None
-				while i<max:
-					prev=c
-					c=txt[i]
-					if prev=='*'and c=='/':break
-					i+=1
-			elif c=='/':
-				i+=1
-				while i<max and txt[i]!='\n':
-					i+=1
-			else:
-				begin=i-1
-				continue
-			i+=1
-			begin=i
-			buf.append(' ')
-		else:
-			i+=1
-	buf.append(txt[begin:])
-	return buf
-class d_parser(object):
-	def __init__(self,env,incpaths):
-		self.allnames=[]
-		self.re_module=re.compile("module\s+([^;]+)")
-		self.re_import=re.compile("import\s+([^;]+)")
-		self.re_import_bindings=re.compile("([^:]+):(.*)")
-		self.re_import_alias=re.compile("[^=]+=(.+)")
-		self.env=env
-		self.nodes=[]
-		self.names=[]
-		self.incpaths=incpaths
-	def tryfind(self,filename):
-		found=0
-		for n in self.incpaths:
-			found=n.find_resource(filename.replace('.','/')+'.d')
-			if found:
-				self.nodes.append(found)
-				self.waiting.append(found)
-				break
-		if not found:
-			if not filename in self.names:
-				self.names.append(filename)
-	def get_strings(self,code):
-		self.module=''
-		lst=[]
-		mod_name=self.re_module.search(code)
-		if mod_name:
-			self.module=re.sub('\s+','',mod_name.group(1))
-		import_iterator=self.re_import.finditer(code)
-		if import_iterator:
-			for import_match in import_iterator:
-				import_match_str=re.sub('\s+','',import_match.group(1))
-				bindings_match=self.re_import_bindings.match(import_match_str)
-				if bindings_match:
-					import_match_str=bindings_match.group(1)
-				matches=import_match_str.split(',')
-				for match in matches:
-					alias_match=self.re_import_alias.match(match)
-					if alias_match:
-						match=alias_match.group(1)
-					lst.append(match)
-		return lst
-	def start(self,node):
-		self.waiting=[node]
-		while self.waiting:
-			nd=self.waiting.pop(0)
-			self.iter(nd)
-	def iter(self,node):
-		path=node.abspath()
-		code="".join(filter_comments(path))
-		names=self.get_strings(code)
-		for x in names:
-			if x in self.allnames:continue
-			self.allnames.append(x)
-			self.tryfind(x)
-def scan(self):
-	env=self.env
-	gruik=d_parser(env,self.generator.includes_nodes)
-	node=self.inputs[0]
-	gruik.start(node)
-	nodes=gruik.nodes
-	names=gruik.names
-	if Logs.verbose:
-		Logs.debug('deps: deps for %s: %r; unresolved %r'%(str(node),nodes,names))
-	return(nodes,names)
diff --git a/waflib/Tools/dbus.py b/waflib/Tools/dbus.py
deleted file mode 100644
index 9204da8..0000000
--- a/waflib/Tools/dbus.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-from waflib import Task,Errors
-from waflib.TaskGen import taskgen_method,before_method
-def add_dbus_file(self,filename,prefix,mode):
-	if not hasattr(self,'dbus_lst'):
-		self.dbus_lst=[]
-	if not'process_dbus'in self.meths:
-		self.meths.append('process_dbus')
-	self.dbus_lst.append([filename,prefix,mode])
-def process_dbus(self):
-	for filename,prefix,mode in getattr(self,'dbus_lst',[]):
-		node=self.path.find_resource(filename)
-		if not node:
-			raise Errors.WafError('file not found '+filename)
-		tsk=self.create_task('dbus_binding_tool',node,node.change_ext('.h'))
-		tsk.env.DBUS_BINDING_TOOL_PREFIX=prefix
-		tsk.env.DBUS_BINDING_TOOL_MODE=mode
-class dbus_binding_tool(Task.Task):
-	color='BLUE'
-	ext_out=['.h']
-	run_str='${DBUS_BINDING_TOOL} --prefix=${DBUS_BINDING_TOOL_PREFIX} --mode=${DBUS_BINDING_TOOL_MODE} --output=${TGT} ${SRC}'
-	shell=True
-def configure(conf):
-	dbus_binding_tool=conf.find_program('dbus-binding-tool',var='DBUS_BINDING_TOOL')
-
-taskgen_method(add_dbus_file)
-before_method('apply_core')(process_dbus)
\ No newline at end of file
diff --git a/waflib/Tools/dmd.py b/waflib/Tools/dmd.py
deleted file mode 100644
index e975ab9..0000000
--- a/waflib/Tools/dmd.py
+++ /dev/null
@@ -1,43 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import sys
-from waflib.Tools import ar,d
-from waflib.Configure import conf
-def find_dmd(conf):
-	conf.find_program(['dmd','ldc'],var='D')
-def common_flags_ldc(conf):
-	v=conf.env
-	v['DFLAGS']=['-d-version=Posix']
-	v['LINKFLAGS']=[]
-	v['DFLAGS_dshlib']=['-relocation-model=pic']
-def common_flags_dmd(conf):
-	v=conf.env
-	v['D_SRC_F']=['-c']
-	v['D_TGT_F']='-of%s'
-	v['D_LINKER']=v['D']
-	v['DLNK_SRC_F']=''
-	v['DLNK_TGT_F']='-of%s'
-	v['DINC_ST']='-I%s'
-	v['DSHLIB_MARKER']=v['DSTLIB_MARKER']=''
-	v['DSTLIB_ST']=v['DSHLIB_ST']='-L-l%s'
-	v['DSTLIBPATH_ST']=v['DLIBPATH_ST']='-L-L%s'
-	v['LINKFLAGS_dprogram']=['-quiet']
-	v['DFLAGS_dshlib']=['-fPIC']
-	v['LINKFLAGS_dshlib']=['-L-shared']
-	v['DHEADER_ext']='.di'
-	v.DFLAGS_d_with_header=['-H','-Hf']
-	v['D_HDR_F']='%s'
-def configure(conf):
-	conf.find_dmd()
-	conf.load('ar')
-	conf.load('d')
-	conf.common_flags_dmd()
-	conf.d_platform_flags()
-	if str(conf.env.D).find('ldc')>-1:
-		conf.common_flags_ldc()
-
-conf(find_dmd)
-conf(common_flags_ldc)
-conf(common_flags_dmd)
\ No newline at end of file
diff --git a/waflib/Tools/errcheck.py b/waflib/Tools/errcheck.py
deleted file mode 100644
index be50129..0000000
--- a/waflib/Tools/errcheck.py
+++ /dev/null
@@ -1,153 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import sys
-if sys.hexversion < 0x020400f0: from sets import Set as set
-typos={'feature':'features','sources':'source','targets':'target','include':'includes','export_include':'export_includes','define':'defines','importpath':'includes','installpath':'install_path',}
-meths_typos=['__call__','program','shlib','stlib','objects']
-from waflib import Logs,Build,Node,Task,TaskGen,ConfigSet,Errors,Utils
-import waflib.Tools.ccroot
-def check_same_targets(self):
-	mp=Utils.defaultdict(list)
-	uids={}
-	def check_task(tsk):
-		if not isinstance(tsk,Task.Task):
-			return
-		for node in tsk.outputs:
-			mp[node].append(tsk)
-		try:
-			uids[tsk.uid()].append(tsk)
-		except:
-			uids[tsk.uid()]=[tsk]
-	for g in self.groups:
-		for tg in g:
-			try:
-				for tsk in tg.tasks:
-					check_task(tsk)
-			except AttributeError:
-				check_task(tg)
-	dupe=False
-	for(k,v)in mp.items():
-		if len(v)>1:
-			dupe=True
-			msg='* Node %r is created by more than once%s. The task generators are:'%(k,Logs.verbose==1 and" (full message on 'waf -v -v')"or"")
-			Logs.error(msg)
-			for x in v:
-				if Logs.verbose>1:
-					Logs.error('  %d. %r'%(1+v.index(x),x.generator))
-				else:
-					Logs.error('  %d. %r in %r'%(1+v.index(x),x.generator.name,getattr(x.generator,'path',None)))
-	if not dupe:
-		for(k,v)in uids.items():
-			if len(v)>1:
-				Logs.error('* Several tasks use the same identifier. Please check the information on\n   http://waf.googlecode.com/git/docs/apidocs/Task.html#waflib.Task.Task.uid')
-				for tsk in v:
-					Logs.error('  - object %r (%r) defined in %r'%(tsk.__class__.__name__,tsk,tsk.generator))
-def check_invalid_constraints(self):
-	feat=set([])
-	for x in list(TaskGen.feats.values()):
-		feat.union(set(x))
-	for(x,y)in TaskGen.task_gen.prec.items():
-		feat.add(x)
-		feat.union(set(y))
-	ext=set([])
-	for x in TaskGen.task_gen.mappings.values():
-		ext.add(x.__name__)
-	invalid=ext&feat
-	if invalid:
-		Logs.error('The methods %r have invalid annotations:  @extension <-> @feature/@before_method/@after_method'%list(invalid))
-	for cls in list(Task.classes.values()):
-		for x in('before','after'):
-			for y in Utils.to_list(getattr(cls,x,[])):
-				if not Task.classes.get(y,None):
-					Logs.error('Erroneous order constraint %r=%r on task class %r'%(x,y,cls.__name__))
-def replace(m):
-	oldcall=getattr(Build.BuildContext,m)
-	def call(self,*k,**kw):
-		ret=oldcall(self,*k,**kw)
-		for x in typos:
-			if x in kw:
-				err=True
-				Logs.error('Fix the typo %r -> %r on %r'%(x,typos[x],ret))
-		return ret
-	setattr(Build.BuildContext,m,call)
-def enhance_lib():
-	for m in meths_typos:
-		replace(m)
-	old_ant_glob=Node.Node.ant_glob
-	def ant_glob(self,*k,**kw):
-		if k:
-			lst=Utils.to_list(k[0])
-			for pat in lst:
-				if'..'in pat.split('/'):
-					Logs.error("In ant_glob pattern %r: '..' means 'two dots', not 'parent directory'"%k[0])
-		return old_ant_glob(self,*k,**kw)
-	Node.Node.ant_glob=ant_glob
-	old=Task.is_before
-	def is_before(t1,t2):
-		ret=old(t1,t2)
-		if ret and old(t2,t1):
-			Logs.error('Contradictory order constraints in classes %r %r'%(t1,t2))
-		return ret
-	Task.is_before=is_before
-	def check_err_features(self):
-		lst=self.to_list(self.features)
-		if'shlib'in lst:
-			Logs.error('feature shlib -> cshlib, dshlib or cxxshlib')
-		for x in('c','cxx','d','fc'):
-			if not x in lst and lst and lst[0]in[x+y for y in('program','shlib','stlib')]:
-				Logs.error('%r features is probably missing %r'%(self,x))
-	TaskGen.feature('*')(check_err_features)
-	def check_err_order(self):
-		if not hasattr(self,'rule'):
-			for x in('before','after','ext_in','ext_out'):
-				if hasattr(self,x):
-					Logs.warn('Erroneous order constraint %r on non-rule based task generator %r'%(x,self))
-		else:
-			for x in('before','after'):
-				for y in self.to_list(getattr(self,x,[])):
-					if not Task.classes.get(y,None):
-						Logs.error('Erroneous order constraint %s=%r on %r'%(x,y,self))
-	TaskGen.feature('*')(check_err_order)
-	def check_compile(self):
-		check_invalid_constraints(self)
-		try:
-			ret=self.orig_compile()
-		finally:
-			check_same_targets(self)
-		return ret
-	Build.BuildContext.orig_compile=Build.BuildContext.compile
-	Build.BuildContext.compile=check_compile
-	def use_rec(self,name,**kw):
-		try:
-			y=self.bld.get_tgen_by_name(name)
-		except Errors.WafError:
-			pass
-		else:
-			idx=self.bld.get_group_idx(self)
-			odx=self.bld.get_group_idx(y)
-			if odx>idx:
-				msg="Invalid 'use' across build groups:"
-				if Logs.verbose>1:
-					msg+='\n  target %r\n  uses:\n  %r'%(self,y)
-				else:
-					msg+=" %r uses %r (try 'waf -v -v' for the full error)"%(self.name,name)
-				raise Errors.WafError(msg)
-		self.orig_use_rec(name,**kw)
-	TaskGen.task_gen.orig_use_rec=TaskGen.task_gen.use_rec
-	TaskGen.task_gen.use_rec=use_rec
-	def getattri(self,name,default=None):
-		if name=='append'or name=='add':
-			raise Errors.WafError('env.append and env.add do not exist: use env.append_value/env.append_unique')
-		elif name=='prepend':
-			raise Errors.WafError('env.prepend does not exist: use env.prepend_value')
-		if name in self.__slots__:
-			return object.__getattr__(self,name,default)
-		else:
-			return self[name]
-	ConfigSet.ConfigSet.__getattr__=getattri
-def options(opt):
-	enhance_lib()
-def configure(conf):
-	pass
diff --git a/waflib/Tools/fc.py b/waflib/Tools/fc.py
deleted file mode 100644
index 30b1b48..0000000
--- a/waflib/Tools/fc.py
+++ /dev/null
@@ -1,123 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import sys
-if sys.hexversion < 0x020400f0: from sets import Set as set
-import re
-from waflib import Utils,Task,TaskGen,Logs
-from waflib.Tools import ccroot,fc_config,fc_scan
-from waflib.TaskGen import feature,before_method,after_method,extension
-from waflib.Configure import conf
-ccroot.USELIB_VARS['fc']=set(['FCFLAGS','DEFINES','INCLUDES'])
-ccroot.USELIB_VARS['fcprogram_test']=ccroot.USELIB_VARS['fcprogram']=set(['LIB','STLIB','LIBPATH','STLIBPATH','LINKFLAGS','RPATH','LINKDEPS'])
-ccroot.USELIB_VARS['fcshlib']=set(['LIB','STLIB','LIBPATH','STLIBPATH','LINKFLAGS','RPATH','LINKDEPS'])
-ccroot.USELIB_VARS['fcstlib']=set(['ARFLAGS','LINKDEPS'])
-def dummy(self):
-	pass
-def fc_hook(self,node):
-	return self.create_compiled_task('fc',node)
-def modfile(conf,name):
-	return{'lower':name.lower()+'.mod','lower.MOD':name.upper()+'.MOD','UPPER.mod':name.upper()+'.mod','UPPER':name.upper()+'.MOD'}[conf.env.FC_MOD_CAPITALIZATION or'lower']
-def get_fortran_tasks(tsk):
-	bld=tsk.generator.bld
-	tasks=bld.get_tasks_group(bld.get_group_idx(tsk.generator))
-	return[x for x in tasks if isinstance(x,fc)and not getattr(x,'nomod',None)and not getattr(x,'mod_fortran_done',None)]
-class fc(Task.Task):
-	color='GREEN'
-	run_str='${FC} ${FCFLAGS} ${FCINCPATH_ST:INCPATHS} ${FCDEFINES_ST:DEFINES} ${_FCMODOUTFLAGS} ${FC_TGT_F}${TGT[0].abspath()} ${FC_SRC_F}${SRC[0].abspath()}'
-	vars=["FORTRANMODPATHFLAG"]
-	def scan(self):
-		tmp=fc_scan.fortran_parser(self.generator.includes_nodes)
-		tmp.task=self
-		tmp.start(self.inputs[0])
-		if Logs.verbose:
-			Logs.debug('deps: deps for %r: %r; unresolved %r'%(self.inputs,tmp.nodes,tmp.names))
-		return(tmp.nodes,tmp.names)
-	def runnable_status(self):
-		if getattr(self,'mod_fortran_done',None):
-			return super(fc,self).runnable_status()
-		bld=self.generator.bld
-		lst=get_fortran_tasks(self)
-		for tsk in lst:
-			tsk.mod_fortran_done=True
-		for tsk in lst:
-			ret=tsk.runnable_status()
-			if ret==Task.ASK_LATER:
-				for x in lst:
-					x.mod_fortran_done=None
-				return Task.ASK_LATER
-		ins=Utils.defaultdict(set)
-		outs=Utils.defaultdict(set)
-		for tsk in lst:
-			key=tsk.uid()
-			for x in bld.raw_deps[key]:
-				if x.startswith('MOD@'):
-					name=bld.modfile(x.replace('MOD@',''))
-					node=bld.srcnode.find_or_declare(name)
-					tsk.set_outputs(node)
-					outs[id(node)].add(tsk)
-		for tsk in lst:
-			key=tsk.uid()
-			for x in bld.raw_deps[key]:
-				if x.startswith('USE@'):
-					name=bld.modfile(x.replace('USE@',''))
-					node=bld.srcnode.find_resource(name)
-					if node and node not in tsk.outputs:
-						if not node in bld.node_deps[key]:
-							bld.node_deps[key].append(node)
-						ins[id(node)].add(tsk)
-		for k in ins.keys():
-			for a in ins[k]:
-				a.run_after.update(outs[k])
-				tmp=[]
-				for t in outs[k]:
-					tmp.extend(t.outputs)
-				a.dep_nodes.extend(tmp)
-				try:
-					a.dep_nodes.sort(key=lambda x:x.abspath())
-				except:
-					a.dep_nodes.sort(lambda x,y:cmp(x.abspath(),y.abspath()))
-		for tsk in lst:
-			try:
-				delattr(tsk,'cache_sig')
-			except AttributeError:
-				pass
-		return super(fc,self).runnable_status()
-class fcprogram(ccroot.link_task):
-	color='YELLOW'
-	run_str='${FC} ${LINKFLAGS} ${FCLNK_SRC_F}${SRC} ${FCLNK_TGT_F}${TGT[0].abspath()} ${RPATH_ST:RPATH} ${FCSTLIB_MARKER} ${FCSTLIBPATH_ST:STLIBPATH} ${FCSTLIB_ST:STLIB} ${FCSHLIB_MARKER} ${FCLIBPATH_ST:LIBPATH} ${FCLIB_ST:LIB}'
-	inst_to='${BINDIR}'
-	chmod=Utils.O755
-class fcshlib(fcprogram):
-	inst_to='${LIBDIR}'
-class fcprogram_test(fcprogram):
-	def can_retrieve_cache(self):
-		return False
-	def runnable_status(self):
-		ret=super(fcprogram_test,self).runnable_status()
-		if ret==Task.SKIP_ME:
-			ret=Task.RUN_ME
-		return ret
-	def exec_command(self,cmd,**kw):
-		bld=self.generator.bld
-		kw['shell']=isinstance(cmd,str)
-		kw['stdout']=kw['stderr']=Utils.subprocess.PIPE
-		kw['cwd']=bld.variant_dir
-		bld.out=bld.err=''
-		bld.to_log('command: %s\n'%cmd)
-		kw['output']=0
-		try:
-			(bld.out,bld.err)=bld.cmd_and_log(cmd,**kw)
-		except Exception ,e:
-			return-1
-		if bld.out:
-			bld.to_log("out: %s\n"%bld.out)
-		if bld.err:
-			bld.to_log("err: %s\n"%bld.err)
-class fcstlib(ccroot.stlink_task):
-	pass
-
-feature('fcprogram','fcshlib','fcstlib','fcprogram_test')(dummy)
-extension('.f','.f90','.F','.F90','.for','.FOR')(fc_hook)
-conf(modfile)
\ No newline at end of file
diff --git a/waflib/Tools/fc_config.py b/waflib/Tools/fc_config.py
deleted file mode 100644
index 1a33916..0000000
--- a/waflib/Tools/fc_config.py
+++ /dev/null
@@ -1,271 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import re,shutil,os,sys,string,shlex
-from waflib.Configure import conf
-from waflib.TaskGen import feature,after_method,before_method
-from waflib import Build,Utils
-FC_FRAGMENT='        program main\n        end     program main\n'
-FC_FRAGMENT2='        PROGRAM MAIN\n        END\n'
-def fc_flags(conf):
-	v=conf.env
-	v['FC_SRC_F']=[]
-	v['FC_TGT_F']=['-c','-o']
-	v['FCINCPATH_ST']='-I%s'
-	v['FCDEFINES_ST']='-D%s'
-	if not v['LINK_FC']:v['LINK_FC']=v['FC']
-	v['FCLNK_SRC_F']=[]
-	v['FCLNK_TGT_F']=['-o']
-	v['FCFLAGS_fcshlib']=['-fpic']
-	v['LINKFLAGS_fcshlib']=['-shared']
-	v['fcshlib_PATTERN']='lib%s.so'
-	v['fcstlib_PATTERN']='lib%s.a'
-	v['FCLIB_ST']='-l%s'
-	v['FCLIBPATH_ST']='-L%s'
-	v['FCSTLIB_ST']='-l%s'
-	v['FCSTLIBPATH_ST']='-L%s'
-	v['FCSTLIB_MARKER']='-Wl,-Bstatic'
-	v['FCSHLIB_MARKER']='-Wl,-Bdynamic'
-	v['SONAME_ST']='-Wl,-h,%s'
-def check_fortran(self,*k,**kw):
-	self.check_cc(fragment=FC_FRAGMENT,compile_filename='test.f',features='fc fcprogram',msg='Compiling a simple fortran app')
-def check_fc(self,*k,**kw):
-	kw['compiler']='fc'
-	if not'compile_mode'in kw:
-		kw['compile_mode']='fc'
-	if not'type'in kw:
-		kw['type']='fcprogram'
-	if not'compile_filename'in kw:
-		kw['compile_filename']='test.f90'
-	if not'code'in kw:
-		kw['code']=FC_FRAGMENT
-	return self.check(*k,**kw)
-def fortran_modifier_darwin(conf):
-	v=conf.env
-	v['FCFLAGS_fcshlib']=['-fPIC','-compatibility_version','1','-current_version','1']
-	v['LINKFLAGS_fcshlib']=['-dynamiclib']
-	v['fcshlib_PATTERN']='lib%s.dylib'
-	v['FRAMEWORKPATH_ST']='-F%s'
-	v['FRAMEWORK_ST']='-framework %s'
-	v['LINKFLAGS_fcstlib']=[]
-	v['FCSHLIB_MARKER']=''
-	v['FCSTLIB_MARKER']=''
-	v['SONAME_ST']=''
-def fortran_modifier_win32(conf):
-	v=conf.env
-	v['fcprogram_PATTERN']=v['fcprogram_test_PATTERN']='%s.exe'
-	v['fcshlib_PATTERN']='%s.dll'
-	v['implib_PATTERN']='lib%s.dll.a'
-	v['IMPLIB_ST']='-Wl,--out-implib,%s'
-	v['FCFLAGS_fcshlib']=[]
-	v.append_value('FCFLAGS_fcshlib',['-DDLL_EXPORT'])
-	v.append_value('LINKFLAGS',['-Wl,--enable-auto-import'])
-def fortran_modifier_cygwin(conf):
-	fortran_modifier_win32(conf)
-	v=conf.env
-	v['fcshlib_PATTERN']='cyg%s.dll'
-	v.append_value('LINKFLAGS_fcshlib',['-Wl,--enable-auto-image-base'])
-	v['FCFLAGS_fcshlib']=[]
-def check_fortran_dummy_main(self,*k,**kw):
-	if not self.env.CC:
-		self.fatal('A c compiler is required for check_fortran_dummy_main')
-	lst=['MAIN__','__MAIN','_MAIN','MAIN_','MAIN']
-	lst.extend([m.lower()for m in lst])
-	lst.append('')
-	self.start_msg('Detecting whether we need a dummy main')
-	for main in lst:
-		kw['fortran_main']=main
-		try:
-			self.check_cc(fragment='int %s() { return 0; }\n'%(main or'test'),features='c fcprogram',mandatory=True)
-			if not main:
-				self.env.FC_MAIN=-1
-				self.end_msg('no')
-			else:
-				self.env.FC_MAIN=main
-				self.end_msg('yes %s'%main)
-			break
-		except self.errors.ConfigurationError:
-			pass
-	else:
-		self.end_msg('not found')
-		self.fatal('could not detect whether fortran requires a dummy main, see the config.log')
-GCC_DRIVER_LINE=re.compile('^Driving:')
-POSIX_STATIC_EXT=re.compile('\S+\.a')
-POSIX_LIB_FLAGS=re.compile('-l\S+')
-def is_link_verbose(self,txt):
-	assert isinstance(txt,str)
-	for line in txt.splitlines():
-		if not GCC_DRIVER_LINE.search(line):
-			if POSIX_STATIC_EXT.search(line)or POSIX_LIB_FLAGS.search(line):
-				return True
-	return False
-def check_fortran_verbose_flag(self,*k,**kw):
-	self.start_msg('fortran link verbose flag')
-	for x in['-v','--verbose','-verbose','-V']:
-		try:
-			self.check_cc(features='fc fcprogram_test',fragment=FC_FRAGMENT2,compile_filename='test.f',linkflags=[x],mandatory=True)
-		except self.errors.ConfigurationError:
-			pass
-		else:
-			if self.is_link_verbose(self.test_bld.err)or self.is_link_verbose(self.test_bld.out):
-				self.end_msg(x)
-				break
-	else:
-		self.end_msg('failure')
-		self.fatal('Could not obtain the fortran link verbose flag (see config.log)')
-	self.env.FC_VERBOSE_FLAG=x
-	return x
-LINKFLAGS_IGNORED=[r'-lang*',r'-lcrt[a-zA-Z0-9\.]*\.o',r'-lc$',r'-lSystem',r'-libmil',r'-LIST:*',r'-LNO:*']
-if os.name=='nt':
-	LINKFLAGS_IGNORED.extend([r'-lfrt*',r'-luser32',r'-lkernel32',r'-ladvapi32',r'-lmsvcrt',r'-lshell32',r'-lmingw',r'-lmoldname'])
-else:
-	LINKFLAGS_IGNORED.append(r'-lgcc*')
-RLINKFLAGS_IGNORED=[re.compile(f)for f in LINKFLAGS_IGNORED]
-def _match_ignore(line):
-	for i in RLINKFLAGS_IGNORED:
-		if i.match(line):
-			return True
-	return False
-def parse_fortran_link(lines):
-	final_flags=[]
-	for line in lines:
-		if not GCC_DRIVER_LINE.match(line):
-			_parse_flink_line(line,final_flags)
-	return final_flags
-SPACE_OPTS=re.compile('^-[LRuYz]$')
-NOSPACE_OPTS=re.compile('^-[RL]')
-def _parse_flink_line(line,final_flags):
-	lexer=shlex.shlex(line,posix=True)
-	lexer.whitespace_split=True
-	t=lexer.get_token()
-	tmp_flags=[]
-	while t:
-		def parse(token):
-			if _match_ignore(token):
-				pass
-			elif token.startswith('-lkernel32')and sys.platform=='cygwin':
-				tmp_flags.append(token)
-			elif SPACE_OPTS.match(token):
-				t=lexer.get_token()
-				if t.startswith('P,'):
-					t=t[2:]
-				for opt in t.split(os.pathsep):
-					tmp_flags.append('-L%s'%opt)
-			elif NOSPACE_OPTS.match(token):
-				tmp_flags.append(token)
-			elif POSIX_LIB_FLAGS.match(token):
-				tmp_flags.append(token)
-			else:
-				pass
-			t=lexer.get_token()
-			return t
-		t=parse(t)
-	final_flags.extend(tmp_flags)
-	return final_flags
-def check_fortran_clib(self,autoadd=True,*k,**kw):
-	if not self.env.FC_VERBOSE_FLAG:
-		self.fatal('env.FC_VERBOSE_FLAG is not set: execute check_fortran_verbose_flag?')
-	self.start_msg('Getting fortran runtime link flags')
-	try:
-		self.check_cc(fragment=FC_FRAGMENT2,compile_filename='test.f',features='fc fcprogram_test',linkflags=[self.env.FC_VERBOSE_FLAG])
-	except:
-		self.end_msg(False)
-		if kw.get('mandatory',True):
-			conf.fatal('Could not find the c library flags')
-	else:
-		out=self.test_bld.err
-		flags=parse_fortran_link(out.splitlines())
-		self.end_msg('ok (%s)'%' '.join(flags))
-		self.env.LINKFLAGS_CLIB=flags
-		return flags
-	return[]
-def getoutput(conf,cmd,stdin=False):
-	try:
-		if stdin:
-			stdin=Utils.subprocess.PIPE
-		else:
-			stdin=None
-		p=Utils.subprocess.Popen(cmd,stdin=stdin,stdout=Utils.subprocess.PIPE,stderr=Utils.subprocess.PIPE)
-		if stdin:
-			p.stdin.write('\n')
-		stdout,stderr=p.communicate()
-	except:
-		conf.fatal('could not determine the compiler version %r'%cmd)
-	else:
-		if not isinstance(stdout,str):
-			stdout=stdout.decode(sys.stdout.encoding)
-		if not isinstance(stderr,str):
-			stderr=stderr.decode(sys.stdout.encoding)
-		return stdout,stderr
-ROUTINES_CODE="""\
-      subroutine foobar()
-      return
-      end
-      subroutine foo_bar()
-      return
-      end
-"""
-MAIN_CODE="""
-void %(dummy_func_nounder)s(void);
-void %(dummy_func_under)s(void);
-int %(main_func_name)s() {
-  %(dummy_func_nounder)s();
-  %(dummy_func_under)s();
-  return 0;
-}
-"""
-def link_main_routines_tg_method(self):
-	def write_test_file(task):
-		task.outputs[0].write(task.generator.code)
-	bld=self.bld
-	bld(rule=write_test_file,target='main.c',code=MAIN_CODE%self.__dict__)
-	bld(rule=write_test_file,target='test.f',code=ROUTINES_CODE)
-	bld(features='fc fcstlib',source='test.f',target='test')
-	bld(features='c fcprogram',source='main.c',target='app',use='test')
-def mangling_schemes():
-	for u in['_','']:
-		for du in['','_']:
-			for c in["lower","upper"]:
-				yield(u,du,c)
-def mangle_name(u,du,c,name):
-	return getattr(name,c)()+u+(name.find('_')!=-1 and du or'')
-def check_fortran_mangling(self,*k,**kw):
-	if not self.env.CC:
-		self.fatal('A c compiler is required for link_main_routines')
-	if not self.env.FC:
-		self.fatal('A fortran compiler is required for link_main_routines')
-	if not self.env.FC_MAIN:
-		self.fatal('Checking for mangling requires self.env.FC_MAIN (execute "check_fortran_dummy_main" first?)')
-	self.start_msg('Getting fortran mangling scheme')
-	for(u,du,c)in mangling_schemes():
-		try:
-			self.check_cc(compile_filename=[],features='link_main_routines_func',msg='nomsg',errmsg='nomsg',mandatory=True,dummy_func_nounder=mangle_name(u,du,c,"foobar"),dummy_func_under=mangle_name(u,du,c,"foo_bar"),main_func_name=self.env.FC_MAIN)
-		except self.errors.ConfigurationError:
-			pass
-		else:
-			self.end_msg("ok ('%s', '%s', '%s-case')"%(u,du,c))
-			self.env.FORTRAN_MANGLING=(u,du,c)
-			break
-	else:
-		self.end_msg(False)
-		self.fatal('mangler not found')
-	return(u,du,c)
-def set_lib_pat(self):
-	self.env['fcshlib_PATTERN']=self.env['pyext_PATTERN']
-
-conf(fc_flags)
-conf(check_fortran)
-conf(check_fc)
-conf(fortran_modifier_darwin)
-conf(fortran_modifier_win32)
-conf(fortran_modifier_cygwin)
-conf(check_fortran_dummy_main)
-conf(is_link_verbose)
-conf(check_fortran_verbose_flag)
-conf(check_fortran_clib)
-feature('link_main_routines_func')(link_main_routines_tg_method)
-before_method('process_source')(link_main_routines_tg_method)
-conf(check_fortran_mangling)
-feature('pyext')(set_lib_pat)
-before_method('propagate_uselib_vars','apply_link')(set_lib_pat)
\ No newline at end of file
diff --git a/waflib/Tools/fc_scan.py b/waflib/Tools/fc_scan.py
deleted file mode 100644
index 48e06b5..0000000
--- a/waflib/Tools/fc_scan.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import re
-from waflib import Utils,Task,TaskGen,Logs
-from waflib.TaskGen import feature,before_method,after_method,extension
-from waflib.Configure import conf
-INC_REGEX="""(?:^|['">]\s*;)\s*INCLUDE\s+(?:\w+_)?[<"'](.+?)(?=["'>])"""
-USE_REGEX="""(?:^|;)\s*USE(?:\s+|(?:(?:\s*,\s*(?:NON_)?INTRINSIC)?\s*::))\s*(\w+)"""
-MOD_REGEX="""(?:^|;)\s*MODULE(?!\s*PROCEDURE)(?:\s+|(?:(?:\s*,\s*(?:NON_)?INTRINSIC)?\s*::))\s*(\w+)"""
-re_inc=re.compile(INC_REGEX,re.I)
-re_use=re.compile(USE_REGEX,re.I)
-re_mod=re.compile(MOD_REGEX,re.I)
-class fortran_parser(object):
-	def __init__(self,incpaths):
-		self.seen=[]
-		self.nodes=[]
-		self.names=[]
-		self.incpaths=incpaths
-	def find_deps(self,node):
-		txt=node.read()
-		incs=[]
-		uses=[]
-		mods=[]
-		for line in txt.splitlines():
-			m=re_inc.search(line)
-			if m:
-				incs.append(m.group(1))
-			m=re_use.search(line)
-			if m:
-				uses.append(m.group(1))
-			m=re_mod.search(line)
-			if m:
-				mods.append(m.group(1))
-		return(incs,uses,mods)
-	def start(self,node):
-		self.waiting=[node]
-		while self.waiting:
-			nd=self.waiting.pop(0)
-			self.iter(nd)
-	def iter(self,node):
-		path=node.abspath()
-		incs,uses,mods=self.find_deps(node)
-		for x in incs:
-			if x in self.seen:
-				continue
-			self.seen.append(x)
-			self.tryfind_header(x)
-		for x in uses:
-			name="USE@%s"%x
-			if not name in self.names:
-				self.names.append(name)
-		for x in mods:
-			name="MOD@%s"%x
-			if not name in self.names:
-				self.names.append(name)
-	def tryfind_header(self,filename):
-		found=None
-		for n in self.incpaths:
-			found=n.find_resource(filename)
-			if found:
-				self.nodes.append(found)
-				self.waiting.append(found)
-				break
-		if not found:
-			if not filename in self.names:
-				self.names.append(filename)
diff --git a/waflib/Tools/flex.py b/waflib/Tools/flex.py
deleted file mode 100644
index d5f4367..0000000
--- a/waflib/Tools/flex.py
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import waflib.TaskGen
-def decide_ext(self,node):
-	if'cxx'in self.features:
-		return['.lex.cc']
-	return['.lex.c']
-def flexfun(tsk):
-	env=tsk.env
-	bld=tsk.generator.bld
-	wd=bld.variant_dir
-	def to_list(xx):
-		if isinstance(xx,str):return[xx]
-		return xx
-	tsk.last_cmd=lst=[]
-	lst.extend(to_list(env['FLEX']))
-	lst.extend(to_list(env['FLEXFLAGS']))
-	lst.extend([a.path_from(bld.bldnode)for a in tsk.inputs])
-	lst=[x for x in lst if x]
-	txt=bld.cmd_and_log(lst,cwd=wd,env=env.env or None,quiet=0)
-	tsk.outputs[0].write(txt)
-waflib.TaskGen.declare_chain(name='flex',rule=flexfun,ext_in='.l',decider=decide_ext,)
-def configure(conf):
-	conf.find_program('flex',var='FLEX')
-	conf.env.FLEXFLAGS=['-t']
diff --git a/waflib/Tools/g95.py b/waflib/Tools/g95.py
deleted file mode 100644
index a2bb542..0000000
--- a/waflib/Tools/g95.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import re
-from waflib import Utils
-from waflib.Tools import fc,fc_config,fc_scan
-from waflib.Configure import conf
-def find_g95(conf):
-	fc=conf.find_program('g95',var='FC')
-	fc=conf.cmd_to_list(fc)
-	conf.get_g95_version(fc)
-	conf.env.FC_NAME='G95'
-def g95_flags(conf):
-	v=conf.env
-	v['FCFLAGS_fcshlib']=['-fPIC']
-	v['FORTRANMODFLAG']=['-fmod=','']
-	v['FCFLAGS_DEBUG']=['-Werror']
-def g95_modifier_win32(conf):
-	fc_config.fortran_modifier_win32(conf)
-def g95_modifier_cygwin(conf):
-	fc_config.fortran_modifier_cygwin(conf)
-def g95_modifier_darwin(conf):
-	fc_config.fortran_modifier_darwin(conf)
-def g95_modifier_platform(conf):
-	dest_os=conf.env['DEST_OS']or Utils.unversioned_sys_platform()
-	g95_modifier_func=getattr(conf,'g95_modifier_'+dest_os,None)
-	if g95_modifier_func:
-		g95_modifier_func()
-def get_g95_version(conf,fc):
-	version_re=re.compile(r"g95\s*(?P<major>\d*)\.(?P<minor>\d*)").search
-	cmd=fc+['--version']
-	out,err=fc_config.getoutput(conf,cmd,stdin=False)
-	if out:
-		match=version_re(out)
-	else:
-		match=version_re(err)
-	if not match:
-		conf.fatal('cannot determine g95 version')
-	k=match.groupdict()
-	conf.env['FC_VERSION']=(k['major'],k['minor'])
-def configure(conf):
-	conf.find_g95()
-	conf.find_ar()
-	conf.fc_flags()
-	conf.g95_flags()
-	conf.g95_modifier_platform()
-
-conf(find_g95)
-conf(g95_flags)
-conf(g95_modifier_win32)
-conf(g95_modifier_cygwin)
-conf(g95_modifier_darwin)
-conf(g95_modifier_platform)
-conf(get_g95_version)
\ No newline at end of file
diff --git a/waflib/Tools/gas.py b/waflib/Tools/gas.py
deleted file mode 100644
index 73e3294..0000000
--- a/waflib/Tools/gas.py
+++ /dev/null
@@ -1,10 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import waflib.Tools.asm
-from waflib.Tools import ar
-def configure(conf):
-	conf.find_program(['gas','as','gcc'],var='AS')
-	conf.env.AS_TGT_F='-o'
-	conf.find_ar()
diff --git a/waflib/Tools/gcc.py b/waflib/Tools/gcc.py
deleted file mode 100644
index 5734b76..0000000
--- a/waflib/Tools/gcc.py
+++ /dev/null
@@ -1,98 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,sys
-from waflib import Configure,Options,Utils
-from waflib.Tools import ccroot,ar
-from waflib.Configure import conf
-def find_gcc(conf):
-	cc=conf.find_program(['gcc','cc'],var='CC')
-	cc=conf.cmd_to_list(cc)
-	conf.get_cc_version(cc,gcc=True)
-	conf.env.CC_NAME='gcc'
-	conf.env.CC=cc
-def gcc_common_flags(conf):
-	v=conf.env
-	v['CC_SRC_F']=[]
-	v['CC_TGT_F']=['-c','-o']
-	if not v['LINK_CC']:v['LINK_CC']=v['CC']
-	v['CCLNK_SRC_F']=[]
-	v['CCLNK_TGT_F']=['-o']
-	v['CPPPATH_ST']='-I%s'
-	v['DEFINES_ST']='-D%s'
-	v['LIB_ST']='-l%s'
-	v['LIBPATH_ST']='-L%s'
-	v['STLIB_ST']='-l%s'
-	v['STLIBPATH_ST']='-L%s'
-	v['RPATH_ST']='-Wl,-rpath,%s'
-	v['SONAME_ST']='-Wl,-h,%s'
-	v['SHLIB_MARKER']='-Wl,-Bdynamic'
-	v['STLIB_MARKER']='-Wl,-Bstatic'
-	v['cprogram_PATTERN']='%s'
-	v['CFLAGS_cshlib']=['-fPIC']
-	v['LINKFLAGS_cshlib']=['-shared']
-	v['cshlib_PATTERN']='lib%s.so'
-	v['LINKFLAGS_cstlib']=['-Wl,-Bstatic']
-	v['cstlib_PATTERN']='lib%s.a'
-	v['LINKFLAGS_MACBUNDLE']=['-bundle','-undefined','dynamic_lookup']
-	v['CFLAGS_MACBUNDLE']=['-fPIC']
-	v['macbundle_PATTERN']='%s.bundle'
-def gcc_modifier_win32(conf):
-	v=conf.env
-	v['cprogram_PATTERN']='%s.exe'
-	v['cshlib_PATTERN']='%s.dll'
-	v['implib_PATTERN']='lib%s.dll.a'
-	v['IMPLIB_ST']='-Wl,--out-implib,%s'
-	v['CFLAGS_cshlib']=[]
-	v.append_value('CFLAGS_cshlib',['-DDLL_EXPORT'])
-	v.append_value('LINKFLAGS',['-Wl,--enable-auto-import'])
-def gcc_modifier_cygwin(conf):
-	gcc_modifier_win32(conf)
-	v=conf.env
-	v['cshlib_PATTERN']='cyg%s.dll'
-	v.append_value('LINKFLAGS_cshlib',['-Wl,--enable-auto-image-base'])
-	v['CFLAGS_cshlib']=[]
-def gcc_modifier_darwin(conf):
-	v=conf.env
-	v['CFLAGS_cshlib']=['-fPIC','-compatibility_version','1','-current_version','1']
-	v['LINKFLAGS_cshlib']=['-dynamiclib']
-	v['cshlib_PATTERN']='lib%s.dylib'
-	v['FRAMEWORKPATH_ST']='-F%s'
-	v['FRAMEWORK_ST']=['-framework']
-	v['ARCH_ST']=['-arch']
-	v['LINKFLAGS_cstlib']=[]
-	v['SHLIB_MARKER']=[]
-	v['STLIB_MARKER']=[]
-	v['SONAME_ST']=[]
-def gcc_modifier_aix(conf):
-	v=conf.env
-	v['LINKFLAGS_cprogram']=['-Wl,-brtl']
-	v['LINKFLAGS_cshlib']=['-shared','-Wl,-brtl,-bexpfull']
-	v['SHLIB_MARKER']=[]
-def gcc_modifier_hpux(conf):
-	v=conf.env
-	v['SHLIB_MARKER']=[]
-	v['CFLAGS_cshlib']=['-fPIC','-DPIC']
-	v['cshlib_PATTERN']='lib%s.sl'
-def gcc_modifier_platform(conf):
-	gcc_modifier_func=getattr(conf,'gcc_modifier_'+conf.env.DEST_OS,None)
-	if gcc_modifier_func:
-		gcc_modifier_func()
-def configure(conf):
-	conf.find_gcc()
-	conf.find_ar()
-	conf.gcc_common_flags()
-	conf.gcc_modifier_platform()
-	conf.cc_load_tools()
-	conf.cc_add_flags()
-	conf.link_add_flags()
-
-conf(find_gcc)
-conf(gcc_common_flags)
-conf(gcc_modifier_win32)
-conf(gcc_modifier_cygwin)
-conf(gcc_modifier_darwin)
-conf(gcc_modifier_aix)
-conf(gcc_modifier_hpux)
-conf(gcc_modifier_platform)
\ No newline at end of file
diff --git a/waflib/Tools/gdc.py b/waflib/Tools/gdc.py
deleted file mode 100644
index ff8a8ab..0000000
--- a/waflib/Tools/gdc.py
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import sys
-from waflib.Tools import ar,d
-from waflib.Configure import conf
-def find_gdc(conf):
-	conf.find_program('gdc',var='D')
-def common_flags_gdc(conf):
-	v=conf.env
-	v['DFLAGS']=[]
-	v['D_SRC_F']=['-c']
-	v['D_TGT_F']='-o%s'
-	v['D_LINKER']=v['D']
-	v['DLNK_SRC_F']=''
-	v['DLNK_TGT_F']='-o%s'
-	v['DINC_ST']='-I%s'
-	v['DSHLIB_MARKER']=v['DSTLIB_MARKER']=''
-	v['DSTLIB_ST']=v['DSHLIB_ST']='-l%s'
-	v['DSTLIBPATH_ST']=v['DLIBPATH_ST']='-L%s'
-	v['LINKFLAGS_dshlib']=['-shared']
-	v['DHEADER_ext']='.di'
-	v.DFLAGS_d_with_header='-fintfc'
-	v['D_HDR_F']='-fintfc-file=%s'
-def configure(conf):
-	conf.find_gdc()
-	conf.load('ar')
-	conf.load('d')
-	conf.common_flags_gdc()
-	conf.d_platform_flags()
-
-conf(find_gdc)
-conf(common_flags_gdc)
\ No newline at end of file
diff --git a/waflib/Tools/gfortran.py b/waflib/Tools/gfortran.py
deleted file mode 100644
index 6dc1da1..0000000
--- a/waflib/Tools/gfortran.py
+++ /dev/null
@@ -1,69 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import re
-from waflib import Utils
-from waflib.Tools import fc,fc_config,fc_scan
-from waflib.Configure import conf
-def find_gfortran(conf):
-	fc=conf.find_program(['gfortran','g77'],var='FC')
-	fc=conf.cmd_to_list(fc)
-	conf.get_gfortran_version(fc)
-	conf.env.FC_NAME='GFORTRAN'
-def gfortran_flags(conf):
-	v=conf.env
-	v['FCFLAGS_fcshlib']=['-fPIC']
-	v['FORTRANMODFLAG']=['-J','']
-	v['FCFLAGS_DEBUG']=['-Werror']
-def gfortran_modifier_win32(conf):
-	fc_config.fortran_modifier_win32(conf)
-def gfortran_modifier_cygwin(conf):
-	fc_config.fortran_modifier_cygwin(conf)
-def gfortran_modifier_darwin(conf):
-	fc_config.fortran_modifier_darwin(conf)
-def gfortran_modifier_platform(conf):
-	dest_os=conf.env['DEST_OS']or Utils.unversioned_sys_platform()
-	gfortran_modifier_func=getattr(conf,'gfortran_modifier_'+dest_os,None)
-	if gfortran_modifier_func:
-		gfortran_modifier_func()
-def get_gfortran_version(conf,fc):
-	version_re=re.compile(r"GNU\s*Fortran",re.I).search
-	cmd=fc+['--version']
-	out,err=fc_config.getoutput(conf,cmd,stdin=False)
-	if out:match=version_re(out)
-	else:match=version_re(err)
-	if not match:
-		conf.fatal('Could not determine the compiler type')
-	cmd=fc+['-dM','-E','-']
-	out,err=fc_config.getoutput(conf,cmd,stdin=True)
-	if out.find('__GNUC__')<0:
-		conf.fatal('Could not determine the compiler type')
-	k={}
-	out=out.split('\n')
-	import shlex
-	for line in out:
-		lst=shlex.split(line)
-		if len(lst)>2:
-			key=lst[1]
-			val=lst[2]
-			k[key]=val
-	def isD(var):
-		return var in k
-	def isT(var):
-		return var in k and k[var]!='0'
-	conf.env['FC_VERSION']=(k['__GNUC__'],k['__GNUC_MINOR__'],k['__GNUC_PATCHLEVEL__'])
-def configure(conf):
-	conf.find_gfortran()
-	conf.find_ar()
-	conf.fc_flags()
-	conf.gfortran_flags()
-	conf.gfortran_modifier_platform()
-
-conf(find_gfortran)
-conf(gfortran_flags)
-conf(gfortran_modifier_win32)
-conf(gfortran_modifier_cygwin)
-conf(gfortran_modifier_darwin)
-conf(gfortran_modifier_platform)
-conf(get_gfortran_version)
\ No newline at end of file
diff --git a/waflib/Tools/glib2.py b/waflib/Tools/glib2.py
deleted file mode 100644
index 0d79e52..0000000
--- a/waflib/Tools/glib2.py
+++ /dev/null
@@ -1,174 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os
-from waflib import Task,Utils,Options,Errors,Logs
-from waflib.TaskGen import taskgen_method,before_method,after_method,feature
-def add_marshal_file(self,filename,prefix):
-	if not hasattr(self,'marshal_list'):
-		self.marshal_list=[]
-	self.meths.append('process_marshal')
-	self.marshal_list.append((filename,prefix))
-def process_marshal(self):
-	for f,prefix in getattr(self,'marshal_list',[]):
-		node=self.path.find_resource(f)
-		if not node:
-			raise Errors.WafError('file not found %r'%f)
-		h_node=node.change_ext('.h')
-		c_node=node.change_ext('.c')
-		task=self.create_task('glib_genmarshal',node,[h_node,c_node])
-		task.env.GLIB_GENMARSHAL_PREFIX=prefix
-	self.source=self.to_nodes(getattr(self,'source',[]))
-	self.source.append(c_node)
-class glib_genmarshal(Task.Task):
-	def run(self):
-		bld=self.inputs[0].__class__.ctx
-		get=self.env.get_flat
-		cmd1="%s %s --prefix=%s --header > %s"%(get('GLIB_GENMARSHAL'),self.inputs[0].srcpath(),get('GLIB_GENMARSHAL_PREFIX'),self.outputs[0].abspath())
-		ret=bld.exec_command(cmd1)
-		if ret:return ret
-		c='''#include "%s"\n'''%self.outputs[0].name
-		self.outputs[1].write(c)
-		cmd2="%s %s --prefix=%s --body >> %s"%(get('GLIB_GENMARSHAL'),self.inputs[0].srcpath(),get('GLIB_GENMARSHAL_PREFIX'),self.outputs[1].abspath())
-		return bld.exec_command(cmd2)
-	vars=['GLIB_GENMARSHAL_PREFIX','GLIB_GENMARSHAL']
-	color='BLUE'
-	ext_out=['.h']
-def add_enums_from_template(self,source='',target='',template='',comments=''):
-	if not hasattr(self,'enums_list'):
-		self.enums_list=[]
-	self.meths.append('process_enums')
-	self.enums_list.append({'source':source,'target':target,'template':template,'file-head':'','file-prod':'','file-tail':'','enum-prod':'','value-head':'','value-prod':'','value-tail':'','comments':comments})
-def add_enums(self,source='',target='',file_head='',file_prod='',file_tail='',enum_prod='',value_head='',value_prod='',value_tail='',comments=''):
-	if not hasattr(self,'enums_list'):
-		self.enums_list=[]
-	self.meths.append('process_enums')
-	self.enums_list.append({'source':source,'template':'','target':target,'file-head':file_head,'file-prod':file_prod,'file-tail':file_tail,'enum-prod':enum_prod,'value-head':value_head,'value-prod':value_prod,'value-tail':value_tail,'comments':comments})
-def process_enums(self):
-	for enum in getattr(self,'enums_list',[]):
-		task=self.create_task('glib_mkenums')
-		env=task.env
-		inputs=[]
-		source_list=self.to_list(enum['source'])
-		if not source_list:
-			raise Errors.WafError('missing source '+str(enum))
-		source_list=[self.path.find_resource(k)for k in source_list]
-		inputs+=source_list
-		env['GLIB_MKENUMS_SOURCE']=[k.abspath()for k in source_list]
-		if not enum['target']:
-			raise Errors.WafError('missing target '+str(enum))
-		tgt_node=self.path.find_or_declare(enum['target'])
-		if tgt_node.name.endswith('.c'):
-			self.source.append(tgt_node)
-		env['GLIB_MKENUMS_TARGET']=tgt_node.abspath()
-		options=[]
-		if enum['template']:
-			template_node=self.path.find_resource(enum['template'])
-			options.append('--template %s'%(template_node.abspath()))
-			inputs.append(template_node)
-		params={'file-head':'--fhead','file-prod':'--fprod','file-tail':'--ftail','enum-prod':'--eprod','value-head':'--vhead','value-prod':'--vprod','value-tail':'--vtail','comments':'--comments'}
-		for param,option in params.items():
-			if enum[param]:
-				options.append('%s %r'%(option,enum[param]))
-		env['GLIB_MKENUMS_OPTIONS']=' '.join(options)
-		task.set_inputs(inputs)
-		task.set_outputs(tgt_node)
-class glib_mkenums(Task.Task):
-	run_str='${GLIB_MKENUMS} ${GLIB_MKENUMS_OPTIONS} ${GLIB_MKENUMS_SOURCE} > ${GLIB_MKENUMS_TARGET}'
-	color='PINK'
-	ext_out=['.h']
-def add_settings_schemas(self,filename_list):
-	if not hasattr(self,'settings_schema_files'):
-		self.settings_schema_files=[]
-	if not isinstance(filename_list,list):
-		filename_list=[filename_list]
-	self.settings_schema_files.extend(filename_list)
-def add_settings_enums(self,namespace,filename_list):
-	if hasattr(self,'settings_enum_namespace'):
-		raise Errors.WafError("Tried to add gsettings enums to '%s' more than once"%self.name)
-	self.settings_enum_namespace=namespace
-	if type(filename_list)!='list':
-		filename_list=[filename_list]
-	self.settings_enum_files=filename_list
-def r_change_ext(self,ext):
-	name=self.name
-	k=name.rfind('.')
-	if k>=0:
-		name=name[:k]+ext
-	else:
-		name=name+ext
-	return self.parent.find_or_declare([name])
-def process_settings(self):
-	enums_tgt_node=[]
-	install_files=[]
-	settings_schema_files=getattr(self,'settings_schema_files',[])
-	if settings_schema_files and not self.env['GLIB_COMPILE_SCHEMAS']:
-		raise Errors.WafError("Unable to process GSettings schemas - glib-compile-schemas was not found during configure")
-	if hasattr(self,'settings_enum_files'):
-		enums_task=self.create_task('glib_mkenums')
-		source_list=self.settings_enum_files
-		source_list=[self.path.find_resource(k)for k in source_list]
-		enums_task.set_inputs(source_list)
-		enums_task.env['GLIB_MKENUMS_SOURCE']=[k.abspath()for k in source_list]
-		target=self.settings_enum_namespace+'.enums.xml'
-		tgt_node=self.path.find_or_declare(target)
-		enums_task.set_outputs(tgt_node)
-		enums_task.env['GLIB_MKENUMS_TARGET']=tgt_node.abspath()
-		enums_tgt_node=[tgt_node]
-		install_files.append(tgt_node)
-		options='--comments "<!-- @comment@ -->" --fhead "<schemalist>" --vhead "  <@type@ id=\\"%s. at EnumName@\\">" --vprod "    <value nick=\\"@valuenick@\\" value=\\"@valuenum@\\"/>" --vtail "  </@type@>" --ftail "</schemalist>" '%(self.settings_enum_namespace)
-		enums_task.env['GLIB_MKENUMS_OPTIONS']=options
-	for schema in settings_schema_files:
-		schema_task=self.create_task('glib_validate_schema')
-		schema_node=self.path.find_resource(schema)
-		if not schema_node:
-			raise Errors.WafError("Cannot find the schema file '%s'"%schema)
-		install_files.append(schema_node)
-		source_list=enums_tgt_node+[schema_node]
-		schema_task.set_inputs(source_list)
-		schema_task.env['GLIB_COMPILE_SCHEMAS_OPTIONS']=[("--schema-file="+k.abspath())for k in source_list]
-		target_node=r_change_ext(schema_node,'.xml.valid')
-		schema_task.set_outputs(target_node)
-		schema_task.env['GLIB_VALIDATE_SCHEMA_OUTPUT']=target_node.abspath()
-	def compile_schemas_callback(bld):
-		if not bld.is_install:return
-		Logs.pprint('YELLOW','Updating GSettings schema cache')
-		command=Utils.subst_vars("${GLIB_COMPILE_SCHEMAS} ${GSETTINGSSCHEMADIR}",bld.env)
-		ret=self.bld.exec_command(command)
-	if self.bld.is_install:
-		if not self.env['GSETTINGSSCHEMADIR']:
-			raise Errors.WafError('GSETTINGSSCHEMADIR not defined (should have been set up automatically during configure)')
-		if install_files:
-			self.bld.install_files(self.env['GSETTINGSSCHEMADIR'],install_files)
-			if not hasattr(self.bld,'_compile_schemas_registered'):
-				self.bld.add_post_fun(compile_schemas_callback)
-				self.bld._compile_schemas_registered=True
-class glib_validate_schema(Task.Task):
-	run_str='rm -f ${GLIB_VALIDATE_SCHEMA_OUTPUT} && ${GLIB_COMPILE_SCHEMAS} --dry-run ${GLIB_COMPILE_SCHEMAS_OPTIONS} && touch ${GLIB_VALIDATE_SCHEMA_OUTPUT}'
-	color='PINK'
-def configure(conf):
-	conf.find_program('glib-genmarshal',var='GLIB_GENMARSHAL')
-	conf.find_perl_program('glib-mkenums',var='GLIB_MKENUMS')
-	conf.find_program('glib-compile-schemas',var='GLIB_COMPILE_SCHEMAS',mandatory=False)
-	def getstr(varname):
-		return getattr(Options.options,varname,getattr(conf.env,varname,''))
-	gsettingsschemadir=getstr('GSETTINGSSCHEMADIR')
-	if not gsettingsschemadir:
-		datadir=getstr('DATADIR')
-		if not datadir:
-			prefix=conf.env['PREFIX']
-			datadir=os.path.join(prefix,'share')
-		gsettingsschemadir=os.path.join(datadir,'glib-2.0','schemas')
-	conf.env['GSETTINGSSCHEMADIR']=gsettingsschemadir
-def options(opt):
-	opt.add_option('--gsettingsschemadir',help='GSettings schema location [Default: ${datadir}/glib-2.0/schemas]',default='',dest='GSETTINGSSCHEMADIR')
-
-taskgen_method(add_marshal_file)
-before_method('process_source')(process_marshal)
-taskgen_method(add_enums_from_template)
-taskgen_method(add_enums)
-before_method('process_source')(process_enums)
-taskgen_method(add_settings_schemas)
-taskgen_method(add_settings_enums)
-feature('glib2')(process_settings)
\ No newline at end of file
diff --git a/waflib/Tools/gnu_dirs.py b/waflib/Tools/gnu_dirs.py
deleted file mode 100644
index e698170..0000000
--- a/waflib/Tools/gnu_dirs.py
+++ /dev/null
@@ -1,65 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os
-from waflib import Utils,Options,Context
-_options=[x.split(', ')for x in'''
-bindir, user executables, ${EXEC_PREFIX}/bin
-sbindir, system admin executables, ${EXEC_PREFIX}/sbin
-libexecdir, program executables, ${EXEC_PREFIX}/libexec
-sysconfdir, read-only single-machine data, ${PREFIX}/etc
-sharedstatedir, modifiable architecture-independent data, ${PREFIX}/com
-localstatedir, modifiable single-machine data, ${PREFIX}/var
-libdir, object code libraries, ${EXEC_PREFIX}/lib
-includedir, C header files, ${PREFIX}/include
-oldincludedir, C header files for non-gcc, /usr/include
-datarootdir, read-only arch.-independent data root, ${PREFIX}/share
-datadir, read-only architecture-independent data, ${DATAROOTDIR}
-infodir, info documentation, ${DATAROOTDIR}/info
-localedir, locale-dependent data, ${DATAROOTDIR}/locale
-mandir, man documentation, ${DATAROOTDIR}/man
-docdir, documentation root, ${DATAROOTDIR}/doc/${PACKAGE}
-htmldir, html documentation, ${DOCDIR}
-dvidir, dvi documentation, ${DOCDIR}
-pdfdir, pdf documentation, ${DOCDIR}
-psdir, ps documentation, ${DOCDIR}
-'''.split('\n')if x]
-def configure(conf):
-	def get_param(varname,default):
-		return getattr(Options.options,varname,'')or default
-	env=conf.env
-	conf.env.LIBDIR=conf.env.BINDIR=[]
-	env['EXEC_PREFIX']=get_param('EXEC_PREFIX',env['PREFIX'])
-	env['PACKAGE']=getattr(Context.g_module,'APPNAME',None)or env['PACKAGE']
-	complete=False
-	iter=0
-	while not complete and iter<len(_options)+1:
-		iter+=1
-		complete=True
-		for name,help,default in _options:
-			name=name.upper()
-			if not env[name]:
-				try:
-					env[name]=Utils.subst_vars(get_param(name,default).replace('/',os.sep),env)
-				except TypeError:
-					complete=False
-	if not complete:
-		lst=[name for name,_,_ in _options if not env[name.upper()]]
-		raise conf.errors.WafError('Variable substitution failure %r'%lst)
-def options(opt):
-	inst_dir=opt.add_option_group('Installation directories','By default, "waf install" will put the files in\
- "/usr/local/bin", "/usr/local/lib" etc. An installation prefix other\
- than "/usr/local" can be given using "--prefix", for example "--prefix=$HOME"')
-	for k in('--prefix','--destdir'):
-		option=opt.parser.get_option(k)
-		if option:
-			opt.parser.remove_option(k)
-			inst_dir.add_option(option)
-	inst_dir.add_option('--exec-prefix',help='installation prefix [Default: ${PREFIX}]',default='',dest='EXEC_PREFIX')
-	dirs_options=opt.add_option_group('Pre-defined installation directories','')
-	for name,help,default in _options:
-		option_name='--'+name
-		str_default=default
-		str_help='%s [Default: %s]'%(help,str_default)
-		dirs_options.add_option(option_name,help=str_help,default='',dest=name.upper())
diff --git a/waflib/Tools/gxx.py b/waflib/Tools/gxx.py
deleted file mode 100644
index 647008d..0000000
--- a/waflib/Tools/gxx.py
+++ /dev/null
@@ -1,98 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,sys
-from waflib import Configure,Options,Utils
-from waflib.Tools import ccroot,ar
-from waflib.Configure import conf
-def find_gxx(conf):
-	cxx=conf.find_program(['g++','c++'],var='CXX')
-	cxx=conf.cmd_to_list(cxx)
-	conf.get_cc_version(cxx,gcc=True)
-	conf.env.CXX_NAME='gcc'
-	conf.env.CXX=cxx
-def gxx_common_flags(conf):
-	v=conf.env
-	v['CXX_SRC_F']=[]
-	v['CXX_TGT_F']=['-c','-o']
-	if not v['LINK_CXX']:v['LINK_CXX']=v['CXX']
-	v['CXXLNK_SRC_F']=[]
-	v['CXXLNK_TGT_F']=['-o']
-	v['CPPPATH_ST']='-I%s'
-	v['DEFINES_ST']='-D%s'
-	v['LIB_ST']='-l%s'
-	v['LIBPATH_ST']='-L%s'
-	v['STLIB_ST']='-l%s'
-	v['STLIBPATH_ST']='-L%s'
-	v['RPATH_ST']='-Wl,-rpath,%s'
-	v['SONAME_ST']='-Wl,-h,%s'
-	v['SHLIB_MARKER']='-Wl,-Bdynamic'
-	v['STLIB_MARKER']='-Wl,-Bstatic'
-	v['cxxprogram_PATTERN']='%s'
-	v['CXXFLAGS_cxxshlib']=['-fPIC']
-	v['LINKFLAGS_cxxshlib']=['-shared']
-	v['cxxshlib_PATTERN']='lib%s.so'
-	v['LINKFLAGS_cxxstlib']=['-Wl,-Bstatic']
-	v['cxxstlib_PATTERN']='lib%s.a'
-	v['LINKFLAGS_MACBUNDLE']=['-bundle','-undefined','dynamic_lookup']
-	v['CXXFLAGS_MACBUNDLE']=['-fPIC']
-	v['macbundle_PATTERN']='%s.bundle'
-def gxx_modifier_win32(conf):
-	v=conf.env
-	v['cxxprogram_PATTERN']='%s.exe'
-	v['cxxshlib_PATTERN']='%s.dll'
-	v['implib_PATTERN']='lib%s.dll.a'
-	v['IMPLIB_ST']='-Wl,--out-implib,%s'
-	v['CXXFLAGS_cxxshlib']=[]
-	v.append_value('CXXFLAGS_cxxshlib',['-DDLL_EXPORT'])
-	v.append_value('LINKFLAGS',['-Wl,--enable-auto-import'])
-def gxx_modifier_cygwin(conf):
-	gxx_modifier_win32(conf)
-	v=conf.env
-	v['cxxshlib_PATTERN']='cyg%s.dll'
-	v.append_value('LINKFLAGS_cxxshlib',['-Wl,--enable-auto-image-base'])
-	v['CXXFLAGS_cxxshlib']=[]
-def gxx_modifier_darwin(conf):
-	v=conf.env
-	v['CXXFLAGS_cxxshlib']=['-fPIC','-compatibility_version','1','-current_version','1']
-	v['LINKFLAGS_cxxshlib']=['-dynamiclib']
-	v['cxxshlib_PATTERN']='lib%s.dylib'
-	v['FRAMEWORKPATH_ST']='-F%s'
-	v['FRAMEWORK_ST']=['-framework']
-	v['ARCH_ST']=['-arch']
-	v['LINKFLAGS_cxxstlib']=[]
-	v['SHLIB_MARKER']=[]
-	v['STLIB_MARKER']=[]
-	v['SONAME_ST']=[]
-def gxx_modifier_aix(conf):
-	v=conf.env
-	v['LINKFLAGS_cxxprogram']=['-Wl,-brtl']
-	v['LINKFLAGS_cxxshlib']=['-shared','-Wl,-brtl,-bexpfull']
-	v['SHLIB_MARKER']=[]
-def gxx_modifier_hpux(conf):
-	v=conf.env
-	v['SHLIB_MARKER']=[]
-	v['CFLAGS_cxxshlib']=['-fPIC','-DPIC']
-	v['cxxshlib_PATTERN']='lib%s.sl'
-def gxx_modifier_platform(conf):
-	gxx_modifier_func=getattr(conf,'gxx_modifier_'+conf.env.DEST_OS,None)
-	if gxx_modifier_func:
-		gxx_modifier_func()
-def configure(conf):
-	conf.find_gxx()
-	conf.find_ar()
-	conf.gxx_common_flags()
-	conf.gxx_modifier_platform()
-	conf.cxx_load_tools()
-	conf.cxx_add_flags()
-	conf.link_add_flags()
-
-conf(find_gxx)
-conf(gxx_common_flags)
-conf(gxx_modifier_win32)
-conf(gxx_modifier_cygwin)
-conf(gxx_modifier_darwin)
-conf(gxx_modifier_aix)
-conf(gxx_modifier_hpux)
-conf(gxx_modifier_platform)
\ No newline at end of file
diff --git a/waflib/Tools/icc.py b/waflib/Tools/icc.py
deleted file mode 100644
index eaac1cd..0000000
--- a/waflib/Tools/icc.py
+++ /dev/null
@@ -1,31 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,sys
-from waflib.Tools import ccroot,ar,gcc
-from waflib.Configure import conf
-def find_icc(conf):
-	if sys.platform=='cygwin':
-		conf.fatal('The Intel compiler does not work on Cygwin')
-	v=conf.env
-	cc=None
-	if v['CC']:cc=v['CC']
-	elif'CC'in conf.environ:cc=conf.environ['CC']
-	if not cc:cc=conf.find_program('icc',var='CC')
-	if not cc:cc=conf.find_program('ICL',var='CC')
-	if not cc:conf.fatal('Intel C Compiler (icc) was not found')
-	cc=conf.cmd_to_list(cc)
-	conf.get_cc_version(cc,icc=True)
-	v['CC']=cc
-	v['CC_NAME']='icc'
-def configure(conf):
-	conf.find_icc()
-	conf.find_ar()
-	conf.gcc_common_flags()
-	conf.gcc_modifier_platform()
-	conf.cc_load_tools()
-	conf.cc_add_flags()
-	conf.link_add_flags()
-
-conf(find_icc)
\ No newline at end of file
diff --git a/waflib/Tools/icpc.py b/waflib/Tools/icpc.py
deleted file mode 100644
index 6a222ff..0000000
--- a/waflib/Tools/icpc.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,sys
-from waflib.Tools import ccroot,ar,gxx
-from waflib.Configure import conf
-def find_icpc(conf):
-	if sys.platform=='cygwin':
-		conf.fatal('The Intel compiler does not work on Cygwin')
-	v=conf.env
-	cxx=None
-	if v['CXX']:cxx=v['CXX']
-	elif'CXX'in conf.environ:cxx=conf.environ['CXX']
-	if not cxx:cxx=conf.find_program('icpc',var='CXX')
-	if not cxx:conf.fatal('Intel C++ Compiler (icpc) was not found')
-	cxx=conf.cmd_to_list(cxx)
-	conf.get_cc_version(cxx,icc=True)
-	v['CXX']=cxx
-	v['CXX_NAME']='icc'
-def configure(conf):
-	conf.find_icpc()
-	conf.find_ar()
-	conf.gxx_common_flags()
-	conf.gxx_modifier_platform()
-	conf.cxx_load_tools()
-	conf.cxx_add_flags()
-	conf.link_add_flags()
-
-conf(find_icpc)
\ No newline at end of file
diff --git a/waflib/Tools/ifort.py b/waflib/Tools/ifort.py
deleted file mode 100644
index e379d65..0000000
--- a/waflib/Tools/ifort.py
+++ /dev/null
@@ -1,42 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import re
-from waflib import Utils
-from waflib.Tools import fc,fc_config,fc_scan
-from waflib.Configure import conf
-def find_ifort(conf):
-	fc=conf.find_program('ifort',var='FC')
-	fc=conf.cmd_to_list(fc)
-	conf.get_ifort_version(fc)
-	conf.env.FC_NAME='IFORT'
-def ifort_modifier_cygwin(conf):
-	raise NotImplementedError("Ifort on cygwin not yet implemented")
-def ifort_modifier_platform(conf):
-	dest_os=conf.env['DEST_OS']or Utils.unversioned_sys_platform()
-	ifort_modifier_func=getattr(conf,'ifort_modifier_'+dest_os,None)
-	if ifort_modifier_func:
-		ifort_modifier_func()
-def get_ifort_version(conf,fc):
-	version_re=re.compile(r"ifort\s*\(IFORT\)\s*(?P<major>\d*)\.(?P<minor>\d*)",re.I).search
-	cmd=fc+['--version']
-	out,err=fc_config.getoutput(conf,cmd,stdin=False)
-	if out:
-		match=version_re(out)
-	else:
-		match=version_re(err)
-	if not match:
-		conf.fatal('cannot determine ifort version.')
-	k=match.groupdict()
-	conf.env['FC_VERSION']=(k['major'],k['minor'])
-def configure(conf):
-	conf.find_ifort()
-	conf.find_ar()
-	conf.fc_flags()
-	conf.ifort_modifier_platform()
-
-conf(find_ifort)
-conf(ifort_modifier_cygwin)
-conf(ifort_modifier_platform)
-conf(get_ifort_version)
\ No newline at end of file
diff --git a/waflib/Tools/intltool.py b/waflib/Tools/intltool.py
deleted file mode 100644
index 54cb3a2..0000000
--- a/waflib/Tools/intltool.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,re
-from waflib import Configure,TaskGen,Task,Utils,Runner,Options,Build,Logs
-import waflib.Tools.ccroot
-from waflib.TaskGen import feature,before_method
-from waflib.Logs import error
-def apply_intltool_in_f(self):
-	try:self.meths.remove('process_source')
-	except ValueError:pass
-	if not self.env.LOCALEDIR:
-		self.env.LOCALEDIR=self.env.PREFIX+'/share/locale'
-	for i in self.to_list(self.source):
-		node=self.path.find_resource(i)
-		podir=getattr(self,'podir','po')
-		podirnode=self.path.find_dir(podir)
-		if not podirnode:
-			error("could not find the podir %r"%podir)
-			continue
-		cache=getattr(self,'intlcache','.intlcache')
-		self.env['INTLCACHE']=os.path.join(self.path.bldpath(),podir,cache)
-		self.env['INTLPODIR']=podirnode.bldpath()
-		self.env['INTLFLAGS']=getattr(self,'flags',['-q','-u','-c'])
-		task=self.create_task('intltool',node,node.change_ext(''))
-		inst=getattr(self,'install_path','${LOCALEDIR}')
-		if inst:
-			self.bld.install_files(inst,task.outputs)
-def apply_intltool_po(self):
-	try:self.meths.remove('process_source')
-	except ValueError:pass
-	if not self.env.LOCALEDIR:
-		self.env.LOCALEDIR=self.env.PREFIX+'/share/locale'
-	appname=getattr(self,'appname','set_your_app_name')
-	podir=getattr(self,'podir','')
-	inst=getattr(self,'install_path','${LOCALEDIR}')
-	linguas=self.path.find_node(os.path.join(podir,'LINGUAS'))
-	if linguas:
-		file=open(linguas.abspath())
-		langs=[]
-		for line in file.readlines():
-			if not line.startswith('#'):
-				langs+=line.split()
-		file.close()
-		re_linguas=re.compile('[-a-zA-Z_ at .]+')
-		for lang in langs:
-			if re_linguas.match(lang):
-				node=self.path.find_resource(os.path.join(podir,re_linguas.match(lang).group()+'.po'))
-				task=self.create_task('po',node,node.change_ext('.mo'))
-				if inst:
-					filename=task.outputs[0].name
-					(langname,ext)=os.path.splitext(filename)
-					inst_file=inst+os.sep+langname+os.sep+'LC_MESSAGES'+os.sep+appname+'.mo'
-					self.bld.install_as(inst_file,task.outputs[0],chmod=getattr(self,'chmod',Utils.O644),env=task.env)
-	else:
-		Logs.pprint('RED',"Error no LINGUAS file found in po directory")
-class po(Task.Task):
-	run_str='${MSGFMT} -o ${TGT} ${SRC}'
-	color='BLUE'
-class intltool(Task.Task):
-	run_str='${INTLTOOL} ${INTLFLAGS} ${INTLCACHE} ${INTLPODIR} ${SRC} ${TGT}'
-	color='BLUE'
-def configure(conf):
-	conf.find_program('msgfmt',var='MSGFMT')
-	conf.find_perl_program('intltool-merge',var='INTLTOOL')
-	prefix=conf.env.PREFIX
-	datadir=conf.env.DATADIR
-	if not datadir:
-		datadir=os.path.join(prefix,'share')
-	conf.define('LOCALEDIR',os.path.join(datadir,'locale').replace('\\','\\\\'))
-	conf.define('DATADIR',datadir.replace('\\','\\\\'))
-	if conf.env.CC or conf.env.CXX:
-		conf.check(header_name='locale.h')
-
-before_method('process_source')(apply_intltool_in_f)
-feature('intltool_in')(apply_intltool_in_f)
-feature('intltool_po')(apply_intltool_po)
\ No newline at end of file
diff --git a/waflib/Tools/irixcc.py b/waflib/Tools/irixcc.py
deleted file mode 100644
index bae88c9..0000000
--- a/waflib/Tools/irixcc.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os
-from waflib import Utils
-from waflib.Tools import ccroot,ar
-from waflib.Configure import conf
-def find_irixcc(conf):
-	v=conf.env
-	cc=None
-	if v['CC']:cc=v['CC']
-	elif'CC'in conf.environ:cc=conf.environ['CC']
-	if not cc:cc=conf.find_program('cc',var='CC')
-	if not cc:conf.fatal('irixcc was not found')
-	cc=conf.cmd_to_list(cc)
-	try:
-		conf.cmd_and_log(cc+['-version'])
-	except:
-		conf.fatal('%r -version could not be executed'%cc)
-	v['CC']=cc
-	v['CC_NAME']='irix'
-def irixcc_common_flags(conf):
-	v=conf.env
-	v['CC_SRC_F']=''
-	v['CC_TGT_F']=['-c','-o']
-	v['CPPPATH_ST']='-I%s'
-	v['DEFINES_ST']='-D%s'
-	if not v['LINK_CC']:v['LINK_CC']=v['CC']
-	v['CCLNK_SRC_F']=''
-	v['CCLNK_TGT_F']=['-o']
-	v['LIB_ST']='-l%s'
-	v['LIBPATH_ST']='-L%s'
-	v['STLIB_ST']='-l%s'
-	v['STLIBPATH_ST']='-L%s'
-	v['cprogram_PATTERN']='%s'
-	v['cshlib_PATTERN']='lib%s.so'
-	v['cstlib_PATTERN']='lib%s.a'
-def configure(conf):
-	conf.find_irixcc()
-	conf.find_cpp()
-	conf.find_ar()
-	conf.irixcc_common_flags()
-	conf.cc_load_tools()
-	conf.cc_add_flags()
-	conf.link_add_flags()
-
-conf(find_irixcc)
-conf(irixcc_common_flags)
\ No newline at end of file
diff --git a/waflib/Tools/javaw.py b/waflib/Tools/javaw.py
deleted file mode 100644
index 85eb3a6..0000000
--- a/waflib/Tools/javaw.py
+++ /dev/null
@@ -1,272 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import sys
-if sys.hexversion < 0x020400f0: from sets import Set as set
-import os,re
-from waflib.Configure import conf
-from waflib import TaskGen,Task,Utils,Options,Build,Errors,Node
-from waflib.TaskGen import feature,before_method,after_method
-from waflib.Tools import ccroot
-ccroot.USELIB_VARS['javac']=set(['CLASSPATH','JAVACFLAGS'])
-SOURCE_RE='**/*.java'
-JAR_RE='**/*'
-re_verbose=re.compile(r'^\[.*?\]\n*',re.M)
-re_classes=re.compile(r'\[wrote (?:RegularFileObject\[)*(.*?\.class)\]')
-class_check_source='''
-public class Test {
-	public static void main(String[] argv) {
-		Class lib;
-		if (argv.length < 1) {
-			System.err.println("Missing argument");
-			System.exit(77);
-		}
-		try {
-			lib = Class.forName(argv[0]);
-		} catch (ClassNotFoundException e) {
-			System.err.println("ClassNotFoundException");
-			System.exit(1);
-		}
-		lib = null;
-		System.exit(0);
-	}
-}
-'''
-def apply_java(self):
-	Utils.def_attrs(self,jarname='',classpath='',sourcepath='.',srcdir='.',jar_mf_attributes={},jar_mf_classpath=[])
-	nodes_lst=[]
-	outdir=getattr(self,'outdir',None)
-	if outdir:
-		if not isinstance(outdir,Node.Node):
-			outdir=self.path.get_bld().make_node(self.outdir)
-	else:
-		outdir=self.path.get_bld()
-	outdir.mkdir()
-	self.env['OUTDIR']=outdir.abspath()
-	self.javac_task=tsk=self.create_task('javac')
-	tmp=[]
-	srcdir=getattr(self,'srcdir','')
-	if isinstance(srcdir,Node.Node):
-		srcdir=[srcdir]
-	for x in Utils.to_list(srcdir):
-		if isinstance(x,Node.Node):
-			y=x
-		else:
-			y=self.path.find_dir(x)
-			if not y:
-				self.bld.fatal('Could not find the folder %s from %s'%(x,self.path))
-		tmp.append(y)
-	tsk.srcdir=tmp
-	if getattr(self,'compat',None):
-		tsk.env.append_value('JAVACFLAGS',['-source',self.compat])
-	if hasattr(self,'sourcepath'):
-		fold=[isinstance(x,Node.Node)and x or self.path.find_dir(x)for x in self.to_list(self.sourcepath)]
-		names=os.pathsep.join([x.srcpath()for x in fold])
-	else:
-		names=[x.srcpath()for x in tsk.srcdir]
-	if names:
-		tsk.env.append_value('JAVACFLAGS',['-sourcepath',names])
-def use_javac_files(self):
-	lst=[]
-	self.uselib=self.to_list(getattr(self,'uselib',[]))
-	names=self.to_list(getattr(self,'use',[]))
-	get=self.bld.get_tgen_by_name
-	for x in names:
-		try:
-			y=get(x)
-		except:
-			self.uselib.append(x)
-		else:
-			y.post()
-			lst.append(y.jar_task.outputs[0].abspath())
-			self.javac_task.set_run_after(y.jar_task)
-	if lst:
-		self.env.append_value('CLASSPATH',lst)
-def set_classpath(self):
-	self.env.append_value('CLASSPATH',getattr(self,'classpath',[]))
-	for x in self.tasks:
-		x.env.CLASSPATH=os.pathsep.join(self.env.CLASSPATH)+os.pathsep
-def jar_files(self):
-	destfile=getattr(self,'destfile','test.jar')
-	jaropts=getattr(self,'jaropts',[])
-	manifest=getattr(self,'manifest',None)
-	basedir=getattr(self,'basedir',None)
-	if basedir:
-		if not isinstance(self.basedir,Node.Node):
-			basedir=self.path.get_bld().make_node(basedir)
-	else:
-		basedir=self.path.get_bld()
-	if not basedir:
-		self.bld.fatal('Could not find the basedir %r for %r'%(self.basedir,self))
-	self.jar_task=tsk=self.create_task('jar_create')
-	if manifest:
-		jarcreate=getattr(self,'jarcreate','cfm')
-		node=self.path.find_node(manifest)
-		tsk.dep_nodes.append(node)
-		jaropts.insert(0,node.abspath())
-	else:
-		jarcreate=getattr(self,'jarcreate','cf')
-	if not isinstance(destfile,Node.Node):
-		destfile=self.path.find_or_declare(destfile)
-	if not destfile:
-		self.bld.fatal('invalid destfile %r for %r'%(destfile,self))
-	tsk.set_outputs(destfile)
-	tsk.basedir=basedir
-	jaropts.append('-C')
-	jaropts.append(basedir.bldpath())
-	jaropts.append('.')
-	tsk.env['JAROPTS']=jaropts
-	tsk.env['JARCREATE']=jarcreate
-	if getattr(self,'javac_task',None):
-		tsk.set_run_after(self.javac_task)
-def use_jar_files(self):
-	lst=[]
-	self.uselib=self.to_list(getattr(self,'uselib',[]))
-	names=self.to_list(getattr(self,'use',[]))
-	get=self.bld.get_tgen_by_name
-	for x in names:
-		try:
-			y=get(x)
-		except:
-			self.uselib.append(x)
-		else:
-			y.post()
-			self.jar_task.run_after.update(y.tasks)
-class jar_create(Task.Task):
-	color='GREEN'
-	run_str='${JAR} ${JARCREATE} ${TGT} ${JAROPTS}'
-	def runnable_status(self):
-		for t in self.run_after:
-			if not t.hasrun:
-				return Task.ASK_LATER
-		if not self.inputs:
-			global JAR_RE
-			try:
-				self.inputs=[x for x in self.basedir.ant_glob(JAR_RE,remove=False)if id(x)!=id(self.outputs[0])]
-			except:
-				raise Errors.WafError('Could not find the basedir %r for %r'%(self.basedir,self))
-		return super(jar_create,self).runnable_status()
-class javac(Task.Task):
-	color='BLUE'
-	nocache=True
-	vars=['CLASSPATH','JAVACFLAGS','JAVAC','OUTDIR']
-	def runnable_status(self):
-		for t in self.run_after:
-			if not t.hasrun:
-				return Task.ASK_LATER
-		if not self.inputs:
-			global SOURCE_RE
-			self.inputs=[]
-			for x in self.srcdir:
-				self.inputs.extend(x.ant_glob(SOURCE_RE,remove=False))
-		return super(javac,self).runnable_status()
-	def run(self):
-		env=self.env
-		gen=self.generator
-		bld=gen.bld
-		wd=bld.bldnode.abspath()
-		def to_list(xx):
-			if isinstance(xx,str):return[xx]
-			return xx
-		self.last_cmd=lst=[]
-		lst.extend(to_list(env['JAVAC']))
-		lst.extend(['-classpath'])
-		lst.extend(to_list(env['CLASSPATH']))
-		lst.extend(['-d'])
-		lst.extend(to_list(env['OUTDIR']))
-		lst.extend(to_list(env['JAVACFLAGS']))
-		lst.extend([a.path_from(bld.bldnode)for a in self.inputs])
-		lst=[x for x in lst if x]
-		try:
-			self.out=self.generator.bld.cmd_and_log(lst,cwd=wd,env=env.env or None,output=0,quiet=0)[1]
-		except:
-			self.generator.bld.cmd_and_log(lst,cwd=wd,env=env.env or None)
-	def post_run(self):
-		for x in re_classes.findall(self.out):
-			if os.path.isabs(x):
-				n=self.generator.bld.root.find_node(x)
-			else:
-				n=self.generator.bld.bldnode.find_node(x)
-			if not n:
-				raise ValueError('cannot find %r in %r'%(x,self.generator.bld.bldnode.abspath()))
-			n.sig=Utils.h_file(n.abspath())
-		self.generator.bld.task_sigs[self.uid()]=self.cache_sig
-		out=re_verbose.sub('',self.out).strip()
-		if out:
-			self.generator.bld.to_log(out+'\n')
-def configure(self):
-	java_path=self.environ['PATH'].split(os.pathsep)
-	v=self.env
-	if'JAVA_HOME'in self.environ:
-		java_path=[os.path.join(self.environ['JAVA_HOME'],'bin')]+java_path
-		self.env['JAVA_HOME']=[self.environ['JAVA_HOME']]
-	for x in'javac java jar'.split():
-		self.find_program(x,var=x.upper(),path_list=java_path)
-		self.env[x.upper()]=self.cmd_to_list(self.env[x.upper()])
-	if'CLASSPATH'in self.environ:
-		v['CLASSPATH']=self.environ['CLASSPATH']
-	if not v['JAR']:self.fatal('jar is required for making java packages')
-	if not v['JAVAC']:self.fatal('javac is required for compiling java classes')
-	v['JARCREATE']='cf'
-	v['JAVACFLAGS']=['-verbose']
-def check_java_class(self,classname,with_classpath=None):
-	import shutil
-	javatestdir='.waf-javatest'
-	classpath=javatestdir
-	if self.env['CLASSPATH']:
-		classpath+=os.pathsep+self.env['CLASSPATH']
-	if isinstance(with_classpath,str):
-		classpath+=os.pathsep+with_classpath
-	shutil.rmtree(javatestdir,True)
-	os.mkdir(javatestdir)
-	java_file=open(os.path.join(javatestdir,'Test.java'),'w')
-	java_file.write(class_check_source)
-	java_file.close()
-	self.exec_command(self.env['JAVAC']+[os.path.join(javatestdir,'Test.java')],shell=False)
-	cmd=self.env['JAVA']+['-cp',classpath,'Test',classname]
-	self.to_log("%s\n"%str(cmd))
-	found=self.exec_command(cmd,shell=False)
-	self.msg('Checking for java class %s'%classname,not found)
-	shutil.rmtree(javatestdir,True)
-	return found
-def check_jni_headers(conf):
-	if not conf.env.CC_NAME and not conf.env.CXX_NAME:
-		conf.fatal('load a compiler first (gcc, g++, ..)')
-	if not conf.env.JAVA_HOME:
-		conf.fatal('set JAVA_HOME in the system environment')
-	javaHome=conf.env['JAVA_HOME'][0]
-	dir=conf.root.find_dir(conf.env.JAVA_HOME[0]+'/include')
-	if dir is None:
-		conf.fatal('JAVA_HOME does not seem to be set properly')
-	f=dir.ant_glob('**/(jni|jni_md).h')
-	incDirs=[x.parent.abspath()for x in f]
-	dir=conf.root.find_dir(conf.env.JAVA_HOME[0])
-	f=dir.ant_glob('**/*jvm.(so|dll|dylib)')
-	libDirs=[x.parent.abspath()for x in f]or[javaHome]
-	f=dir.ant_glob('**/*jvm.(lib)')
-	if f:
-		libDirs=[[x,y.parent.abspath()]for x in libDirs for y in f]
-	for d in libDirs:
-		try:
-			conf.check(header_name='jni.h',define_name='HAVE_JNI_H',lib='jvm',libpath=d,includes=incDirs,uselib_store='JAVA',uselib='JAVA')
-		except:
-			pass
-		else:
-			break
-	else:
-		conf.fatal('could not find lib jvm in %r (see config.log)'%libDirs)
-
-feature('javac')(apply_java)
-before_method('process_source')(apply_java)
-feature('javac')(use_javac_files)
-after_method('apply_java')(use_javac_files)
-feature('javac')(set_classpath)
-after_method('apply_java','propagate_uselib_vars','use_javac_files')(set_classpath)
-feature('jar')(jar_files)
-after_method('apply_java','use_javac_files')(jar_files)
-before_method('process_source')(jar_files)
-feature('jar')(use_jar_files)
-after_method('jar_files')(use_jar_files)
-conf(check_java_class)
-conf(check_jni_headers)
\ No newline at end of file
diff --git a/waflib/Tools/kde4.py b/waflib/Tools/kde4.py
deleted file mode 100644
index e4a8a92..0000000
--- a/waflib/Tools/kde4.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,sys,re
-from waflib import Options,TaskGen,Task,Utils
-from waflib.TaskGen import feature,after_method
-def apply_msgfmt(self):
-	for lang in self.to_list(self.langs):
-		node=self.path.find_resource(lang+'.po')
-		task=self.create_task('msgfmt',node,node.change_ext('.mo'))
-		langname=lang.split('/')
-		langname=langname[-1]
-		inst=getattr(self,'install_path','${KDE4_LOCALE_INSTALL_DIR}')
-		self.bld.install_as(inst+os.sep+langname+os.sep+'LC_MESSAGES'+os.sep+getattr(self,'appname','set_your_appname')+'.mo',task.outputs[0],chmod=getattr(self,'chmod',Utils.O644))
-class msgfmt(Task.Task):
-	color='BLUE'
-	run_str='${MSGFMT} ${SRC} -o ${TGT}'
-def configure(self):
-	kdeconfig=self.find_program('kde4-config')
-	prefix=self.cmd_and_log('%s --prefix'%kdeconfig).strip()
-	fname='%s/share/apps/cmake/modules/KDELibsDependencies.cmake'%prefix
-	try:os.stat(fname)
-	except OSError:
-		fname='%s/share/kde4/apps/cmake/modules/KDELibsDependencies.cmake'%prefix
-		try:os.stat(fname)
-		except OSError:self.fatal('could not open %s'%fname)
-	try:
-		txt=Utils.readf(fname)
-	except(OSError,IOError):
-		self.fatal('could not read %s'%fname)
-	txt=txt.replace('\\\n','\n')
-	fu=re.compile('#(.*)\n')
-	txt=fu.sub('',txt)
-	setregexp=re.compile('([sS][eE][tT]\s*\()\s*([^\s]+)\s+\"([^"]+)\"\)')
-	found=setregexp.findall(txt)
-	for(_,key,val)in found:
-		self.env[key]=val
-	self.env['LIB_KDECORE']=['kdecore']
-	self.env['LIB_KDEUI']=['kdeui']
-	self.env['LIB_KIO']=['kio']
-	self.env['LIB_KHTML']=['khtml']
-	self.env['LIB_KPARTS']=['kparts']
-	self.env['LIBPATH_KDECORE']=[self.env['KDE4_LIB_INSTALL_DIR']]
-	self.env['INCLUDES_KDECORE']=[self.env['KDE4_INCLUDE_INSTALL_DIR']]
-	self.env.append_value('INCLUDES_KDECORE',[self.env['KDE4_INCLUDE_INSTALL_DIR']+os.sep+'KDE'])
-	self.find_program('msgfmt',var='MSGFMT')
-
-feature('msgfmt')(apply_msgfmt)
\ No newline at end of file
diff --git a/waflib/Tools/lua.py b/waflib/Tools/lua.py
deleted file mode 100644
index 0d48d4f..0000000
--- a/waflib/Tools/lua.py
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-from waflib.TaskGen import extension
-from waflib import Task,Utils
-def add_lua(self,node):
-	tsk=self.create_task('luac',node,node.change_ext('.luac'))
-	inst_to=getattr(self,'install_path',self.env.LUADIR and'${LUADIR}'or None)
-	if inst_to:
-		self.bld.install_files(inst_to,tsk.outputs)
-	return tsk
-class luac(Task.Task):
-	run_str='${LUAC} -s -o ${TGT} ${SRC}'
-	color='PINK'
-def configure(conf):
-	conf.find_program('luac',var='LUAC')
-
-extension('.lua')(add_lua)
\ No newline at end of file
diff --git a/waflib/Tools/msvc.py b/waflib/Tools/msvc.py
deleted file mode 100644
index 926a273..0000000
--- a/waflib/Tools/msvc.py
+++ /dev/null
@@ -1,650 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,sys,re,tempfile
-try:
-	import _winreg
-except:
-	try:
-		import winreg as _winreg
-	except:
-		_winreg=None
-from waflib import Utils,TaskGen,Runner,Configure,Task,Options
-from waflib.Logs import debug,info,warn,error
-from waflib.TaskGen import after_method,before_method,feature
-from waflib.Configure import conf
-from waflib.Tools import ccroot,c,cxx,ar,winres
-g_msvc_systemlibs='''
-aclui activeds ad1 adptif adsiid advapi32 asycfilt authz bhsupp bits bufferoverflowu cabinet
-cap certadm certidl ciuuid clusapi comctl32 comdlg32 comsupp comsuppd comsuppw comsuppwd comsvcs
-credui crypt32 cryptnet cryptui d3d8thk daouuid dbgeng dbghelp dciman32 ddao35 ddao35d
-ddao35u ddao35ud delayimp dhcpcsvc dhcpsapi dlcapi dnsapi dsprop dsuiext dtchelp
-faultrep fcachdll fci fdi framedyd framedyn gdi32 gdiplus glauxglu32 gpedit gpmuuid
-gtrts32w gtrtst32hlink htmlhelp httpapi icm32 icmui imagehlp imm32 iphlpapi iprop
-kernel32 ksguid ksproxy ksuser libcmt libcmtd libcpmt libcpmtd loadperf lz32 mapi
-mapi32 mgmtapi minidump mmc mobsync mpr mprapi mqoa mqrt msacm32 mscms mscoree
-msdasc msimg32 msrating mstask msvcmrt msvcurt msvcurtd mswsock msxml2 mtx mtxdm
-netapi32 nmapinmsupp npptools ntdsapi ntdsbcli ntmsapi ntquery odbc32 odbcbcp
-odbccp32 oldnames ole32 oleacc oleaut32 oledb oledlgolepro32 opends60 opengl32
-osptk parser pdh penter pgobootrun pgort powrprof psapi ptrustm ptrustmd ptrustu
-ptrustud qosname rasapi32 rasdlg rassapi resutils riched20 rpcndr rpcns4 rpcrt4 rtm
-rtutils runtmchk scarddlg scrnsave scrnsavw secur32 sensapi setupapi sfc shell32
-shfolder shlwapi sisbkup snmpapi sporder srclient sti strsafe svcguid tapi32 thunk32
-traffic unicows url urlmon user32 userenv usp10 uuid uxtheme vcomp vcompd vdmdbg
-version vfw32 wbemuuid  webpost wiaguid wininet winmm winscard winspool winstrm
-wintrust wldap32 wmiutils wow32 ws2_32 wsnmp32 wsock32 wst wtsapi32 xaswitch xolehlp
-'''.split()
-all_msvc_platforms=[('x64','amd64'),('x86','x86'),('ia64','ia64'),('x86_amd64','amd64'),('x86_ia64','ia64')]
-all_wince_platforms=[('armv4','arm'),('armv4i','arm'),('mipsii','mips'),('mipsii_fp','mips'),('mipsiv','mips'),('mipsiv_fp','mips'),('sh4','sh'),('x86','cex86')]
-all_icl_platforms=[('intel64','amd64'),('em64t','amd64'),('ia32','x86'),('Itanium','ia64')]
-def options(opt):
-	opt.add_option('--msvc_version',type='string',help='msvc version, eg: "msvc 10.0,msvc 9.0"',default='')
-	opt.add_option('--msvc_targets',type='string',help='msvc targets, eg: "x64,arm"',default='')
-def setup_msvc(conf,versions):
-	platforms=getattr(Options.options,'msvc_targets','').split(',')
-	if platforms==['']:
-		platforms=Utils.to_list(conf.env['MSVC_TARGETS'])or[i for i,j in all_msvc_platforms+all_icl_platforms+all_wince_platforms]
-	desired_versions=getattr(Options.options,'msvc_version','').split(',')
-	if desired_versions==['']:
-		desired_versions=conf.env['MSVC_VERSIONS']or[v for v,_ in versions][::-1]
-	versiondict=dict(versions)
-	for version in desired_versions:
-		try:
-			targets=dict(versiondict[version])
-			for target in platforms:
-				try:
-					arch,(p1,p2,p3)=targets[target]
-					compiler,revision=version.split()
-					return compiler,revision,p1,p2,p3
-				except KeyError:continue
-		except KeyError:continue
-	conf.fatal('msvc: Impossible to find a valid architecture for building (in setup_msvc)')
-def get_msvc_version(conf,compiler,version,target,vcvars):
-	debug('msvc: get_msvc_version: %r %r %r',compiler,version,target)
-	batfile=conf.bldnode.make_node('waf-print-msvc.bat')
-	batfile.write("""@echo off
-set INCLUDE=
-set LIB=
-call "%s" %s
-echo PATH=%%PATH%%
-echo INCLUDE=%%INCLUDE%%
-echo LIB=%%LIB%%
-"""%(vcvars,target))
-	sout=conf.cmd_and_log(['cmd','/E:on','/V:on','/C',batfile.abspath()])
-	lines=sout.splitlines()
-	if not lines[0]:lines=lines[1:]
-	for x in('Setting environment','Setting SDK environment','Intel(R) C++ Compiler','Intel Parallel Studio'):
-		if lines[0].find(x)!=-1:
-			break
-	else:
-		debug('msvc: get_msvc_version: %r %r %r -> not found',compiler,version,target)
-		conf.fatal('msvc: Impossible to find a valid architecture for building (in get_msvc_version)')
-	for line in lines[1:]:
-		if line.startswith('PATH='):
-			path=line[5:]
-			MSVC_PATH=path.split(';')
-		elif line.startswith('INCLUDE='):
-			MSVC_INCDIR=[i for i in line[8:].split(';')if i]
-		elif line.startswith('LIB='):
-			MSVC_LIBDIR=[i for i in line[4:].split(';')if i]
-	env={}
-	env.update(os.environ)
-	env.update(PATH=path)
-	compiler_name,linker_name,lib_name=_get_prog_names(conf,compiler)
-	cxx=conf.find_program(compiler_name,path_list=MSVC_PATH)
-	cxx=conf.cmd_to_list(cxx)
-	if'CL'in env:
-		del(env['CL'])
-	try:
-		try:
-			conf.cmd_and_log(cxx+['/help'],env=env)
-		except Exception ,e:
-			debug('msvc: get_msvc_version: %r %r %r -> failure'%(compiler,version,target))
-			debug(str(e))
-			conf.fatal('msvc: cannot run the compiler (in get_msvc_version)')
-		else:
-			debug('msvc: get_msvc_version: %r %r %r -> OK',compiler,version,target)
-	finally:
-		conf.env[compiler_name]=''
-	return(MSVC_PATH,MSVC_INCDIR,MSVC_LIBDIR)
-def gather_wsdk_versions(conf,versions):
-	version_pattern=re.compile('^v..?.?\...?.?')
-	try:
-		all_versions=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,'SOFTWARE\\Wow6432node\\Microsoft\\Microsoft SDKs\\Windows')
-	except WindowsError:
-		try:
-			all_versions=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,'SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows')
-		except WindowsError:
-			return
-	index=0
-	while 1:
-		try:
-			version=_winreg.EnumKey(all_versions,index)
-		except WindowsError:
-			break
-		index=index+1
-		if not version_pattern.match(version):
-			continue
-		try:
-			msvc_version=_winreg.OpenKey(all_versions,version)
-			path,type=_winreg.QueryValueEx(msvc_version,'InstallationFolder')
-		except WindowsError:
-			continue
-		if os.path.isfile(os.path.join(path,'bin','SetEnv.cmd')):
-			targets=[]
-			for target,arch in all_msvc_platforms:
-				try:
-					targets.append((target,(arch,conf.get_msvc_version('wsdk',version,'/'+target,os.path.join(path,'bin','SetEnv.cmd')))))
-				except conf.errors.ConfigurationError:
-					pass
-			versions.append(('wsdk '+version[1:],targets))
-def gather_wince_supported_platforms():
-	supported_wince_platforms=[]
-	try:
-		ce_sdk=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,'SOFTWARE\\Wow6432node\\Microsoft\\Windows CE Tools\\SDKs')
-	except WindowsError:
-		try:
-			ce_sdk=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,'SOFTWARE\\Microsoft\\Windows CE Tools\\SDKs')
-		except WindowsError:
-			ce_sdk=''
-	if not ce_sdk:
-		return supported_wince_platforms
-	ce_index=0
-	while 1:
-		try:
-			sdk_device=_winreg.EnumKey(ce_sdk,ce_index)
-		except WindowsError:
-			break
-		ce_index=ce_index+1
-		sdk=_winreg.OpenKey(ce_sdk,sdk_device)
-		try:
-			path,type=_winreg.QueryValueEx(sdk,'SDKRootDir')
-		except WindowsError:
-			continue
-		path=str(path)
-		path,device=os.path.split(path)
-		if not device:
-			path,device=os.path.split(path)
-		for arch,compiler in all_wince_platforms:
-			platforms=[]
-			if os.path.isdir(os.path.join(path,device,'Lib',arch)):
-				platforms.append((arch,compiler,os.path.join(path,device,'Include',arch),os.path.join(path,device,'Lib',arch)))
-			if platforms:
-				supported_wince_platforms.append((device,platforms))
-	return supported_wince_platforms
-def gather_msvc_detected_versions():
-	version_pattern=re.compile('^(\d\d?\.\d\d?)(Exp)?$')
-	detected_versions=[]
-	for vcver,vcvar in[('VCExpress','Exp'),('VisualStudio','')]:
-		try:
-			prefix='SOFTWARE\\Wow6432node\\Microsoft\\'+vcver
-			all_versions=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,prefix)
-		except WindowsError:
-			try:
-				prefix='SOFTWARE\\Microsoft\\'+vcver
-				all_versions=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,prefix)
-			except WindowsError:
-				continue
-		index=0
-		while 1:
-			try:
-				version=_winreg.EnumKey(all_versions,index)
-			except WindowsError:
-				break
-			index=index+1
-			match=version_pattern.match(version)
-			if not match:
-				continue
-			else:
-				versionnumber=float(match.group(1))
-			detected_versions.append((versionnumber,version+vcvar,prefix+"\\"+version))
-	def fun(tup):
-		return tup[0]
-	try:
-		detected_versions.sort(key=fun)
-	except:
-		detected_versions.sort(lambda x,y:cmp(x[0],y[0]))
-	return detected_versions
-def gather_msvc_targets(conf,versions,version,vc_path):
-	targets=[]
-	if os.path.isfile(os.path.join(vc_path,'vcvarsall.bat')):
-		for target,realtarget in all_msvc_platforms[::-1]:
-			try:
-				targets.append((target,(realtarget,conf.get_msvc_version('msvc',version,target,os.path.join(vc_path,'vcvarsall.bat')))))
-			except conf.errors.ConfigurationError:
-				pass
-	elif os.path.isfile(os.path.join(vc_path,'Common7','Tools','vsvars32.bat')):
-		try:
-			targets.append(('x86',('x86',conf.get_msvc_version('msvc',version,'x86',os.path.join(vc_path,'Common7','Tools','vsvars32.bat')))))
-		except conf.errors.ConfigurationError:
-			pass
-	elif os.path.isfile(os.path.join(vc_path,'Bin','vcvars32.bat')):
-		try:
-			targets.append(('x86',('x86',conf.get_msvc_version('msvc',version,'',os.path.join(vc_path,'Bin','vcvars32.bat')))))
-		except conf.errors.ConfigurationError:
-			pass
-	versions.append(('msvc '+version,targets))
-def gather_wince_targets(conf,versions,version,vc_path,vsvars,supported_platforms):
-	for device,platforms in supported_platforms:
-		cetargets=[]
-		for platform,compiler,include,lib in platforms:
-			winCEpath=os.path.join(vc_path,'ce')
-			if not os.path.isdir(winCEpath):
-				continue
-			try:
-				common_bindirs,_1,_2=conf.get_msvc_version('msvc',version,'x86',vsvars)
-			except conf.errors.ConfigurationError:
-				continue
-			if os.path.isdir(os.path.join(winCEpath,'lib',platform)):
-				bindirs=[os.path.join(winCEpath,'bin',compiler),os.path.join(winCEpath,'bin','x86_'+compiler)]+common_bindirs
-				incdirs=[include,os.path.join(winCEpath,'include'),os.path.join(winCEpath,'atlmfc','include')]
-				libdirs=[lib,os.path.join(winCEpath,'lib',platform),os.path.join(winCEpath,'atlmfc','lib',platform)]
-				cetargets.append((platform,(platform,(bindirs,incdirs,libdirs))))
-		if cetargets:
-			versions.append((device+' '+version,cetargets))
-def gather_msvc_versions(conf,versions):
-	vc_paths=[]
-	for(v,version,reg)in gather_msvc_detected_versions():
-		try:
-			try:
-				msvc_version=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,reg+"\\Setup\\VC")
-			except WindowsError:
-				msvc_version=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,reg+"\\Setup\\Microsoft Visual C++")
-			path,type=_winreg.QueryValueEx(msvc_version,'ProductDir')
-			vc_paths.append((version,os.path.abspath(str(path))))
-		except WindowsError:
-			continue
-	wince_supported_platforms=gather_wince_supported_platforms()
-	for version,vc_path in vc_paths:
-		vs_path=os.path.dirname(vc_path)
-		vsvars=os.path.join(vs_path,'Common7','Tools','vsvars32.bat')
-		if wince_supported_platforms and os.path.isfile(vsvars):
-			conf.gather_wince_targets(versions,version,vc_path,vsvars,wince_supported_platforms)
-	for version,vc_path in vc_paths:
-		vs_path=os.path.dirname(vc_path)
-		conf.gather_msvc_targets(versions,version,vc_path)
-def gather_icl_versions(conf,versions):
-	version_pattern=re.compile('^...?.?\....?.?')
-	try:
-		all_versions=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,'SOFTWARE\\Wow6432node\\Intel\\Compilers\\C++')
-	except WindowsError:
-		try:
-			all_versions=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,'SOFTWARE\\Intel\\Compilers\\C++')
-		except WindowsError:
-			return
-	index=0
-	while 1:
-		try:
-			version=_winreg.EnumKey(all_versions,index)
-		except WindowsError:
-			break
-		index=index+1
-		if not version_pattern.match(version):
-			continue
-		targets=[]
-		for target,arch in all_icl_platforms:
-			try:
-				if target=='intel64':targetDir='EM64T_NATIVE'
-				else:targetDir=target
-				_winreg.OpenKey(all_versions,version+'\\'+targetDir)
-				icl_version=_winreg.OpenKey(all_versions,version)
-				path,type=_winreg.QueryValueEx(icl_version,'ProductDir')
-				if os.path.isfile(os.path.join(path,'bin','iclvars.bat')):
-					try:
-						targets.append((target,(arch,conf.get_msvc_version('intel',version,target,os.path.join(path,'bin','iclvars.bat')))))
-					except conf.errors.ConfigurationError:
-						pass
-			except WindowsError:
-				pass
-		for target,arch in all_icl_platforms:
-			try:
-				icl_version=_winreg.OpenKey(all_versions,version+'\\'+target)
-				path,type=_winreg.QueryValueEx(icl_version,'ProductDir')
-				if os.path.isfile(os.path.join(path,'bin','iclvars.bat')):
-					try:
-						targets.append((target,(arch,conf.get_msvc_version('intel',version,target,os.path.join(path,'bin','iclvars.bat')))))
-					except conf.errors.ConfigurationError:
-						pass
-			except WindowsError:
-				continue
-		major=version[0:2]
-		versions.append(('intel '+major,targets))
-def get_msvc_versions(conf):
-	if not conf.env['MSVC_INSTALLED_VERSIONS']:
-		lst=[]
-		conf.gather_icl_versions(lst)
-		conf.gather_wsdk_versions(lst)
-		conf.gather_msvc_versions(lst)
-		conf.env['MSVC_INSTALLED_VERSIONS']=lst
-	return conf.env['MSVC_INSTALLED_VERSIONS']
-def print_all_msvc_detected(conf):
-	for version,targets in conf.env['MSVC_INSTALLED_VERSIONS']:
-		info(version)
-		for target,l in targets:
-			info("\t"+target)
-def detect_msvc(conf):
-	versions=get_msvc_versions(conf)
-	return setup_msvc(conf,versions)
-def find_lt_names_msvc(self,libname,is_static=False):
-	lt_names=['lib%s.la'%libname,'%s.la'%libname,]
-	for path in self.env['LIBPATH']:
-		for la in lt_names:
-			laf=os.path.join(path,la)
-			dll=None
-			if os.path.exists(laf):
-				ltdict=Utils.read_la_file(laf)
-				lt_libdir=None
-				if ltdict.get('libdir',''):
-					lt_libdir=ltdict['libdir']
-				if not is_static and ltdict.get('library_names',''):
-					dllnames=ltdict['library_names'].split()
-					dll=dllnames[0].lower()
-					dll=re.sub('\.dll$','',dll)
-					return(lt_libdir,dll,False)
-				elif ltdict.get('old_library',''):
-					olib=ltdict['old_library']
-					if os.path.exists(os.path.join(path,olib)):
-						return(path,olib,True)
-					elif lt_libdir!=''and os.path.exists(os.path.join(lt_libdir,olib)):
-						return(lt_libdir,olib,True)
-					else:
-						return(None,olib,True)
-				else:
-					raise self.errors.WafError('invalid libtool object file: %s'%laf)
-	return(None,None,None)
-def libname_msvc(self,libname,is_static=False):
-	lib=libname.lower()
-	lib=re.sub('\.lib$','',lib)
-	if lib in g_msvc_systemlibs:
-		return lib
-	lib=re.sub('^lib','',lib)
-	if lib=='m':
-		return None
-	(lt_path,lt_libname,lt_static)=self.find_lt_names_msvc(lib,is_static)
-	if lt_path!=None and lt_libname!=None:
-		if lt_static==True:
-			return os.path.join(lt_path,lt_libname)
-	if lt_path!=None:
-		_libpaths=[lt_path]+self.env['LIBPATH']
-	else:
-		_libpaths=self.env['LIBPATH']
-	static_libs=['lib%ss.lib'%lib,'lib%s.lib'%lib,'%ss.lib'%lib,'%s.lib'%lib,]
-	dynamic_libs=['lib%s.dll.lib'%lib,'lib%s.dll.a'%lib,'%s.dll.lib'%lib,'%s.dll.a'%lib,'lib%s_d.lib'%lib,'%s_d.lib'%lib,'%s.lib'%lib,]
-	libnames=static_libs
-	if not is_static:
-		libnames=dynamic_libs+static_libs
-	for path in _libpaths:
-		for libn in libnames:
-			if os.path.exists(os.path.join(path,libn)):
-				debug('msvc: lib found: %s'%os.path.join(path,libn))
-				return re.sub('\.lib$','',libn)
-	self.fatal("The library %r could not be found"%libname)
-	return re.sub('\.lib$','',libname)
-def check_lib_msvc(self,libname,is_static=False,uselib_store=None):
-	libn=self.libname_msvc(libname,is_static)
-	if not uselib_store:
-		uselib_store=libname.upper()
-	if False and is_static:
-		self.env['STLIB_'+uselib_store]=[libn]
-	else:
-		self.env['LIB_'+uselib_store]=[libn]
-def check_libs_msvc(self,libnames,is_static=False):
-	for libname in Utils.to_list(libnames):
-		self.check_lib_msvc(libname,is_static)
-def configure(conf):
-	conf.autodetect()
-	conf.find_msvc()
-	conf.msvc_common_flags()
-	conf.cc_load_tools()
-	conf.cxx_load_tools()
-	conf.cc_add_flags()
-	conf.cxx_add_flags()
-	conf.link_add_flags()
-	conf.visual_studio_add_flags()
-def no_autodetect(conf):
-	conf.env.NO_MSVC_DETECT=1
-	configure(conf)
-def autodetect(conf):
-	v=conf.env
-	if v.NO_MSVC_DETECT:
-		return
-	compiler,version,path,includes,libdirs=conf.detect_msvc()
-	v['PATH']=path
-	v['INCLUDES']=includes
-	v['LIBPATH']=libdirs
-	v['MSVC_COMPILER']=compiler
-	try:
-		v['MSVC_VERSION']=float(version)
-	except:
-		v['MSVC_VERSION']=float(version[:-3])
-def _get_prog_names(conf,compiler):
-	if compiler=='intel':
-		compiler_name='ICL'
-		linker_name='XILINK'
-		lib_name='XILIB'
-	else:
-		compiler_name='CL'
-		linker_name='LINK'
-		lib_name='LIB'
-	return compiler_name,linker_name,lib_name
-def find_msvc(conf):
-	if sys.platform=='cygwin':
-		conf.fatal('MSVC module does not work under cygwin Python!')
-	v=conf.env
-	path=v['PATH']
-	compiler=v['MSVC_COMPILER']
-	version=v['MSVC_VERSION']
-	compiler_name,linker_name,lib_name=_get_prog_names(conf,compiler)
-	v.MSVC_MANIFEST=(compiler=='msvc'and version>=8)or(compiler=='wsdk'and version>=6)or(compiler=='intel'and version>=11)
-	cxx=None
-	if v['CXX']:cxx=v['CXX']
-	elif'CXX'in conf.environ:cxx=conf.environ['CXX']
-	cxx=conf.find_program(compiler_name,var='CXX',path_list=path)
-	cxx=conf.cmd_to_list(cxx)
-	env=dict(conf.environ)
-	if path:env.update(PATH=';'.join(path))
-	if not conf.cmd_and_log(cxx+['/nologo','/help'],env=env):
-		conf.fatal('the msvc compiler could not be identified')
-	v['CC']=v['CXX']=cxx
-	v['CC_NAME']=v['CXX_NAME']='msvc'
-	if not v['LINK_CXX']:
-		link=conf.find_program(linker_name,path_list=path)
-		if link:v['LINK_CXX']=link
-		else:conf.fatal('%s was not found (linker)'%linker_name)
-		v['LINK']=link
-	if not v['LINK_CC']:
-		v['LINK_CC']=v['LINK_CXX']
-	if not v['AR']:
-		stliblink=conf.find_program(lib_name,path_list=path,var='AR')
-		if not stliblink:return
-		v['ARFLAGS']=['/NOLOGO']
-	if v.MSVC_MANIFEST:
-		mt=conf.find_program('MT',path_list=path,var='MT')
-		v['MTFLAGS']=['/NOLOGO']
-	conf.load('winres')
-	if not conf.env['WINRC']:
-		warn('Resource compiler not found. Compiling resource file is disabled')
-def visual_studio_add_flags(self):
-	v=self.env
-	try:v.prepend_value('INCLUDES',self.environ['INCLUDE'].split(';'))
-	except:pass
-	try:v.prepend_value('LIBPATH',self.environ['LIB'].split(';'))
-	except:pass
-def msvc_common_flags(conf):
-	v=conf.env
-	v['DEST_BINFMT']='pe'
-	v.append_value('CFLAGS',['/nologo'])
-	v.append_value('CXXFLAGS',['/nologo'])
-	v['DEFINES_ST']='/D%s'
-	v['CC_SRC_F']=''
-	v['CC_TGT_F']=['/c','/Fo']
-	if v['MSVC_VERSION']>=8:
-		v['CC_TGT_F']=['/FC']+v['CC_TGT_F']
-	v['CXX_SRC_F']=''
-	v['CXX_TGT_F']=['/c','/Fo']
-	if v['MSVC_VERSION']>=8:
-		v['CXX_TGT_F']=['/FC']+v['CXX_TGT_F']
-	v['CPPPATH_ST']='/I%s'
-	v['AR_TGT_F']=v['CCLNK_TGT_F']=v['CXXLNK_TGT_F']='/OUT:'
-	v['CFLAGS_CONSOLE']=v['CXXFLAGS_CONSOLE']=['/SUBSYSTEM:CONSOLE']
-	v['CFLAGS_NATIVE']=v['CXXFLAGS_NATIVE']=['/SUBSYSTEM:NATIVE']
-	v['CFLAGS_POSIX']=v['CXXFLAGS_POSIX']=['/SUBSYSTEM:POSIX']
-	v['CFLAGS_WINDOWS']=v['CXXFLAGS_WINDOWS']=['/SUBSYSTEM:WINDOWS']
-	v['CFLAGS_WINDOWSCE']=v['CXXFLAGS_WINDOWSCE']=['/SUBSYSTEM:WINDOWSCE']
-	v['CFLAGS_CRT_MULTITHREADED']=v['CXXFLAGS_CRT_MULTITHREADED']=['/MT']
-	v['CFLAGS_CRT_MULTITHREADED_DLL']=v['CXXFLAGS_CRT_MULTITHREADED_DLL']=['/MD']
-	v['CFLAGS_CRT_MULTITHREADED_DBG']=v['CXXFLAGS_CRT_MULTITHREADED_DBG']=['/MTd']
-	v['CFLAGS_CRT_MULTITHREADED_DLL_DBG']=v['CXXFLAGS_CRT_MULTITHREADED_DLL_DBG']=['/MDd']
-	v['LIB_ST']='%s.lib'
-	v['LIBPATH_ST']='/LIBPATH:%s'
-	v['STLIB_ST']='lib%s.lib'
-	v['STLIBPATH_ST']='/LIBPATH:%s'
-	v.append_value('LINKFLAGS',['/NOLOGO'])
-	if v['MSVC_MANIFEST']:
-		v.append_value('LINKFLAGS',['/MANIFEST'])
-	v['CFLAGS_cshlib']=[]
-	v['CXXFLAGS_cxxshlib']=[]
-	v['LINKFLAGS_cshlib']=v['LINKFLAGS_cxxshlib']=['/DLL']
-	v['cshlib_PATTERN']=v['cxxshlib_PATTERN']='%s.dll'
-	v['implib_PATTERN']='%s.lib'
-	v['IMPLIB_ST']='/IMPLIB:%s'
-	v['LINKFLAGS_cstlib']=[]
-	v['cstlib_PATTERN']=v['cxxstlib_PATTERN']='lib%s.lib'
-	v['cprogram_PATTERN']=v['cxxprogram_PATTERN']='%s.exe'
-def apply_flags_msvc(self):
-	if self.env.CC_NAME!='msvc'or not getattr(self,'link_task',None):
-		return
-	is_static=isinstance(self.link_task,ccroot.stlink_task)
-	subsystem=getattr(self,'subsystem','')
-	if subsystem:
-		subsystem='/subsystem:%s'%subsystem
-		flags=is_static and'ARFLAGS'or'LINKFLAGS'
-		self.env.append_value(flags,subsystem)
-	if not is_static:
-		for f in self.env.LINKFLAGS:
-			d=f.lower()
-			if d[1:]=='debug':
-				pdbnode=self.link_task.outputs[0].change_ext('.pdb')
-				self.link_task.outputs.append(pdbnode)
-				try:
-					self.install_task.source.append(pdbnode)
-				except AttributeError:
-					pass
-				break
-def apply_manifest(self):
-	if self.env.CC_NAME=='msvc'and self.env.MSVC_MANIFEST and getattr(self,'link_task',None):
-		out_node=self.link_task.outputs[0]
-		man_node=out_node.parent.find_or_declare(out_node.name+'.manifest')
-		self.link_task.outputs.append(man_node)
-		self.link_task.do_manifest=True
-def exec_mf(self):
-	env=self.env
-	mtool=env['MT']
-	if not mtool:
-		return 0
-	self.do_manifest=False
-	outfile=self.outputs[0].abspath()
-	manifest=None
-	for out_node in self.outputs:
-		if out_node.name.endswith('.manifest'):
-			manifest=out_node.abspath()
-			break
-	if manifest is None:
-		return 0
-	mode=''
-	if'cprogram'in self.generator.features or'cxxprogram'in self.generator.features:
-		mode='1'
-	elif'cshlib'in self.generator.features or'cxxshlib'in self.generator.features:
-		mode='2'
-	debug('msvc: embedding manifest in mode %r'%mode)
-	lst=[]
-	lst.append(env['MT'])
-	lst.extend(Utils.to_list(env['MTFLAGS']))
-	lst.extend(['-manifest',manifest])
-	lst.append('-outputresource:%s;%s'%(outfile,mode))
-	lst=[lst]
-	return self.exec_command(*lst)
-def quote_response_command(self,flag):
-	if flag.find(' ')>-1:
-		for x in('/LIBPATH:','/IMPLIB:','/OUT:','/I'):
-			if flag.startswith(x):
-				flag='%s"%s"'%(x,flag[len(x):])
-				break
-		else:
-			flag='"%s"'%flag
-	return flag
-def exec_response_command(self,cmd,**kw):
-	try:
-		tmp=None
-		if sys.platform.startswith('win')and isinstance(cmd,list)and len(' '.join(cmd))>=8192:
-			program=cmd[0]
-			cmd=[self.quote_response_command(x)for x in cmd]
-			(fd,tmp)=tempfile.mkstemp()
-			os.write(fd,'\r\n'.join(i.replace('\\','\\\\')for i in cmd[1:]))
-			os.close(fd)
-			cmd=[program,'@'+tmp]
-		ret=self.generator.bld.exec_command(cmd,**kw)
-	finally:
-		if tmp:
-			try:
-				os.remove(tmp)
-			except:
-				pass
-	return ret
-def exec_command_msvc(self,*k,**kw):
-	if self.env['CC_NAME']=='msvc':
-		if isinstance(k[0],list):
-			lst=[]
-			carry=''
-			for a in k[0]:
-				if a=='/Fo'or a=='/doc'or a[-1]==':':
-					carry=a
-				else:
-					lst.append(carry+a)
-					carry=''
-			k=[lst]
-		if self.env['PATH']:
-			env=dict(os.environ)
-			env.update(PATH=';'.join(self.env['PATH']))
-			kw['env']=env
-	bld=self.generator.bld
-	try:
-		if not kw.get('cwd',None):
-			kw['cwd']=bld.cwd
-	except AttributeError:
-		bld.cwd=kw['cwd']=bld.variant_dir
-	ret=self.exec_response_command(k[0],**kw)
-	if not ret and getattr(self,'do_manifest',None):
-		ret=self.exec_mf()
-	return ret
-for k in'c cxx cprogram cxxprogram cshlib cxxshlib cstlib cxxstlib'.split():
-	cls=Task.classes.get(k,None)
-	if cls:
-		cls.exec_command=exec_command_msvc
-		cls.exec_response_command=exec_response_command
-		cls.quote_response_command=quote_response_command
-		cls.exec_mf=exec_mf
-
-conf(get_msvc_version)
-conf(gather_wsdk_versions)
-conf(gather_msvc_targets)
-conf(gather_wince_targets)
-conf(gather_msvc_versions)
-conf(gather_icl_versions)
-conf(get_msvc_versions)
-conf(print_all_msvc_detected)
-conf(detect_msvc)
-conf(find_lt_names_msvc)
-conf(libname_msvc)
-conf(check_lib_msvc)
-conf(check_libs_msvc)
-conf(no_autodetect)
-conf(autodetect)
-conf(find_msvc)
-conf(visual_studio_add_flags)
-conf(msvc_common_flags)
-after_method('apply_link')(apply_flags_msvc)
-feature('c','cxx')(apply_flags_msvc)
-feature('cprogram','cshlib','cxxprogram','cxxshlib')(apply_manifest)
-after_method('apply_link')(apply_manifest)
\ No newline at end of file
diff --git a/waflib/Tools/nasm.py b/waflib/Tools/nasm.py
deleted file mode 100644
index afb4cf8..0000000
--- a/waflib/Tools/nasm.py
+++ /dev/null
@@ -1,13 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import waflib.Tools.asm
-from waflib.TaskGen import feature
-def apply_nasm_vars(self):
-	self.env.append_value('ASFLAGS',self.to_list(getattr(self,'nasm_flags',[])))
-def configure(conf):
-	nasm=conf.find_program(['nasm','yasm'],var='AS')
-	conf.env.AS_TGT_F='-o'
-
-feature('asm')(apply_nasm_vars)
\ No newline at end of file
diff --git a/waflib/Tools/perl.py b/waflib/Tools/perl.py
deleted file mode 100644
index 93b8f65..0000000
--- a/waflib/Tools/perl.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os
-from waflib import Task,Options,Utils
-from waflib.Configure import conf
-from waflib.TaskGen import extension,feature,before_method
-def init_perlext(self):
-	self.uselib=self.to_list(getattr(self,'uselib',[]))
-	if not'PERLEXT'in self.uselib:self.uselib.append('PERLEXT')
-	self.env['cshlib_PATTERN']=self.env['cxxshlib_PATTERN']=self.env['perlext_PATTERN']
-def xsubpp_file(self,node):
-	outnode=node.change_ext('.c')
-	self.create_task('xsubpp',node,outnode)
-	self.source.append(outnode)
-class xsubpp(Task.Task):
-	run_str='${PERL} ${XSUBPP} -noprototypes -typemap ${EXTUTILS_TYPEMAP} ${SRC} > ${TGT}'
-	color='BLUE'
-	ext_out=['.h']
-def check_perl_version(self,minver=None):
-	res=True
-	cver=""if minver is None else".".join(map(str,minver))
-	self.start_msg('Checking for minimum perl version %s'%cver)
-	perl=getattr(Options.options,'perlbinary',None)
-	if not perl:
-		perl=self.find_program('perl',var='PERL')
-	if not perl:
-		self.end_msg("Perl not found",color="YELLOW")
-		return False
-	self.env['PERL']=perl
-	version=self.cmd_and_log([perl,"-e",'printf \"%vd\", $^V'])
-	if not version:
-		res=False
-		version="Unknown"
-	elif not minver is None:
-		ver=tuple(map(int,version.split(".")))
-		if ver<minver:
-			res=False
-	self.end_msg(version,color="GREEN"if res else"YELLOW")
-	return res
-def check_perl_module(self,module):
-	cmd=[self.env['PERL'],'-e','use %s'%module]
-	self.start_msg('perl module %s'%module)
-	try:
-		r=self.cmd_and_log(cmd)
-	except:
-		self.end_msg(False)
-		return None
-	self.end_msg(r or True)
-	return r
-def check_perl_ext_devel(self):
-	env=self.env
-	perl=env.PERL
-	if not perl:
-		self.fatal('find perl first')
-	def read_out(cmd):
-		return Utils.to_list(self.cmd_and_log(perl+cmd))
-	env['LINKFLAGS_PERLEXT']=read_out(" -MConfig -e'print $Config{lddlflags}'")
-	env['INCLUDES_PERLEXT']=read_out(" -MConfig -e'print \"$Config{archlib}/CORE\"'")
-	env['CFLAGS_PERLEXT']=read_out(" -MConfig -e'print \"$Config{ccflags} $Config{cccdlflags}\"'")
-	env['XSUBPP']=read_out(" -MConfig -e'print \"$Config{privlib}/ExtUtils/xsubpp$Config{exe_ext}\"'")
-	env['EXTUTILS_TYPEMAP']=read_out(" -MConfig -e'print \"$Config{privlib}/ExtUtils/typemap\"'")
-	if not getattr(Options.options,'perlarchdir',None):
-		env['ARCHDIR_PERL']=self.cmd_and_log(perl+" -MConfig -e'print $Config{sitearch}'")
-	else:
-		env['ARCHDIR_PERL']=getattr(Options.options,'perlarchdir')
-	env['perlext_PATTERN']='%s.'+self.cmd_and_log(perl+" -MConfig -e'print $Config{dlext}'")
-def options(opt):
-	opt.add_option('--with-perl-binary',type='string',dest='perlbinary',help='Specify alternate perl binary',default=None)
-	opt.add_option('--with-perl-archdir',type='string',dest='perlarchdir',help='Specify directory where to install arch specific files',default=None)
-
-before_method('apply_incpaths','apply_link','propagate_uselib_vars')(init_perlext)
-feature('perlext')(init_perlext)
-extension('.xs')(xsubpp_file)
-conf(check_perl_version)
-conf(check_perl_module)
-conf(check_perl_ext_devel)
\ No newline at end of file
diff --git a/waflib/Tools/python.py b/waflib/Tools/python.py
deleted file mode 100644
index 062bc89..0000000
--- a/waflib/Tools/python.py
+++ /dev/null
@@ -1,303 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,sys
-from waflib import Utils,Options,Errors
-from waflib.Logs import debug,warn,info,error
-from waflib.TaskGen import extension,before_method,after_method,feature
-from waflib.Configure import conf
-FRAG='''
-#include <Python.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-	void Py_Initialize(void);
-	void Py_Finalize(void);
-#ifdef __cplusplus
-}
-#endif
-int main()
-{
-   Py_Initialize();
-   Py_Finalize();
-   return 0;
-}
-'''
-INST='''
-import sys, py_compile
-py_compile.compile(sys.argv[1], sys.argv[2], sys.argv[3])
-'''
-def process_py(self,node):
-	try:
-		if not self.bld.is_install:
-			return
-	except:
-		return
-	try:
-		if not self.install_path:
-			return
-	except AttributeError:
-		self.install_path='${PYTHONDIR}'
-	def inst_py(ctx):
-		install_from=getattr(self,'install_from',None)
-		if install_from:
-			install_from=self.path.find_dir(install_from)
-		install_pyfile(self,node,install_from)
-	self.bld.add_post_fun(inst_py)
-def install_pyfile(self,node,install_from=None):
-	from_node=install_from or node.parent
-	tsk=self.bld.install_as(self.install_path+'/'+node.path_from(from_node),node,postpone=False)
-	path=tsk.get_install_path()
-	if self.bld.is_install<0:
-		info("+ removing byte compiled python files")
-		for x in'co':
-			try:
-				os.remove(path+x)
-			except OSError:
-				pass
-	if self.bld.is_install>0:
-		try:
-			st1=os.stat(path)
-		except:
-			error('The python file is missing, this should not happen')
-		for x in['c','o']:
-			do_inst=self.env['PY'+x.upper()]
-			try:
-				st2=os.stat(path+x)
-			except OSError:
-				pass
-			else:
-				if st1.st_mtime<=st2.st_mtime:
-					do_inst=False
-			if do_inst:
-				lst=(x=='o')and[self.env['PYFLAGS_OPT']]or[]
-				(a,b,c)=(path,path+x,tsk.get_install_path(destdir=False)+x)
-				argv=self.env['PYTHON']+lst+['-c',INST,a,b,c]
-				info('+ byte compiling %r'%(path+x))
-				ret=Utils.subprocess.Popen(argv).wait()
-				if ret:
-					raise Errors.WafError('py%s compilation failed %r'%(x,path))
-def feature_py(self):
-	pass
-def init_pyext(self):
-	try:
-		if not self.install_path:
-			return
-	except AttributeError:
-		self.install_path='${PYTHONARCHDIR}'
-	self.uselib=self.to_list(getattr(self,'uselib',[]))
-	if not'PYEXT'in self.uselib:
-		self.uselib.append('PYEXT')
-	self.env['cshlib_PATTERN']=self.env['cxxshlib_PATTERN']=self.env['macbundle_PATTERN']=self.env['pyext_PATTERN']
-def set_bundle(self):
-	if sys.platform.startswith('darwin'):
-		self.mac_bundle=True
-def init_pyembed(self):
-	self.uselib=self.to_list(getattr(self,'uselib',[]))
-	if not'PYEMBED'in self.uselib:
-		self.uselib.append('PYEMBED')
-def get_python_variables(conf,variables,imports=['import sys']):
-	program=list(imports)
-	program.append('')
-	for v in variables:
-		program.append("print(repr(%s))"%v)
-	os_env=dict(os.environ)
-	try:
-		del os_env['MACOSX_DEPLOYMENT_TARGET']
-	except KeyError:
-		pass
-	try:
-		out=conf.cmd_and_log(conf.env.PYTHON+['-c','\n'.join(program)],env=os_env)
-	except Errors.WafError:
-		conf.fatal('The distutils module is unusable: install "python-devel"?')
-	return_values=[]
-	for s in out.split('\n'):
-		s=s.strip()
-		if not s:
-			continue
-		if s=='None':
-			return_values.append(None)
-		elif s[0]=="'"and s[-1]=="'":
-			return_values.append(s[1:-1])
-		elif s[0].isdigit():
-			return_values.append(int(s))
-		else:break
-	return return_values
-def check_python_headers(conf):
-	if not conf.env['CC_NAME']and not conf.env['CXX_NAME']:
-		conf.fatal('load a compiler first (gcc, g++, ..)')
-	if not conf.env['PYTHON_VERSION']:
-		conf.check_python_version()
-	env=conf.env
-	pybin=conf.env.PYTHON
-	if not pybin:
-		conf.fatal('could not find the python executable')
-	v='prefix SO LDFLAGS LIBDIR LIBPL INCLUDEPY Py_ENABLE_SHARED MACOSX_DEPLOYMENT_TARGET LDSHARED CFLAGS'.split()
-	try:
-		lst=conf.get_python_variables(["get_config_var('%s') or ''"%x for x in v],['from distutils.sysconfig import get_config_var'])
-	except RuntimeError:
-		conf.fatal("Python development headers not found (-v for details).")
-	vals=['%s = %r'%(x,y)for(x,y)in zip(v,lst)]
-	conf.to_log("Configuration returned from %r:\n%r\n"%(pybin,'\n'.join(vals)))
-	dct=dict(zip(v,lst))
-	x='MACOSX_DEPLOYMENT_TARGET'
-	if dct[x]:
-		conf.env[x]=conf.environ[x]=dct[x]
-	env['pyext_PATTERN']='%s'+dct['SO']
-	all_flags=dct['LDFLAGS']+' '+dct['CFLAGS']
-	conf.parse_flags(all_flags,'PYEMBED')
-	all_flags=dct['LDFLAGS']+' '+dct['LDSHARED']+' '+dct['CFLAGS']
-	conf.parse_flags(all_flags,'PYEXT')
-	result=None
-	for name in('python'+env['PYTHON_VERSION'],'python'+env['PYTHON_VERSION'].replace('.','')):
-		if not result and env['LIBPATH_PYEMBED']:
-			path=env['LIBPATH_PYEMBED']
-			conf.to_log("\n\n# Trying default LIBPATH_PYEMBED: %r\n"%path)
-			result=conf.check(lib=name,uselib='PYEMBED',libpath=path,mandatory=False,msg='Checking for library %s in LIBPATH_PYEMBED'%name)
-		if not result and dct['LIBDIR']:
-			path=[dct['LIBDIR']]
-			conf.to_log("\n\n# try again with -L$python_LIBDIR: %r\n"%path)
-			result=conf.check(lib=name,uselib='PYEMBED',libpath=path,mandatory=False,msg='Checking for library %s in LIBDIR'%name)
-		if not result and dct['LIBPL']:
-			path=[dct['LIBPL']]
-			conf.to_log("\n\n# try again with -L$python_LIBPL (some systems don't install the python library in $prefix/lib)\n")
-			result=conf.check(lib=name,uselib='PYEMBED',libpath=path,mandatory=False,msg='Checking for library %s in python_LIBPL'%name)
-		if not result:
-			path=[os.path.join(dct['prefix'],"libs")]
-			conf.to_log("\n\n# try again with -L$prefix/libs, and pythonXY name rather than pythonX.Y (win32)\n")
-			result=conf.check(lib=name,uselib='PYEMBED',libpath=path,mandatory=False,msg='Checking for library %s in $prefix/libs'%name)
-		if result:
-			break
-	if result:
-		env['LIBPATH_PYEMBED']=path
-		env.append_value('LIB_PYEMBED',[name])
-	else:
-		conf.to_log("\n\n### LIB NOT FOUND\n")
-	if(Utils.is_win32 or sys.platform.startswith('os2')or dct['Py_ENABLE_SHARED']):
-		env['LIBPATH_PYEXT']=env['LIBPATH_PYEMBED']
-		env['LIB_PYEXT']=env['LIB_PYEMBED']
-	num='.'.join(env['PYTHON_VERSION'].split('.')[:2])
-	conf.find_program(['python%s-config'%num,'python-config-%s'%num,'python%sm-config'%num],var='PYTHON_CONFIG',mandatory=False)
-	includes=[]
-	if conf.env.PYTHON_CONFIG:
-		for incstr in conf.cmd_and_log([conf.env.PYTHON_CONFIG,'--includes']).strip().split():
-			if(incstr.startswith('-I')or incstr.startswith('/I')):
-				incstr=incstr[2:]
-			if incstr not in includes:
-				includes.append(incstr)
-		conf.to_log("Include path for Python extensions (found via python-config --includes): %r\n"%(includes,))
-		env['INCLUDES_PYEXT']=includes
-		env['INCLUDES_PYEMBED']=includes
-	else:
-		conf.to_log("Include path for Python extensions ""(found via distutils module): %r\n"%(dct['INCLUDEPY'],))
-		env['INCLUDES_PYEXT']=[dct['INCLUDEPY']]
-		env['INCLUDES_PYEMBED']=[dct['INCLUDEPY']]
-	if env['CC_NAME']=='gcc':
-		env.append_value('CFLAGS_PYEMBED',['-fno-strict-aliasing'])
-		env.append_value('CFLAGS_PYEXT',['-fno-strict-aliasing'])
-	if env['CXX_NAME']=='gcc':
-		env.append_value('CXXFLAGS_PYEMBED',['-fno-strict-aliasing'])
-		env.append_value('CXXFLAGS_PYEXT',['-fno-strict-aliasing'])
-	if env.CC_NAME=="msvc":
-		from distutils.msvccompiler import MSVCCompiler
-		dist_compiler=MSVCCompiler()
-		dist_compiler.initialize()
-		env.append_value('CFLAGS_PYEXT',dist_compiler.compile_options)
-		env.append_value('CXXFLAGS_PYEXT',dist_compiler.compile_options)
-		env.append_value('LINKFLAGS_PYEXT',dist_compiler.ldflags_shared)
-	try:
-		conf.check(header_name='Python.h',define_name='HAVE_PYTHON_H',uselib='PYEMBED',fragment=FRAG,errmsg='Could not find the python development headers')
-	except conf.errors.ConfigurationError:
-		conf.check_cfg(path=conf.env.PYTHON_CONFIG,package='',uselib_store='PYEMBED',args=['--cflags','--libs'])
-		conf.check(header_name='Python.h',define_name='HAVE_PYTHON_H',msg='Getting the python flags from python-config',uselib='PYEMBED',fragment=FRAG,errmsg='Could not find the python development headers elsewhere')
-def check_python_version(conf,minver=None):
-	assert minver is None or isinstance(minver,tuple)
-	pybin=conf.env['PYTHON']
-	if not pybin:
-		conf.fatal('could not find the python executable')
-	cmd=pybin+['-c','import sys\nfor x in sys.version_info: print(str(x))']
-	debug('python: Running python command %r'%cmd)
-	lines=conf.cmd_and_log(cmd).split()
-	assert len(lines)==5,"found %i lines, expected 5: %r"%(len(lines),lines)
-	pyver_tuple=(int(lines[0]),int(lines[1]),int(lines[2]),lines[3],int(lines[4]))
-	result=(minver is None)or(pyver_tuple>=minver)
-	if result:
-		pyver='.'.join([str(x)for x in pyver_tuple[:2]])
-		conf.env['PYTHON_VERSION']=pyver
-		if'PYTHONDIR'in conf.environ:
-			pydir=conf.environ['PYTHONDIR']
-		else:
-			if Utils.is_win32:
-				(python_LIBDEST,pydir)=conf.get_python_variables(["get_config_var('LIBDEST') or ''","get_python_lib(standard_lib=0, prefix=%r) or ''"%conf.env['PREFIX']],['from distutils.sysconfig import get_config_var, get_python_lib'])
-			else:
-				python_LIBDEST=None
-				(pydir,)=conf.get_python_variables(["get_python_lib(standard_lib=0, prefix=%r) or ''"%conf.env['PREFIX']],['from distutils.sysconfig import get_python_lib'])
-			if python_LIBDEST is None:
-				if conf.env['LIBDIR']:
-					python_LIBDEST=os.path.join(conf.env['LIBDIR'],"python"+pyver)
-				else:
-					python_LIBDEST=os.path.join(conf.env['PREFIX'],"lib","python"+pyver)
-		if'PYTHONARCHDIR'in conf.environ:
-			pyarchdir=conf.environ['PYTHONARCHDIR']
-		else:
-			(pyarchdir,)=conf.get_python_variables(["get_python_lib(plat_specific=1, standard_lib=0, prefix=%r) or ''"%conf.env['PREFIX']],['from distutils.sysconfig import get_python_lib'])
-			if not pyarchdir:
-				pyarchdir=pydir
-		if hasattr(conf,'define'):
-			conf.define('PYTHONDIR',pydir)
-			conf.define('PYTHONARCHDIR',pyarchdir)
-		conf.env['PYTHONDIR']=pydir
-		conf.env['PYTHONARCHDIR']=pyarchdir
-	pyver_full='.'.join(map(str,pyver_tuple[:3]))
-	if minver is None:
-		conf.msg('Checking for python version',pyver_full)
-	else:
-		minver_str='.'.join(map(str,minver))
-		conf.msg('Checking for python version',pyver_tuple,">= %s"%(minver_str,)and'GREEN'or'YELLOW')
-	if not result:
-		conf.fatal('The python version is too old, expecting %r'%(minver,))
-PYTHON_MODULE_TEMPLATE='''
-import %s
-print(1)
-'''
-def check_python_module(conf,module_name):
-	conf.start_msg('Python module %s'%module_name)
-	try:
-		conf.cmd_and_log(conf.env['PYTHON']+['-c',PYTHON_MODULE_TEMPLATE%module_name])
-	except:
-		conf.end_msg(False)
-		conf.fatal('Could not find the python module %r'%module_name)
-	conf.end_msg(True)
-def configure(conf):
-	try:
-		conf.find_program('python',var='PYTHON')
-	except conf.errors.ConfigurationError:
-		warn("could not find a python executable, setting to sys.executable '%s'"%sys.executable)
-		conf.env.PYTHON=sys.executable
-	if conf.env.PYTHON!=sys.executable:
-		warn("python executable '%s' different from sys.executable '%s'"%(conf.env.PYTHON,sys.executable))
-	conf.env.PYTHON=conf.cmd_to_list(conf.env.PYTHON)
-	v=conf.env
-	v['PYCMD']='"import sys, py_compile;py_compile.compile(sys.argv[1], sys.argv[2])"'
-	v['PYFLAGS']=''
-	v['PYFLAGS_OPT']='-O'
-	v['PYC']=getattr(Options.options,'pyc',1)
-	v['PYO']=getattr(Options.options,'pyo',1)
-def options(opt):
-	opt.add_option('--nopyc',action='store_false',default=1,help='Do not install bytecode compiled .pyc files (configuration) [Default:install]',dest='pyc')
-	opt.add_option('--nopyo',action='store_false',default=1,help='Do not install optimised compiled .pyo files (configuration) [Default:install]',dest='pyo')
-
-extension('.py')(process_py)
-feature('py')(feature_py)
-feature('pyext')(init_pyext)
-before_method('propagate_uselib_vars','apply_link')(init_pyext)
-after_method('apply_bundle')(init_pyext)
-feature('pyext')(set_bundle)
-before_method('apply_link','apply_bundle')(set_bundle)
-before_method('propagate_uselib_vars')(init_pyembed)
-feature('pyembed')(init_pyembed)
-conf(get_python_variables)
-conf(check_python_headers)
-conf(check_python_version)
-conf(check_python_module)
\ No newline at end of file
diff --git a/waflib/Tools/qt4.py b/waflib/Tools/qt4.py
deleted file mode 100644
index e50c61a..0000000
--- a/waflib/Tools/qt4.py
+++ /dev/null
@@ -1,424 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import sys
-if sys.hexversion < 0x020400f0: from sets import Set as set
-try:
-	from xml.sax import make_parser
-	from xml.sax.handler import ContentHandler
-except ImportError:
-	has_xml=False
-	ContentHandler=object
-else:
-	has_xml=True
-import os,sys
-from waflib.Tools import c_preproc,cxx
-from waflib import Task,Utils,Options,Errors
-from waflib.TaskGen import feature,after_method,extension
-from waflib.Configure import conf
-from waflib.Logs import error
-MOC_H=['.h','.hpp','.hxx','.hh']
-EXT_RCC=['.qrc']
-EXT_UI=['.ui']
-EXT_QT4=['.cpp','.cc','.cxx','.C']
-QT4_LIBS="QtCore QtGui QtUiTools QtNetwork QtOpenGL QtSql QtSvg QtTest QtXml QtXmlPatterns QtWebKit Qt3Support QtHelp QtScript QtDeclarative"
-class qxx(cxx.cxx):
-	def __init__(self,*k,**kw):
-		Task.Task.__init__(self,*k,**kw)
-		self.moc_done=0
-	def scan(self):
-		(nodes,names)=c_preproc.scan(self)
-		for x in nodes:
-			if x.name.endswith('.moc'):
-				nodes.remove(x)
-				names.append(x.path_from(self.inputs[0].parent.get_bld()))
-		return(nodes,names)
-	def runnable_status(self):
-		if self.moc_done:
-			return Task.Task.runnable_status(self)
-		else:
-			for t in self.run_after:
-				if not t.hasrun:
-					return Task.ASK_LATER
-			self.add_moc_tasks()
-			return Task.Task.runnable_status(self)
-	def add_moc_tasks(self):
-		node=self.inputs[0]
-		bld=self.generator.bld
-		try:
-			self.signature()
-		except KeyError:
-			pass
-		else:
-			delattr(self,'cache_sig')
-		moctasks=[]
-		mocfiles=[]
-		try:
-			tmp_lst=bld.raw_deps[self.uid()]
-			bld.raw_deps[self.uid()]=[]
-		except KeyError:
-			tmp_lst=[]
-		for d in tmp_lst:
-			if not d.endswith('.moc'):
-				continue
-			if d in mocfiles:
-				error("paranoia owns")
-				continue
-			mocfiles.append(d)
-			h_node=None
-			try:ext=Options.options.qt_header_ext.split()
-			except AttributeError:pass
-			if not ext:ext=MOC_H
-			base2=d[:-4]
-			for x in[node.parent]+self.generator.includes_nodes:
-				for e in ext:
-					h_node=x.find_node(base2+e)
-					if h_node:
-						break
-				else:
-					continue
-				break
-			else:
-				raise Errors.WafError('no header found for %r which is a moc file'%d)
-			m_node=h_node.change_ext('.moc')
-			bld.node_deps[(self.inputs[0].parent.abspath(),m_node.name)]=h_node
-			task=Task.classes['moc'](env=self.env,generator=self.generator)
-			task.set_inputs(h_node)
-			task.set_outputs(m_node)
-			gen=bld.producer
-			gen.outstanding.insert(0,task)
-			gen.total+=1
-			moctasks.append(task)
-		tmp_lst=bld.raw_deps[self.uid()]=mocfiles
-		lst=bld.node_deps.get(self.uid(),())
-		for d in lst:
-			name=d.name
-			if name.endswith('.moc'):
-				task=Task.classes['moc'](env=self.env,generator=self.generator)
-				task.set_inputs(bld.node_deps[(self.inputs[0].parent.abspath(),name)])
-				task.set_outputs(d)
-				gen=bld.producer
-				gen.outstanding.insert(0,task)
-				gen.total+=1
-				moctasks.append(task)
-		self.run_after.update(set(moctasks))
-		self.moc_done=1
-	run=Task.classes['cxx'].__dict__['run']
-class trans_update(Task.Task):
-	run_str='${QT_LUPDATE} ${SRC} -ts ${TGT}'
-	color='BLUE'
-Task.update_outputs(trans_update)
-class XMLHandler(ContentHandler):
-	def __init__(self):
-		self.buf=[]
-		self.files=[]
-	def startElement(self,name,attrs):
-		if name=='file':
-			self.buf=[]
-	def endElement(self,name):
-		if name=='file':
-			self.files.append(str(''.join(self.buf)))
-	def characters(self,cars):
-		self.buf.append(cars)
-def create_rcc_task(self,node):
-	rcnode=node.change_ext('_rc.cpp')
-	rcctask=self.create_task('rcc',node,rcnode)
-	cpptask=self.create_task('cxx',rcnode,rcnode.change_ext('.o'))
-	try:
-		self.compiled_tasks.append(cpptask)
-	except AttributeError:
-		self.compiled_tasks=[cpptask]
-	return cpptask
-def create_uic_task(self,node):
-	uictask=self.create_task('ui4',node)
-	uictask.outputs=[self.path.find_or_declare(self.env['ui_PATTERN']%node.name[:-3])]
-def add_lang(self,node):
-	self.lang=self.to_list(getattr(self,'lang',[]))+[node]
-def apply_qt4(self):
-	if getattr(self,'lang',None):
-		qmtasks=[]
-		for x in self.to_list(self.lang):
-			if isinstance(x,str):
-				x=self.path.find_resource(x+'.ts')
-			qmtasks.append(self.create_task('ts2qm',x,x.change_ext('.qm')))
-		if getattr(self,'update',None)and Options.options.trans_qt4:
-			cxxnodes=[a.inputs[0]for a in self.compiled_tasks]+[a.inputs[0]for a in self.tasks if getattr(a,'inputs',None)and a.inputs[0].name.endswith('.ui')]
-			for x in qmtasks:
-				self.create_task('trans_update',cxxnodes,x.inputs)
-		if getattr(self,'langname',None):
-			qmnodes=[x.outputs[0]for x in qmtasks]
-			rcnode=self.langname
-			if isinstance(rcnode,str):
-				rcnode=self.path.find_or_declare(rcnode+'.qrc')
-			t=self.create_task('qm2rcc',qmnodes,rcnode)
-			k=create_rcc_task(self,t.outputs[0])
-			self.link_task.inputs.append(k.outputs[0])
-	lst=[]
-	for flag in self.to_list(self.env['CXXFLAGS']):
-		if len(flag)<2:continue
-		f=flag[0:2]
-		if f in['-D','-I','/D','/I']:
-			if(f[0]=='/'):
-				lst.append('-'+flag[1:])
-			else:
-				lst.append(flag)
-	self.env['MOC_FLAGS']=lst
-def cxx_hook(self,node):
-	return self.create_compiled_task('qxx',node)
-class rcc(Task.Task):
-	color='BLUE'
-	run_str='${QT_RCC} -name ${SRC[0].name} ${SRC[0].abspath()} ${RCC_ST} -o ${TGT}'
-	ext_out=['.h']
-	def scan(self):
-		node=self.inputs[0]
-		parser=make_parser()
-		curHandler=XMLHandler()
-		parser.setContentHandler(curHandler)
-		fi=open(self.inputs[0].abspath())
-		parser.parse(fi)
-		fi.close()
-		nodes=[]
-		names=[]
-		root=self.inputs[0].parent
-		for x in curHandler.files:
-			nd=root.find_resource(x)
-			if nd:nodes.append(nd)
-			else:names.append(x)
-		return(nodes,names)
-class moc(Task.Task):
-	color='BLUE'
-	run_str='${QT_MOC} ${MOC_FLAGS} ${MOCCPPPATH_ST:INCPATHS} ${MOCDEFINES_ST:DEFINES} ${SRC} ${MOC_ST} ${TGT}'
-class ui4(Task.Task):
-	color='BLUE'
-	run_str='${QT_UIC} ${SRC} -o ${TGT}'
-	ext_out=['.h']
-class ts2qm(Task.Task):
-	color='BLUE'
-	run_str='${QT_LRELEASE} ${QT_LRELEASE_FLAGS} ${SRC} -qm ${TGT}'
-class qm2rcc(Task.Task):
-	color='BLUE'
-	after='ts2qm'
-	def run(self):
-		txt='\n'.join(['<file>%s</file>'%k.path_from(self.outputs[0].parent)for k in self.inputs])
-		code='<!DOCTYPE RCC><RCC version="1.0">\n<qresource>\n%s\n</qresource>\n</RCC>'%txt
-		self.outputs[0].write(code)
-def configure(self):
-	self.find_qt4_binaries()
-	self.set_qt4_libs_to_check()
-	self.find_qt4_libraries()
-	self.add_qt4_rpath()
-	self.simplify_qt4_libs()
-def find_qt4_binaries(self):
-	env=self.env
-	opt=Options.options
-	qtdir=getattr(opt,'qtdir','')
-	qtbin=getattr(opt,'qtbin','')
-	paths=[]
-	if qtdir:
-		qtbin=os.path.join(qtdir,'bin')
-	if not qtdir:
-		qtdir=self.environ.get('QT4_ROOT','')
-		qtbin=os.path.join(qtdir,'bin')
-	if qtbin:
-		paths=[qtbin]
-	if not qtdir:
-		paths=os.environ.get('PATH','').split(os.pathsep)
-		paths.append('/usr/share/qt4/bin/')
-		try:
-			lst=Utils.listdir('/usr/local/Trolltech/')
-		except OSError:
-			pass
-		else:
-			if lst:
-				lst.sort()
-				lst.reverse()
-				qtdir='/usr/local/Trolltech/%s/'%lst[0]
-				qtbin=os.path.join(qtdir,'bin')
-				paths.append(qtbin)
-	cand=None
-	prev_ver=['4','0','0']
-	for qmk in['qmake-qt4','qmake4','qmake']:
-		try:
-			qmake=self.find_program(qmk,path_list=paths)
-		except self.errors.ConfigurationError:
-			pass
-		else:
-			try:
-				version=self.cmd_and_log([qmake,'-query','QT_VERSION']).strip()
-			except self.errors.ConfigurationError:
-				pass
-			else:
-				if version:
-					new_ver=version.split('.')
-					if new_ver>prev_ver:
-						cand=qmake
-						prev_ver=new_ver
-	if cand:
-		self.env.QMAKE=cand
-	else:
-		self.fatal('Could not find qmake for qt4')
-	qtbin=self.cmd_and_log([self.env.QMAKE,'-query','QT_INSTALL_BINS']).strip()+os.sep
-	def find_bin(lst,var):
-		for f in lst:
-			try:
-				ret=self.find_program(f,path_list=paths)
-			except self.errors.ConfigurationError:
-				pass
-			else:
-				env[var]=ret
-				break
-	find_bin(['uic-qt3','uic3'],'QT_UIC3')
-	find_bin(['uic-qt4','uic'],'QT_UIC')
-	if not env['QT_UIC']:
-		self.fatal('cannot find the uic compiler for qt4')
-	try:
-		uicver=self.cmd_and_log(env['QT_UIC']+" -version 2>&1").strip()
-	except self.errors.ConfigurationError:
-		self.fatal('this uic compiler is for qt3, add uic for qt4 to your path')
-	uicver=uicver.replace('Qt User Interface Compiler ','').replace('User Interface Compiler for Qt','')
-	self.msg('Checking for uic version','%s'%uicver)
-	if uicver.find(' 3.')!=-1:
-		self.fatal('this uic compiler is for qt3, add uic for qt4 to your path')
-	find_bin(['moc-qt4','moc'],'QT_MOC')
-	find_bin(['rcc'],'QT_RCC')
-	find_bin(['lrelease-qt4','lrelease'],'QT_LRELEASE')
-	find_bin(['lupdate-qt4','lupdate'],'QT_LUPDATE')
-	env['UIC3_ST']='%s -o %s'
-	env['UIC_ST']='%s -o %s'
-	env['MOC_ST']='-o'
-	env['ui_PATTERN']='ui_%s.h'
-	env['QT_LRELEASE_FLAGS']=['-silent']
-	env.MOCCPPPATH_ST='-I%s'
-	env.MOCDEFINES_ST='-D%s'
-def find_qt4_libraries(self):
-	qtlibs=getattr(Options.options,'qtlibs','')
-	if not qtlibs:
-		try:
-			qtlibs=self.cmd_and_log([self.env.QMAKE,'-query','QT_INSTALL_LIBS']).strip()
-		except Errors.WafError:
-			qtdir=self.cmd_and_log([self.env.QMAKE,'-query','QT_INSTALL_PREFIX']).strip()+os.sep
-			qtlibs=os.path.join(qtdir,'lib')
-	self.msg('Found the Qt4 libraries in',qtlibs)
-	qtincludes=self.cmd_and_log([self.env.QMAKE,'-query','QT_INSTALL_HEADERS']).strip()
-	env=self.env
-	if not'PKG_CONFIG_PATH'in os.environ:
-		os.environ['PKG_CONFIG_PATH']='%s:%s/pkgconfig:/usr/lib/qt4/lib/pkgconfig:/opt/qt4/lib/pkgconfig:/usr/lib/qt4/lib:/opt/qt4/lib'%(qtlibs,qtlibs)
-	try:
-		self.check_cfg(atleast_pkgconfig_version='0.1')
-	except self.errors.ConfigurationError:
-		for i in self.qt4_vars:
-			uselib=i.upper()
-			if sys.platform=="darwin":
-				frameworkName=i+".framework"
-				qtDynamicLib=os.path.join(qtlibs,frameworkName,i)
-				if os.path.exists(qtDynamicLib):
-					env.append_unique('FRAMEWORK_'+uselib,i)
-					self.msg('Checking for %s'%i,qtDynamicLib,'GREEN')
-				else:
-					self.msg('Checking for %s'%i,False,'YELLOW')
-				env.append_unique('INCLUDES_'+uselib,os.path.join(qtlibs,frameworkName,'Headers'))
-			elif sys.platform!="win32":
-				qtDynamicLib=os.path.join(qtlibs,"lib"+i+".so")
-				qtStaticLib=os.path.join(qtlibs,"lib"+i+".a")
-				if os.path.exists(qtDynamicLib):
-					env.append_unique('LIB_'+uselib,i)
-					self.msg('Checking for %s'%i,qtDynamicLib,'GREEN')
-				elif os.path.exists(qtStaticLib):
-					env.append_unique('LIB_'+uselib,i)
-					self.msg('Checking for %s'%i,qtStaticLib,'GREEN')
-				else:
-					self.msg('Checking for %s'%i,False,'YELLOW')
-				env.append_unique('LIBPATH_'+uselib,qtlibs)
-				env.append_unique('INCLUDES_'+uselib,qtincludes)
-				env.append_unique('INCLUDES_'+uselib,os.path.join(qtincludes,i))
-			else:
-				for k in("lib%s.a","lib%s4.a","%s.lib","%s4.lib"):
-					lib=os.path.join(qtlibs,k%i)
-					if os.path.exists(lib):
-						env.append_unique('LIB_'+uselib,i+k[k.find("%s")+2:k.find('.')])
-						self.msg('Checking for %s'%i,lib,'GREEN')
-						break
-				else:
-					self.msg('Checking for %s'%i,False,'YELLOW')
-				env.append_unique('LIBPATH_'+uselib,qtlibs)
-				env.append_unique('INCLUDES_'+uselib,qtincludes)
-				env.append_unique('INCLUDES_'+uselib,os.path.join(qtincludes,i))
-				uselib=i.upper()+"_debug"
-				for k in("lib%sd.a","lib%sd4.a","%sd.lib","%sd4.lib"):
-					lib=os.path.join(qtlibs,k%i)
-					if os.path.exists(lib):
-						env.append_unique('LIB_'+uselib,i+k[k.find("%s")+2:k.find('.')])
-						self.msg('Checking for %s'%i,lib,'GREEN')
-						break
-				else:
-					self.msg('Checking for %s'%i,False,'YELLOW')
-				env.append_unique('LIBPATH_'+uselib,qtlibs)
-				env.append_unique('INCLUDES_'+uselib,qtincludes)
-				env.append_unique('INCLUDES_'+uselib,os.path.join(qtincludes,i))
-	else:
-		for i in self.qt4_vars_debug+self.qt4_vars:
-			self.check_cfg(package=i,args='--cflags --libs',mandatory=False)
-def simplify_qt4_libs(self):
-	env=self.env
-	def process_lib(vars_,coreval):
-		for d in vars_:
-			var=d.upper()
-			if var=='QTCORE':
-				continue
-			value=env['LIBPATH_'+var]
-			if value:
-				core=env[coreval]
-				accu=[]
-				for lib in value:
-					if lib in core:
-						continue
-					accu.append(lib)
-				env['LIBPATH_'+var]=accu
-	process_lib(self.qt4_vars,'LIBPATH_QTCORE')
-	process_lib(self.qt4_vars_debug,'LIBPATH_QTCORE_DEBUG')
-def add_qt4_rpath(self):
-	env=self.env
-	if Options.options.want_rpath:
-		def process_rpath(vars_,coreval):
-			for d in vars_:
-				var=d.upper()
-				value=env['LIBPATH_'+var]
-				if value:
-					core=env[coreval]
-					accu=[]
-					for lib in value:
-						if var!='QTCORE':
-							if lib in core:
-								continue
-						accu.append('-Wl,--rpath='+lib)
-					env['RPATH_'+var]=accu
-		process_rpath(self.qt4_vars,'LIBPATH_QTCORE')
-		process_rpath(self.qt4_vars_debug,'LIBPATH_QTCORE_DEBUG')
-def set_qt4_libs_to_check(self):
-	if not hasattr(self,'qt4_vars'):
-		self.qt4_vars=QT4_LIBS
-	self.qt4_vars=Utils.to_list(self.qt4_vars)
-	if not hasattr(self,'qt4_vars_debug'):
-		self.qt4_vars_debug=[a+'_debug'for a in self.qt4_vars]
-	self.qt4_vars_debug=Utils.to_list(self.qt4_vars_debug)
-def options(opt):
-	opt.add_option('--want-rpath',action='store_true',default=False,dest='want_rpath',help='enable the rpath for qt libraries')
-	opt.add_option('--header-ext',type='string',default='',help='header extension for moc files',dest='qt_header_ext')
-	for i in'qtdir qtbin qtlibs'.split():
-		opt.add_option('--'+i,type='string',default='',dest=i)
-	if sys.platform=="darwin":
-		opt.add_option('--no-qt4-framework',action="store_false",help='do not use the framework version of Qt4 in OS X',dest='use_qt4_osxframework',default=True)
-	opt.add_option('--translate',action="store_true",help="collect translation strings",dest="trans_qt4",default=False)
-
-extension(*EXT_RCC)(create_rcc_task)
-extension(*EXT_UI)(create_uic_task)
-extension('.ts')(add_lang)
-feature('qt4')(apply_qt4)
-after_method('apply_link')(apply_qt4)
-extension(*EXT_QT4)(cxx_hook)
-conf(find_qt4_binaries)
-conf(find_qt4_libraries)
-conf(simplify_qt4_libs)
-conf(add_qt4_rpath)
-conf(set_qt4_libs_to_check)
\ No newline at end of file
diff --git a/waflib/Tools/ruby.py b/waflib/Tools/ruby.py
deleted file mode 100644
index df21a31..0000000
--- a/waflib/Tools/ruby.py
+++ /dev/null
@@ -1,104 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os
-from waflib import Task,Options,Utils
-from waflib.TaskGen import before_method,feature,after_method,Task,extension
-from waflib.Configure import conf
-def init_rubyext(self):
-	self.install_path='${ARCHDIR_RUBY}'
-	self.uselib=self.to_list(getattr(self,'uselib',''))
-	if not'RUBY'in self.uselib:
-		self.uselib.append('RUBY')
-	if not'RUBYEXT'in self.uselib:
-		self.uselib.append('RUBYEXT')
-def apply_ruby_so_name(self):
-	self.env['cshlib_PATTERN']=self.env['cxxshlib_PATTERN']=self.env['rubyext_PATTERN']
-def check_ruby_version(self,minver=()):
-	if Options.options.rubybinary:
-		self.env.RUBY=Options.options.rubybinary
-	else:
-		self.find_program('ruby',var='RUBY')
-	ruby=self.env.RUBY
-	try:
-		version=self.cmd_and_log([ruby,'-e','puts defined?(VERSION) ? VERSION : RUBY_VERSION']).strip()
-	except:
-		self.fatal('could not determine ruby version')
-	self.env.RUBY_VERSION=version
-	try:
-		ver=tuple(map(int,version.split(".")))
-	except:
-		self.fatal('unsupported ruby version %r'%version)
-	cver=''
-	if minver:
-		if ver<minver:
-			self.fatal('ruby is too old %r'%ver)
-		cver='.'.join([str(x)for x in minver])
-	else:
-		cver=ver
-	self.msg('Checking for ruby version %s'%str(minver or''),cver)
-def check_ruby_ext_devel(self):
-	if not self.env.RUBY:
-		self.fatal('ruby detection is required first')
-	if not self.env.CC_NAME and not self.env.CXX_NAME:
-		self.fatal('load a c/c++ compiler first')
-	version=tuple(map(int,self.env.RUBY_VERSION.split(".")))
-	def read_out(cmd):
-		return Utils.to_list(self.cmd_and_log([self.env.RUBY,'-rrbconfig','-e',cmd]))
-	def read_config(key):
-		return read_out('puts Config::CONFIG[%r]'%key)
-	ruby=self.env['RUBY']
-	archdir=read_config('archdir')
-	cpppath=archdir
-	if version>=(1,9,0):
-		ruby_hdrdir=read_config('rubyhdrdir')
-		cpppath+=ruby_hdrdir
-		cpppath+=[os.path.join(ruby_hdrdir[0],read_config('arch')[0])]
-	self.check(header_name='ruby.h',includes=cpppath,errmsg='could not find ruby header file')
-	self.env.LIBPATH_RUBYEXT=read_config('libdir')
-	self.env.LIBPATH_RUBYEXT+=archdir
-	self.env.INCLUDES_RUBYEXT=cpppath
-	self.env.CFLAGS_RUBYEXT=read_config('CCDLFLAGS')
-	self.env.rubyext_PATTERN='%s.'+read_config('DLEXT')[0]
-	flags=read_config('LDSHARED')
-	while flags and flags[0][0]!='-':
-		flags=flags[1:]
-	if len(flags)>1 and flags[1]=="ppc":
-		flags=flags[2:]
-	self.env.LINKFLAGS_RUBYEXT=flags
-	self.env.LINKFLAGS_RUBYEXT+=read_config('LIBS')
-	self.env.LINKFLAGS_RUBYEXT+=read_config('LIBRUBYARG_SHARED')
-	if Options.options.rubyarchdir:
-		self.env.ARCHDIR_RUBY=Options.options.rubyarchdir
-	else:
-		self.env.ARCHDIR_RUBY=read_config('sitearchdir')[0]
-	if Options.options.rubylibdir:
-		self.env.LIBDIR_RUBY=Options.options.rubylibdir
-	else:
-		self.env.LIBDIR_RUBY=read_config('sitelibdir')[0]
-def check_ruby_module(self,module_name):
-	self.start_msg('Ruby module %s'%module_name)
-	try:
-		self.cmd_and_log([self.env['RUBY'],'-e','require \'%s\';puts 1'%module_name])
-	except:
-		self.end_msg(False)
-		self.fatal('Could not find the ruby module %r'%module_name)
-	self.end_msg(True)
-def process(self,node):
-	tsk=self.create_task('run_ruby',node)
-class run_ruby(Task.Task):
-	run_str='${RUBY} ${RBFLAGS} -I ${SRC[0].parent.abspath()} ${SRC}'
-def options(opt):
-	opt.add_option('--with-ruby-archdir',type='string',dest='rubyarchdir',help='Specify directory where to install arch specific files')
-	opt.add_option('--with-ruby-libdir',type='string',dest='rubylibdir',help='Specify alternate ruby library path')
-	opt.add_option('--with-ruby-binary',type='string',dest='rubybinary',help='Specify alternate ruby binary')
-
-feature('rubyext')(init_rubyext)
-before_method('apply_incpaths','apply_lib_vars','apply_bundle','apply_link')(init_rubyext)
-feature('rubyext')(apply_ruby_so_name)
-before_method('apply_link','propagate_uselib')(apply_ruby_so_name)
-conf(check_ruby_version)
-conf(check_ruby_ext_devel)
-conf(check_ruby_module)
-extension('.rb')(process)
\ No newline at end of file
diff --git a/waflib/Tools/suncc.py b/waflib/Tools/suncc.py
deleted file mode 100644
index fcc61d1..0000000
--- a/waflib/Tools/suncc.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os
-from waflib import Utils
-from waflib.Tools import ccroot,ar
-from waflib.Configure import conf
-def find_scc(conf):
-	v=conf.env
-	cc=None
-	if v['CC']:cc=v['CC']
-	elif'CC'in conf.environ:cc=conf.environ['CC']
-	if not cc:cc=conf.find_program('cc',var='CC')
-	if not cc:conf.fatal('Could not find a Sun C compiler')
-	cc=conf.cmd_to_list(cc)
-	try:
-		conf.cmd_and_log(cc+['-flags'])
-	except:
-		conf.fatal('%r is not a Sun compiler'%cc)
-	v['CC']=cc
-	v['CC_NAME']='sun'
-def scc_common_flags(conf):
-	v=conf.env
-	v['CC_SRC_F']=[]
-	v['CC_TGT_F']=['-c','-o']
-	if not v['LINK_CC']:v['LINK_CC']=v['CC']
-	v['CCLNK_SRC_F']=''
-	v['CCLNK_TGT_F']=['-o']
-	v['CPPPATH_ST']='-I%s'
-	v['DEFINES_ST']='-D%s'
-	v['LIB_ST']='-l%s'
-	v['LIBPATH_ST']='-L%s'
-	v['STLIB_ST']='-l%s'
-	v['STLIBPATH_ST']='-L%s'
-	v['SONAME_ST']='-Wl,-h,%s'
-	v['SHLIB_MARKER']='-Bdynamic'
-	v['STLIB_MARKER']='-Bstatic'
-	v['cprogram_PATTERN']='%s'
-	v['CFLAGS_cshlib']=['-Kpic','-DPIC']
-	v['LINKFLAGS_cshlib']=['-G']
-	v['cshlib_PATTERN']='lib%s.so'
-	v['LINKFLAGS_cstlib']=['-Bstatic']
-	v['cstlib_PATTERN']='lib%s.a'
-def configure(conf):
-	conf.find_scc()
-	conf.find_ar()
-	conf.scc_common_flags()
-	conf.cc_load_tools()
-	conf.cc_add_flags()
-	conf.link_add_flags()
-
-conf(find_scc)
-conf(scc_common_flags)
\ No newline at end of file
diff --git a/waflib/Tools/suncxx.py b/waflib/Tools/suncxx.py
deleted file mode 100644
index c604cd2..0000000
--- a/waflib/Tools/suncxx.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os
-from waflib import Utils
-from waflib.Tools import ccroot,ar
-from waflib.Configure import conf
-def find_sxx(conf):
-	v=conf.env
-	cc=None
-	if v['CXX']:cc=v['CXX']
-	elif'CXX'in conf.environ:cc=conf.environ['CXX']
-	if not cc:cc=conf.find_program('CC',var='CXX')
-	if not cc:cc=conf.find_program('c++',var='CXX')
-	if not cc:conf.fatal('Could not find a Sun C++ compiler')
-	cc=conf.cmd_to_list(cc)
-	try:
-		conf.cmd_and_log(cc+['-flags'])
-	except:
-		conf.fatal('%r is not a Sun compiler'%cc)
-	v['CXX']=cc
-	v['CXX_NAME']='sun'
-def sxx_common_flags(conf):
-	v=conf.env
-	v['CXX_SRC_F']=[]
-	v['CXX_TGT_F']=['-c','-o']
-	if not v['LINK_CXX']:v['LINK_CXX']=v['CXX']
-	v['CXXLNK_SRC_F']=[]
-	v['CXXLNK_TGT_F']=['-o']
-	v['CPPPATH_ST']='-I%s'
-	v['DEFINES_ST']='-D%s'
-	v['LIB_ST']='-l%s'
-	v['LIBPATH_ST']='-L%s'
-	v['STLIB_ST']='-l%s'
-	v['STLIBPATH_ST']='-L%s'
-	v['SONAME_ST']='-Wl,-h,%s'
-	v['SHLIB_MARKER']='-Bdynamic'
-	v['STLIB_MARKER']='-Bstatic'
-	v['cxxprogram_PATTERN']='%s'
-	v['CXXFLAGS_cxxshlib']=['-Kpic','-DPIC']
-	v['LINKFLAGS_cxxshlib']=['-G']
-	v['cxxshlib_PATTERN']='lib%s.so'
-	v['LINKFLAGS_cxxstlib']=['-Bstatic']
-	v['cxxstlib_PATTERN']='lib%s.a'
-def configure(conf):
-	conf.find_sxx()
-	conf.find_ar()
-	conf.sxx_common_flags()
-	conf.cxx_load_tools()
-	conf.cxx_add_flags()
-	conf.link_add_flags()
-
-conf(find_sxx)
-conf(sxx_common_flags)
\ No newline at end of file
diff --git a/waflib/Tools/tex.py b/waflib/Tools/tex.py
deleted file mode 100644
index 6dc5f23..0000000
--- a/waflib/Tools/tex.py
+++ /dev/null
@@ -1,222 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,re
-from waflib import Utils,Task,Runner,Build,Errors
-from waflib.TaskGen import feature,before_method
-from waflib.Logs import error,warn,debug
-re_bibunit=re.compile(r'\\(?P<type>putbib)\[(?P<file>[^\[\]]*)\]',re.M)
-def bibunitscan(self):
-	node=self.inputs[0]
-	env=self.env
-	nodes=[]
-	if not node:return nodes
-	code=Utils.readf(node.abspath())
-	for match in re_bibunit.finditer(code):
-		path=match.group('file')
-		if path:
-			for k in['','.bib']:
-				debug('tex: trying %s%s'%(path,k))
-				fi=node.parent.find_resource(path+k)
-				if fi:
-					nodes.append(fi)
-			else:
-				debug('tex: could not find %s'%path)
-	debug("tex: found the following bibunit files: %s"%nodes)
-	return nodes
-exts_deps_tex=['','.ltx','.tex','.bib','.pdf','.png','.eps','.ps']
-re_tex=re.compile(r'\\(?P<type>include|bibliography|putbib|includegraphics|input|import|bringin|lstinputlisting)(\[[^\[\]]*\])?{(?P<file>[^{}]*)}',re.M)
-g_bibtex_re=re.compile('bibdata',re.M)
-class tex(Task.Task):
-	bibtex_fun,_=Task.compile_fun('${BIBTEX} ${BIBTEXFLAGS} ${SRCFILE}',shell=False)
-	bibtex_fun.__doc__="""
-	Execute the program **bibtex**
-	"""
-	makeindex_fun,_=Task.compile_fun('${MAKEINDEX} ${MAKEINDEXFLAGS} ${SRCFILE}',shell=False)
-	makeindex_fun.__doc__="""
-	Execute the program **makeindex**
-	"""
-	def scan(self):
-		node=self.inputs[0]
-		env=self.env
-		nodes=[]
-		names=[]
-		seen=[]
-		if not node:return(nodes,names)
-		def parse_node(node):
-			if node in seen:
-				return
-			seen.append(node)
-			code=node.read()
-			global re_tex
-			for match in re_tex.finditer(code):
-				for path in match.group('file').split(','):
-					if path:
-						add_name=True
-						found=None
-						for k in exts_deps_tex:
-							debug('tex: trying %s%s'%(path,k))
-							found=node.parent.find_resource(path+k)
-							if found and not found in self.outputs:
-								nodes.append(found)
-								add_name=False
-								if found.name.endswith('.tex')or found.name.endswith('.ltx'):
-									parse_node(found)
-						if add_name:
-							names.append(path)
-		parse_node(node)
-		for x in nodes:
-			x.parent.get_bld().mkdir()
-		debug("tex: found the following : %s and names %s"%(nodes,names))
-		return(nodes,names)
-	def check_status(self,msg,retcode):
-		if retcode!=0:
-			raise Errors.WafError("%r command exit status %r"%(msg,retcode))
-	def bibfile(self):
-		try:
-			ct=self.aux_node.read()
-		except(OSError,IOError):
-			error('error bibtex scan')
-		else:
-			fo=g_bibtex_re.findall(ct)
-			if fo:
-				warn('calling bibtex')
-				self.env.env={}
-				self.env.env.update(os.environ)
-				self.env.env.update({'BIBINPUTS':self.TEXINPUTS,'BSTINPUTS':self.TEXINPUTS})
-				self.env.SRCFILE=self.aux_node.name[:-4]
-				self.check_status('error when calling bibtex',self.bibtex_fun())
-	def bibunits(self):
-		try:
-			bibunits=bibunitscan(self)
-		except FSError:
-			error('error bibunitscan')
-		else:
-			if bibunits:
-				fn=['bu'+str(i)for i in xrange(1,len(bibunits)+1)]
-				if fn:
-					warn('calling bibtex on bibunits')
-				for f in fn:
-					self.env.env={'BIBINPUTS':self.TEXINPUTS,'BSTINPUTS':self.TEXINPUTS}
-					self.env.SRCFILE=f
-					self.check_status('error when calling bibtex',self.bibtex_fun())
-	def makeindex(self):
-		try:
-			idx_path=self.idx_node.abspath()
-			os.stat(idx_path)
-		except OSError:
-			warn('index file %s absent, not calling makeindex'%idx_path)
-		else:
-			warn('calling makeindex')
-			self.env.SRCFILE=self.idx_node.name
-			self.env.env={}
-			self.check_status('error when calling makeindex %s'%idx_path,self.makeindex_fun())
-	def run(self):
-		env=self.env
-		bld=self.generator.bld
-		if not env['PROMPT_LATEX']:
-			env.append_value('LATEXFLAGS','-interaction=batchmode')
-			env.append_value('PDFLATEXFLAGS','-interaction=batchmode')
-			env.append_value('XELATEXFLAGS','-interaction=batchmode')
-		fun=self.texfun
-		node=self.inputs[0]
-		srcfile=node.abspath()
-		texinputs=self.env.TEXINPUTS or''
-		self.TEXINPUTS=node.parent.get_bld().abspath()+os.pathsep+node.parent.get_src().abspath()+os.pathsep+texinputs+os.pathsep
-		self.aux_node=node.change_ext('.aux')
-		self.idx_node=node.change_ext('.idx')
-		self.cwd=self.inputs[0].parent.get_bld().abspath()
-		warn('first pass on %s'%self.__class__.__name__)
-		self.env.env={}
-		self.env.env.update(os.environ)
-		self.env.env.update({'TEXINPUTS':self.TEXINPUTS})
-		self.env.SRCFILE=srcfile
-		self.check_status('error when calling latex',fun())
-		self.bibfile()
-		self.bibunits()
-		self.makeindex()
-		hash=''
-		for i in range(10):
-			prev_hash=hash
-			try:
-				hash=Utils.h_file(self.aux_node.abspath())
-			except(OSError,IOError):
-				error('could not read aux.h -> %s'%self.aux_node.abspath())
-				pass
-			if hash and hash==prev_hash:
-				break
-			warn('calling %s'%self.__class__.__name__)
-			self.env.env={}
-			self.env.env.update(os.environ)
-			self.env.env.update({'TEXINPUTS':self.TEXINPUTS})
-			self.env.SRCFILE=srcfile
-			self.check_status('error when calling %s'%self.__class__.__name__,fun())
-class latex(tex):
-	texfun,vars=Task.compile_fun('${LATEX} ${LATEXFLAGS} ${SRCFILE}',shell=False)
-class pdflatex(tex):
-	texfun,vars=Task.compile_fun('${PDFLATEX} ${PDFLATEXFLAGS} ${SRCFILE}',shell=False)
-class xelatex(tex):
-	texfun,vars=Task.compile_fun('${XELATEX} ${XELATEXFLAGS} ${SRCFILE}',shell=False)
-class dvips(Task.Task):
-	run_str='${DVIPS} ${DVIPSFLAGS} ${SRC} -o ${TGT}'
-	color='BLUE'
-	after=['latex','pdflatex','xelatex']
-class dvipdf(Task.Task):
-	run_str='${DVIPDF} ${DVIPDFFLAGS} ${SRC} ${TGT}'
-	color='BLUE'
-	after=['latex','pdflatex','xelatex']
-class pdf2ps(Task.Task):
-	run_str='${PDF2PS} ${PDF2PSFLAGS} ${SRC} ${TGT}'
-	color='BLUE'
-	after=['latex','pdflatex','xelatex']
-def apply_tex(self):
-	if not getattr(self,'type',None)in['latex','pdflatex','xelatex']:
-		self.type='pdflatex'
-	tree=self.bld
-	outs=Utils.to_list(getattr(self,'outs',[]))
-	self.env['PROMPT_LATEX']=getattr(self,'prompt',1)
-	deps_lst=[]
-	if getattr(self,'deps',None):
-		deps=self.to_list(self.deps)
-		for filename in deps:
-			n=self.path.find_resource(filename)
-			if not n in deps_lst:deps_lst.append(n)
-	for node in self.to_nodes(self.source):
-		if self.type=='latex':
-			task=self.create_task('latex',node,node.change_ext('.dvi'))
-		elif self.type=='pdflatex':
-			task=self.create_task('pdflatex',node,node.change_ext('.pdf'))
-		elif self.type=='xelatex':
-			task=self.create_task('xelatex',node,node.change_ext('.pdf'))
-		task.env=self.env
-		if deps_lst:
-			try:
-				lst=tree.node_deps[task.uid()]
-				for n in deps_lst:
-					if not n in lst:
-						lst.append(n)
-			except KeyError:
-				tree.node_deps[task.uid()]=deps_lst
-		if self.type=='latex':
-			if'ps'in outs:
-				tsk=self.create_task('dvips',task.outputs,node.change_ext('.ps'))
-				tsk.env.env={'TEXINPUTS':node.parent.abspath()+os.pathsep+self.path.abspath()+os.pathsep+self.path.get_bld().abspath()}
-			if'pdf'in outs:
-				tsk=self.create_task('dvipdf',task.outputs,node.change_ext('.pdf'))
-				tsk.env.env={'TEXINPUTS':node.parent.abspath()+os.pathsep+self.path.abspath()+os.pathsep+self.path.get_bld().abspath()}
-		elif self.type=='pdflatex':
-			if'ps'in outs:
-				self.create_task('pdf2ps',task.outputs,node.change_ext('.ps'))
-	self.source=[]
-def configure(self):
-	v=self.env
-	for p in'tex latex pdflatex xelatex bibtex dvips dvipdf ps2pdf makeindex pdf2ps'.split():
-		try:
-			self.find_program(p,var=p.upper())
-		except self.errors.ConfigurationError:
-			pass
-	v['DVIPSFLAGS']='-Ppdf'
-
-feature('tex')(apply_tex)
-before_method('process_source')(apply_tex)
\ No newline at end of file
diff --git a/waflib/Tools/vala.py b/waflib/Tools/vala.py
deleted file mode 100644
index fc21eb2..0000000
--- a/waflib/Tools/vala.py
+++ /dev/null
@@ -1,215 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os.path,shutil,re
-from waflib import Context,Task,Utils,Logs,Options,Errors
-from waflib.TaskGen import extension
-from waflib.Configure import conf
-class valac(Task.Task):
-	vars=["VALAC","VALAC_VERSION","VALAFLAGS"]
-	ext_out=['.h']
-	def run(self):
-		env=self.env
-		cmd=[env['VALAC'],'-C','--quiet']
-		cmd.extend(Utils.to_list(env['VALAFLAGS']))
-		if self.threading:
-			cmd.append('--thread')
-		if self.profile:
-			cmd.append('--profile=%s'%self.profile)
-		if self.target_glib:
-			cmd.append('--target-glib=%s'%self.target_glib)
-		if self.is_lib:
-			cmd.append('--library='+self.target)
-			for x in self.outputs:
-				if x.name.endswith('.h'):
-					cmd.append('--header='+x.name)
-			if self.gir:
-				cmd.append('--gir=%s.gir'%self.gir)
-		for vapi_dir in self.vapi_dirs:
-			cmd.append('--vapidir=%s'%vapi_dir)
-		for package in self.packages:
-			cmd.append('--pkg=%s'%package)
-		for package in self.packages_private:
-			cmd.append('--pkg=%s'%package)
-		for define in self.vala_defines:
-			cmd.append('--define=%s'%define)
-		cmd.extend([a.abspath()for a in self.inputs])
-		ret=self.exec_command(cmd,cwd=self.outputs[0].parent.abspath())
-		if ret:
-			return ret
-		for x in self.outputs:
-			if id(x.parent)!=id(self.outputs[0].parent):
-				shutil.move(self.outputs[0].parent.abspath()+os.sep+x.name,x.abspath())
-		if self.packages and getattr(self,'deps_node',None):
-			self.deps_node.write('\n'.join(self.packages))
-		return ret
-def vala_file(self,node):
-	valatask=getattr(self,"valatask",None)
-	if not valatask:
-		def _get_api_version():
-			api_version='1.0'
-			if hasattr(Context.g_module,'API_VERSION'):
-				version=Context.g_module.API_VERSION.split(".")
-				if version[0]=="0":
-					api_version="0."+version[1]
-				else:
-					api_version=version[0]+".0"
-			return api_version
-		valatask=self.create_task('valac')
-		self.valatask=valatask
-		self.includes=Utils.to_list(getattr(self,'includes',[]))
-		self.uselib=self.to_list(getattr(self,'uselib',[]))
-		valatask.packages=[]
-		valatask.packages_private=Utils.to_list(getattr(self,'packages_private',[]))
-		valatask.vapi_dirs=[]
-		valatask.target=self.target
-		valatask.threading=False
-		valatask.install_path=getattr(self,'install_path','')
-		valatask.profile=getattr(self,'profile','gobject')
-		valatask.vala_defines=getattr(self,'vala_defines',[])
-		valatask.target_glib=None
-		valatask.gir=getattr(self,'gir',None)
-		valatask.gir_path=getattr(self,'gir_path','${DATAROOTDIR}/gir-1.0')
-		valatask.vapi_path=getattr(self,'vapi_path','${DATAROOTDIR}/vala/vapi')
-		valatask.pkg_name=getattr(self,'pkg_name',self.env['PACKAGE'])
-		valatask.header_path=getattr(self,'header_path','${INCLUDEDIR}/%s-%s'%(valatask.pkg_name,_get_api_version()))
-		valatask.is_lib=False
-		if not'cprogram'in self.features:
-			valatask.is_lib=True
-		packages=Utils.to_list(getattr(self,'packages',[]))
-		vapi_dirs=Utils.to_list(getattr(self,'vapi_dirs',[]))
-		includes=[]
-		if hasattr(self,'use'):
-			local_packages=Utils.to_list(self.use)[:]
-			seen=[]
-			while len(local_packages)>0:
-				package=local_packages.pop()
-				if package in seen:
-					continue
-				seen.append(package)
-				try:
-					package_obj=self.bld.get_tgen_by_name(package)
-				except Errors.WafError:
-					continue
-				package_name=package_obj.target
-				package_node=package_obj.path
-				package_dir=package_node.path_from(self.path)
-				for task in package_obj.tasks:
-					for output in task.outputs:
-						if output.name==package_name+".vapi":
-							valatask.set_run_after(task)
-							if package_name not in packages:
-								packages.append(package_name)
-							if package_dir not in vapi_dirs:
-								vapi_dirs.append(package_dir)
-							if package_dir not in includes:
-								includes.append(package_dir)
-				if hasattr(package_obj,'use'):
-					lst=self.to_list(package_obj.use)
-					lst.reverse()
-					local_packages=[pkg for pkg in lst if pkg not in seen]+local_packages
-		valatask.packages=packages
-		for vapi_dir in vapi_dirs:
-			try:
-				valatask.vapi_dirs.append(self.path.find_dir(vapi_dir).abspath())
-				valatask.vapi_dirs.append(self.path.find_dir(vapi_dir).get_bld().abspath())
-			except AttributeError:
-				Logs.warn("Unable to locate Vala API directory: '%s'"%vapi_dir)
-		self.includes.append(self.bld.srcnode.abspath())
-		self.includes.append(self.bld.bldnode.abspath())
-		for include in includes:
-			try:
-				self.includes.append(self.path.find_dir(include).abspath())
-				self.includes.append(self.path.find_dir(include).get_bld().abspath())
-			except AttributeError:
-				Logs.warn("Unable to locate include directory: '%s'"%include)
-		if valatask.profile=='gobject':
-			if hasattr(self,'target_glib'):
-				Logs.warn('target_glib on vala tasks is not supported --vala-target-glib=MAJOR.MINOR from the vala tool options')
-			if getattr(Options.options,'vala_target_glib',None):
-				valatask.target_glib=Options.options.vala_target_glib
-			if not'GOBJECT'in self.uselib:
-				self.uselib.append('GOBJECT')
-		if hasattr(self,'threading'):
-			if valatask.profile=='gobject':
-				valatask.threading=self.threading
-				if not'GTHREAD'in self.uselib:
-					self.uselib.append('GTHREAD')
-			else:
-				Logs.warn("Profile %s does not have threading support"%valatask.profile)
-		if valatask.is_lib:
-			valatask.outputs.append(self.path.find_or_declare('%s.h'%self.target))
-			valatask.outputs.append(self.path.find_or_declare('%s.vapi'%self.target))
-			if valatask.gir:
-				valatask.outputs.append(self.path.find_or_declare('%s.gir'%self.gir))
-			if valatask.packages:
-				d=self.path.find_or_declare('%s.deps'%self.target)
-				valatask.outputs.append(d)
-				valatask.deps_node=d
-	valatask.inputs.append(node)
-	c_node=node.change_ext('.c')
-	valatask.outputs.append(c_node)
-	self.source.append(c_node)
-	if valatask.is_lib:
-		headers_list=[o for o in valatask.outputs if o.suffix()==".h"]
-		try:
-			self.install_vheader.source=headers_list
-		except AttributeError:
-			self.install_vheader=self.bld.install_files(valatask.header_path,headers_list,self.env)
-		vapi_list=[o for o in valatask.outputs if(o.suffix()in(".vapi",".deps"))]
-		try:
-			self.install_vapi.source=vapi_list
-		except AttributeError:
-			self.install_vapi=self.bld.install_files(valatask.vapi_path,vapi_list,self.env)
-		gir_list=[o for o in valatask.outputs if o.suffix()==".gir"]
-		try:
-			self.install_gir.source=gir_list
-		except AttributeError:
-			self.install_gir=self.bld.install_files(valatask.gir_path,gir_list,self.env)
-valac=Task.update_outputs(valac)
-def find_valac(self,valac_name,min_version):
-	valac=self.find_program(valac_name,var='VALAC')
-	try:
-		output=self.cmd_and_log(valac+' --version')
-	except Exception:
-		valac_version=None
-	else:
-		ver=re.search(r'\d+.\d+.\d+',output).group(0).split('.')
-		valac_version=tuple([int(x)for x in ver])
-	self.msg('Checking for %s version >= %r'%(valac_name,min_version),valac_version,valac_version and valac_version>=min_version)
-	if valac and valac_version<min_version:
-		self.fatal("%s version %r is too old, need >= %r"%(valac_name,valac_version,min_version))
-	self.env['VALAC_VERSION']=valac_version
-	return valac
-def check_vala(self,min_version=(0,8,0),branch=None):
-	if not branch:
-		branch=min_version[:2]
-	try:
-		find_valac(self,'valac-%d.%d'%(branch[0],branch[1]),min_version)
-	except self.errors.ConfigurationError:
-		find_valac(self,'valac',min_version)
-def check_vala_deps(self):
-	if not self.env['HAVE_GOBJECT']:
-		pkg_args={'package':'gobject-2.0','uselib_store':'GOBJECT','args':'--cflags --libs'}
-		if getattr(Options.options,'vala_target_glib',None):
-			pkg_args['atleast_version']=Options.options.vala_target_glib
-		self.check_cfg(**pkg_args)
-	if not self.env['HAVE_GTHREAD']:
-		pkg_args={'package':'gthread-2.0','uselib_store':'GTHREAD','args':'--cflags --libs'}
-		if getattr(Options.options,'vala_target_glib',None):
-			pkg_args['atleast_version']=Options.options.vala_target_glib
-		self.check_cfg(**pkg_args)
-def configure(self):
-	self.load('gnu_dirs')
-	self.check_vala_deps()
-	self.check_vala()
-def options(opt):
-	opt.load('gnu_dirs')
-	valaopts=opt.add_option_group('Vala Compiler Options')
-	valaopts.add_option('--vala-target-glib',default=None,dest='vala_target_glib',metavar='MAJOR.MINOR',help='Target version of glib for Vala GObject code generation')
-
-extension('.vala','.gs')(vala_file)
-conf(find_valac)
-conf(check_vala)
-conf(check_vala_deps)
\ No newline at end of file
diff --git a/waflib/Tools/waf_unit_test.py b/waflib/Tools/waf_unit_test.py
deleted file mode 100644
index 5ce2403..0000000
--- a/waflib/Tools/waf_unit_test.py
+++ /dev/null
@@ -1,79 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,sys
-from waflib.TaskGen import feature,after_method
-from waflib import Utils,Task,Logs,Options
-testlock=Utils.threading.Lock()
-def make_test(self):
-	if getattr(self,'link_task',None):
-		self.create_task('utest',self.link_task.outputs)
-class utest(Task.Task):
-	color='PINK'
-	after=['vnum','inst']
-	vars=[]
-	def runnable_status(self):
-		ret=super(utest,self).runnable_status()
-		if ret==Task.SKIP_ME:
-			if getattr(Options.options,'all_tests',False):
-				return Task.RUN_ME
-		return ret
-	def run(self):
-		filename=self.inputs[0].abspath()
-		self.ut_exec=getattr(self,'ut_exec',[filename])
-		if getattr(self.generator,'ut_fun',None):
-			self.generator.ut_fun(self)
-		try:
-			fu=getattr(self.generator.bld,'all_test_paths')
-		except AttributeError:
-			fu=os.environ.copy()
-			self.generator.bld.all_test_paths=fu
-			lst=[]
-			for g in self.generator.bld.groups:
-				for tg in g:
-					if getattr(tg,'link_task',None):
-						lst.append(tg.link_task.outputs[0].parent.abspath())
-			def add_path(dct,path,var):
-				dct[var]=os.pathsep.join(Utils.to_list(path)+[os.environ.get(var,'')])
-			if Utils.is_win32:
-				add_path(fu,lst,'PATH')
-			elif sys.platform=='darwin':
-				add_path(fu,lst,'DYLD_LIBRARY_PATH')
-				add_path(fu,lst,'LD_LIBRARY_PATH')
-			else:
-				add_path(fu,lst,'LD_LIBRARY_PATH')
-		cwd=getattr(self.generator,'ut_cwd','')or self.inputs[0].parent.abspath()
-		proc=Utils.subprocess.Popen(self.ut_exec,cwd=cwd,env=fu,stderr=Utils.subprocess.PIPE,stdout=Utils.subprocess.PIPE)
-		(stdout,stderr)=proc.communicate()
-		tup=(filename,proc.returncode,stdout,stderr)
-		self.generator.utest_result=tup
-		testlock.acquire()
-		try:
-			bld=self.generator.bld
-			Logs.debug("ut: %r",tup)
-			try:
-				bld.utest_results.append(tup)
-			except AttributeError:
-				bld.utest_results=[tup]
-		finally:
-			testlock.release()
-def summary(bld):
-	lst=getattr(bld,'utest_results',[])
-	if lst:
-		Logs.pprint('CYAN','execution summary')
-		total=len(lst)
-		tfail=len([x for x in lst if x[1]])
-		Logs.pprint('CYAN','  tests that pass %d/%d'%(total-tfail,total))
-		for(f,code,out,err)in lst:
-			if not code:
-				Logs.pprint('CYAN','    %s'%f)
-		Logs.pprint('CYAN','  tests that fail %d/%d'%(tfail,total))
-		for(f,code,out,err)in lst:
-			if code:
-				Logs.pprint('CYAN','    %s'%f)
-def options(opt):
-	opt.add_option('--alltests',action='store_true',default=False,help='Exec all unit tests',dest='all_tests')
-
-feature('test')(make_test)
-after_method('apply_link')(make_test)
\ No newline at end of file
diff --git a/waflib/Tools/winres.py b/waflib/Tools/winres.py
deleted file mode 100644
index 93dd4f2..0000000
--- a/waflib/Tools/winres.py
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-from waflib import Task
-from waflib.TaskGen import extension
-def rc_file(self,node):
-	obj_ext='.rc.o'
-	if self.env['WINRC_TGT_F']=='/fo':
-		obj_ext='.res'
-	rctask=self.create_task('winrc',node,node.change_ext(obj_ext))
-	try:
-		self.compiled_tasks.append(rctask)
-	except AttributeError:
-		self.compiled_tasks=[rctask]
-class winrc(Task.Task):
-	run_str='${WINRC} ${WINRCFLAGS} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${WINRC_TGT_F} ${TGT} ${WINRC_SRC_F} ${SRC}'
-	color='BLUE'
-def configure(conf):
-	v=conf.env
-	v['WINRC_TGT_F']='-o'
-	v['WINRC_SRC_F']='-i'
-	if not conf.env.WINRC:
-		if v.CC_NAME=='msvc':
-			conf.find_program('RC',var='WINRC',path_list=v['PATH'])
-			v['WINRC_TGT_F']='/fo'
-			v['WINRC_SRC_F']=''
-		else:
-			conf.find_program('windres',var='WINRC',path_list=v['PATH'])
-	if not conf.env.WINRC:
-		conf.fatal('winrc was not found!')
-	v['WINRCFLAGS']=[]
-
-extension('.rc')(rc_file)
\ No newline at end of file
diff --git a/waflib/Tools/xlc.py b/waflib/Tools/xlc.py
deleted file mode 100644
index c2a9982..0000000
--- a/waflib/Tools/xlc.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-from waflib.Tools import ccroot,ar
-from waflib.Configure import conf
-def find_xlc(conf):
-	cc=conf.find_program(['xlc_r','xlc'],var='CC')
-	cc=conf.cmd_to_list(cc)
-	conf.get_xlc_version(cc)
-	conf.env.CC_NAME='xlc'
-	conf.env.CC=cc
-def xlc_common_flags(conf):
-	v=conf.env
-	v['CC_SRC_F']=[]
-	v['CC_TGT_F']=['-c','-o']
-	if not v['LINK_CC']:v['LINK_CC']=v['CC']
-	v['CCLNK_SRC_F']=[]
-	v['CCLNK_TGT_F']=['-o']
-	v['CPPPATH_ST']='-I%s'
-	v['DEFINES_ST']='-D%s'
-	v['LIB_ST']='-l%s'
-	v['LIBPATH_ST']='-L%s'
-	v['STLIB_ST']='-l%s'
-	v['STLIBPATH_ST']='-L%s'
-	v['RPATH_ST']='-Wl,-rpath,%s'
-	v['SONAME_ST']=[]
-	v['SHLIB_MARKER']=[]
-	v['STLIB_MARKER']=[]
-	v['LINKFLAGS_cprogram']=['-Wl,-brtl']
-	v['cprogram_PATTERN']='%s'
-	v['CFLAGS_cshlib']=['-fPIC']
-	v['LINKFLAGS_cshlib']=['-G','-Wl,-brtl,-bexpfull']
-	v['cshlib_PATTERN']='lib%s.so'
-	v['LINKFLAGS_cstlib']=[]
-	v['cstlib_PATTERN']='lib%s.a'
-def configure(conf):
-	conf.find_xlc()
-	conf.find_ar()
-	conf.xlc_common_flags()
-	conf.cc_load_tools()
-	conf.cc_add_flags()
-	conf.link_add_flags()
-
-conf(find_xlc)
-conf(xlc_common_flags)
\ No newline at end of file
diff --git a/waflib/Tools/xlcxx.py b/waflib/Tools/xlcxx.py
deleted file mode 100644
index bfbe01e..0000000
--- a/waflib/Tools/xlcxx.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-from waflib.Tools import ccroot,ar
-from waflib.Configure import conf
-def find_xlcxx(conf):
-	cxx=conf.find_program(['xlc++_r','xlc++'],var='CXX')
-	cxx=conf.cmd_to_list(cxx)
-	conf.get_xlc_version(cxx)
-	conf.env.CXX_NAME='xlc++'
-	conf.env.CXX=cxx
-def xlcxx_common_flags(conf):
-	v=conf.env
-	v['CXX_SRC_F']=[]
-	v['CXX_TGT_F']=['-c','-o']
-	if not v['LINK_CXX']:v['LINK_CXX']=v['CXX']
-	v['CXXLNK_SRC_F']=[]
-	v['CXXLNK_TGT_F']=['-o']
-	v['CPPPATH_ST']='-I%s'
-	v['DEFINES_ST']='-D%s'
-	v['LIB_ST']='-l%s'
-	v['LIBPATH_ST']='-L%s'
-	v['STLIB_ST']='-l%s'
-	v['STLIBPATH_ST']='-L%s'
-	v['RPATH_ST']='-Wl,-rpath,%s'
-	v['SONAME_ST']=[]
-	v['SHLIB_MARKER']=[]
-	v['STLIB_MARKER']=[]
-	v['LINKFLAGS_cxxprogram']=['-Wl,-brtl']
-	v['cxxprogram_PATTERN']='%s'
-	v['CXXFLAGS_cxxshlib']=['-fPIC']
-	v['LINKFLAGS_cxxshlib']=['-G','-Wl,-brtl,-bexpfull']
-	v['cxxshlib_PATTERN']='lib%s.so'
-	v['LINKFLAGS_cxxstlib']=[]
-	v['cxxstlib_PATTERN']='lib%s.a'
-def configure(conf):
-	conf.find_xlcxx()
-	conf.find_ar()
-	conf.xlcxx_common_flags()
-	conf.cxx_load_tools()
-	conf.cxx_add_flags()
-	conf.link_add_flags()
-
-conf(find_xlcxx)
-conf(xlcxx_common_flags)
\ No newline at end of file
diff --git a/waflib/Utils.py b/waflib/Utils.py
deleted file mode 100644
index ba22b1a..0000000
--- a/waflib/Utils.py
+++ /dev/null
@@ -1,334 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os,sys,errno,traceback,inspect,re,shutil,datetime,gc
-try:
-	import subprocess
-except:
-	try:
-		import waflib.extras.subprocess as subprocess
-	except:
-		print("The subprocess module is missing (python2.3?):\n try calling 'waf update --files=subprocess'\n or add a copy of subprocess.py to the python libraries")
-try:
-	from collections import deque
-except ImportError:
-	class deque(list):
-		def popleft(self):
-			return self.pop(0)
-try:
-	import _winreg as winreg
-except:
-	try:
-		import winreg
-	except:
-		winreg=None
-from waflib import Errors
-try:
-	from collections import UserDict
-except:
-	from UserDict import UserDict
-try:
-	from hashlib import md5
-except:
-	try:
-		from md5 import md5
-	except:
-		pass
-try:
-	import threading
-except:
-	class threading(object):
-		pass
-	class Lock(object):
-		def acquire(self):
-			pass
-		def release(self):
-			pass
-	threading.Lock=threading.Thread=Lock
-else:
-	run_old=threading.Thread.run
-	def run(*args,**kwargs):
-		try:
-			run_old(*args,**kwargs)
-		except(KeyboardInterrupt,SystemExit):
-			raise
-		except:
-			sys.excepthook(*sys.exc_info())
-	threading.Thread.run=run
-SIG_NIL='iluvcuteoverload'
-O644=420
-O755=493
-rot_chr=['\\','|','/','-']
-rot_idx=0
-try:
-	from collections import defaultdict
-except ImportError:
-	class defaultdict(dict):
-		def __init__(self,default_factory):
-			super(defaultdict,self).__init__()
-			self.default_factory=default_factory
-		def __getitem__(self,key):
-			try:
-				return super(defaultdict,self).__getitem__(key)
-			except KeyError:
-				value=self.default_factory()
-				self[key]=value
-				return value
-is_win32=sys.platform in('win32','cli')
-indicator='\x1b[K%s%s%s\r'
-if is_win32 and'NOCOLOR'in os.environ:
-	indicator='%s%s%s\r'
-def readf(fname,m='r'):
-	f=open(fname,m)
-	try:
-		txt=f.read()
-	finally:
-		f.close()
-	return txt
-def h_file(filename):
-	f=open(filename,'rb')
-	m=md5()
-	try:
-		while filename:
-			filename=f.read(100000)
-			m.update(filename)
-	finally:
-		f.close()
-	return m.digest()
-try:
-	x=''.encode('hex')
-except:
-	import binascii
-	def to_hex(s):
-		ret=binascii.hexlify(s)
-		if not isinstance(ret,str):
-			ret=ret.decode('utf-8')
-		return ret
-else:
-	def to_hex(s):
-		return s.encode('hex')
-to_hex.__doc__="""
-Return the hexadecimal representation of a string
-
-:param s: string to convert
-:type s: string
-"""
-listdir=os.listdir
-if is_win32:
-	def listdir_win32(s):
-		if not s:
-			try:
-				import ctypes
-			except:
-				return[x+':\\'for x in list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')]
-			else:
-				dlen=4
-				maxdrives=26
-				buf=ctypes.create_string_buffer(maxdrives*dlen)
-				ndrives=ctypes.windll.kernel32.GetLogicalDriveStringsA(maxdrives,ctypes.byref(buf))
-				return[buf.raw[4*i:4*i+3].decode('ascii')for i in range(int(ndrives/dlen))]
-		if len(s)==2 and s[1]==":":
-			s+=os.sep
-		if not os.path.isdir(s):
-			e=OSError()
-			e.errno=errno.ENOENT
-			raise e
-		return os.listdir(s)
-	listdir=listdir_win32
-def num2ver(ver):
-	if isinstance(ver,str):
-		ver=tuple(ver.split('.'))
-	if isinstance(ver,tuple):
-		ret=0
-		for i in range(4):
-			if i<len(ver):
-				ret+=256**(3-i)*int(ver[i])
-		return ret
-	return ver
-def ex_stack():
-	exc_type,exc_value,tb=sys.exc_info()
-	exc_lines=traceback.format_exception(exc_type,exc_value,tb)
-	return''.join(exc_lines)
-def to_list(sth):
-	if isinstance(sth,str):
-		return sth.split()
-	else:
-		return sth
-re_nl=re.compile('\r*\n',re.M)
-def str_to_dict(txt):
-	tbl={}
-	lines=re_nl.split(txt)
-	for x in lines:
-		x=x.strip()
-		if not x or x.startswith('#')or x.find('=')<0:
-			continue
-		tmp=x.split('=')
-		tbl[tmp[0].strip()]='='.join(tmp[1:]).strip()
-	return tbl
-def split_path(path):
-	return path.split('/')
-def split_path_cygwin(path):
-	if path.startswith('//'):
-		ret=path.split('/')[2:]
-		ret[0]='/'+ret[0]
-		return ret
-	return path.split('/')
-re_sp=re.compile('[/\\\\]')
-def split_path_win32(path):
-	if path.startswith('\\\\'):
-		ret=re.split(re_sp,path)[2:]
-		ret[0]='\\'+ret[0]
-		return ret
-	return re.split(re_sp,path)
-if sys.platform=='cygwin':
-	split_path=split_path_cygwin
-elif is_win32:
-	split_path=split_path_win32
-split_path.__doc__="""
-Split a path by / or \\. This function is not like os.path.split
-
-:type  path: string
-:param path: path to split
-:return:     list of strings
-"""
-def check_dir(path):
-	if not os.path.isdir(path):
-		try:
-			os.makedirs(path)
-		except OSError ,e:
-			if not os.path.isdir(path):
-				raise Errors.WafError('Cannot create the folder %r'%path,ex=e)
-def def_attrs(cls,**kw):
-	for k,v in kw.items():
-		if not hasattr(cls,k):
-			setattr(cls,k,v)
-def quote_define_name(s):
-	fu=re.compile("[^a-zA-Z0-9]").sub("_",s)
-	fu=fu.upper()
-	return fu
-def h_list(lst):
-	m=md5()
-	m.update(str(lst))
-	return m.digest()
-def h_fun(fun):
-	try:
-		return fun.code
-	except AttributeError:
-		try:
-			h=inspect.getsource(fun)
-		except IOError:
-			h="nocode"
-		try:
-			fun.code=h
-		except AttributeError:
-			pass
-		return h
-reg_subst=re.compile(r"(\\\\)|(\$\$)|\$\{([^}]+)\}")
-def subst_vars(expr,params):
-	def repl_var(m):
-		if m.group(1):
-			return'\\'
-		if m.group(2):
-			return'$'
-		try:
-			return params.get_flat(m.group(3))
-		except AttributeError:
-			return params[m.group(3)]
-	return reg_subst.sub(repl_var,expr)
-def destos_to_binfmt(key):
-	if key=='darwin':
-		return'mac-o'
-	elif key in('win32','cygwin','uwin','msys'):
-		return'pe'
-	return'elf'
-def unversioned_sys_platform():
-	s=sys.platform
-	if s=='java':
-		from java.lang import System
-		s=System.getProperty('os.name')
-		if s=='Mac OS X':
-			return'darwin'
-		elif s.startswith('Windows '):
-			return'win32'
-		elif s=='OS/2':
-			return'os2'
-		elif s=='HP-UX':
-			return'hpux'
-		elif s in('SunOS','Solaris'):
-			return'sunos'
-		else:s=s.lower()
-	if s=='win32'or s.endswith('os2')and s!='sunos2':return s
-	return re.split('\d+$',s)[0]
-def nada(*k,**kw):
-	pass
-class Timer(object):
-	def __init__(self):
-		self.start_time=datetime.datetime.utcnow()
-	def __str__(self):
-		delta=datetime.datetime.utcnow()-self.start_time
-		days=int(delta.days)
-		hours=delta.seconds//3600
-		minutes=(delta.seconds-hours*3600)//60
-		seconds=delta.seconds-hours*3600-minutes*60+float(delta.microseconds)/1000/1000
-		result=''
-		if days:
-			result+='%dd'%days
-		if days or hours:
-			result+='%dh'%hours
-		if days or hours or minutes:
-			result+='%dm'%minutes
-		return'%s%.3fs'%(result,seconds)
-if is_win32:
-	old=shutil.copy2
-	def copy2(src,dst):
-		old(src,dst)
-		shutil.copystat(src,dst)
-	setattr(shutil,'copy2',copy2)
-if os.name=='java':
-	try:
-		gc.disable()
-		gc.enable()
-	except NotImplementedError:
-		gc.disable=gc.enable
-def read_la_file(path):
-	sp=re.compile(r'^([^=]+)=\'(.*)\'$')
-	dc={}
-	for line in readf(path).splitlines():
-		try:
-			_,left,right,_=sp.split(line.strip())
-			dc[left]=right
-		except ValueError:
-			pass
-	return dc
-def nogc(fun):
-	def f(*k,**kw):
-		try:
-			gc.disable()
-			ret=fun(*k,**kw)
-		finally:
-			gc.enable()
-		return ret
-	f.__doc__=fun.__doc__
-	return f
-def run_once(fun):
-	cache={}
-	def wrap(k):
-		try:
-			return cache[k]
-		except KeyError:
-			ret=fun(k)
-			cache[k]=ret
-			return ret
-	wrap.__cache__=cache
-	return wrap
-def get_registry_app_path(key,filename):
-	if not winreg:
-		return None
-	try:
-		result=winreg.QueryValue(key,"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\%s.exe"%filename[0])
-	except WindowsError:
-		pass
-	else:
-		if os.path.isfile(result):
-			return result
diff --git a/waflib/__init__.py b/waflib/__init__.py
deleted file mode 100644
index efeed79..0000000
--- a/waflib/__init__.py
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
diff --git a/waflib/ansiterm.py b/waflib/ansiterm.py
deleted file mode 100644
index 9462285..0000000
--- a/waflib/ansiterm.py
+++ /dev/null
@@ -1,173 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import sys,os
-try:
-	if not(sys.stderr.isatty()and sys.stdout.isatty()):
-		raise ValueError('not a tty')
-	from ctypes import*
-	class COORD(Structure):
-		_fields_=[("X",c_short),("Y",c_short)]
-	class SMALL_RECT(Structure):
-		_fields_=[("Left",c_short),("Top",c_short),("Right",c_short),("Bottom",c_short)]
-	class CONSOLE_SCREEN_BUFFER_INFO(Structure):
-		_fields_=[("Size",COORD),("CursorPosition",COORD),("Attributes",c_short),("Window",SMALL_RECT),("MaximumWindowSize",COORD)]
-	class CONSOLE_CURSOR_INFO(Structure):
-		_fields_=[('dwSize',c_ulong),('bVisible',c_int)]
-	sbinfo=CONSOLE_SCREEN_BUFFER_INFO()
-	csinfo=CONSOLE_CURSOR_INFO()
-	hconsole=windll.kernel32.GetStdHandle(-11)
-	windll.kernel32.GetConsoleScreenBufferInfo(hconsole,byref(sbinfo))
-	if sbinfo.Size.X<9 or sbinfo.Size.Y<9:raise ValueError('small console')
-	windll.kernel32.GetConsoleCursorInfo(hconsole,byref(csinfo))
-except Exception:
-	pass
-else:
-	import re,threading
-	try:
-		_type=unicode
-	except:
-		_type=str
-	to_int=lambda number,default:number and int(number)or default
-	wlock=threading.Lock()
-	STD_OUTPUT_HANDLE=-11
-	STD_ERROR_HANDLE=-12
-	class AnsiTerm(object):
-		def __init__(self):
-			self.encoding=sys.stdout.encoding
-			self.hconsole=windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE)
-			self.cursor_history=[]
-			self.orig_sbinfo=CONSOLE_SCREEN_BUFFER_INFO()
-			self.orig_csinfo=CONSOLE_CURSOR_INFO()
-			windll.kernel32.GetConsoleScreenBufferInfo(self.hconsole,byref(self.orig_sbinfo))
-			windll.kernel32.GetConsoleCursorInfo(hconsole,byref(self.orig_csinfo))
-		def screen_buffer_info(self):
-			sbinfo=CONSOLE_SCREEN_BUFFER_INFO()
-			windll.kernel32.GetConsoleScreenBufferInfo(self.hconsole,byref(sbinfo))
-			return sbinfo
-		def clear_line(self,param):
-			mode=param and int(param)or 0
-			sbinfo=self.screen_buffer_info()
-			if mode==1:
-				line_start=COORD(0,sbinfo.CursorPosition.Y)
-				line_length=sbinfo.Size.X
-			elif mode==2:
-				line_start=COORD(sbinfo.CursorPosition.X,sbinfo.CursorPosition.Y)
-				line_length=sbinfo.Size.X-sbinfo.CursorPosition.X
-			else:
-				line_start=sbinfo.CursorPosition
-				line_length=sbinfo.Size.X-sbinfo.CursorPosition.X
-			chars_written=c_int()
-			windll.kernel32.FillConsoleOutputCharacterA(self.hconsole,c_wchar(' '),line_length,line_start,byref(chars_written))
-			windll.kernel32.FillConsoleOutputAttribute(self.hconsole,sbinfo.Attributes,line_length,line_start,byref(chars_written))
-		def clear_screen(self,param):
-			mode=to_int(param,0)
-			sbinfo=self.screen_buffer_info()
-			if mode==1:
-				clear_start=COORD(0,0)
-				clear_length=sbinfo.CursorPosition.X*sbinfo.CursorPosition.Y
-			elif mode==2:
-				clear_start=COORD(0,0)
-				clear_length=sbinfo.Size.X*sbinfo.Size.Y
-				windll.kernel32.SetConsoleCursorPosition(self.hconsole,clear_start)
-			else:
-				clear_start=sbinfo.CursorPosition
-				clear_length=((sbinfo.Size.X-sbinfo.CursorPosition.X)+sbinfo.Size.X*(sbinfo.Size.Y-sbinfo.CursorPosition.Y))
-			chars_written=c_int()
-			windll.kernel32.FillConsoleOutputCharacterA(self.hconsole,c_wchar(' '),clear_length,clear_start,byref(chars_written))
-			windll.kernel32.FillConsoleOutputAttribute(self.hconsole,sbinfo.Attributes,clear_length,clear_start,byref(chars_written))
-		def push_cursor(self,param):
-			sbinfo=self.screen_buffer_info()
-			self.cursor_history.append(sbinfo.CursorPosition)
-		def pop_cursor(self,param):
-			if self.cursor_history:
-				old_pos=self.cursor_history.pop()
-				windll.kernel32.SetConsoleCursorPosition(self.hconsole,old_pos)
-		def set_cursor(self,param):
-			y,sep,x=param.partition(';')
-			x=to_int(x,1)-1
-			y=to_int(y,1)-1
-			sbinfo=self.screen_buffer_info()
-			new_pos=COORD(min(max(0,x),sbinfo.Size.X),min(max(0,y),sbinfo.Size.Y))
-			windll.kernel32.SetConsoleCursorPosition(self.hconsole,new_pos)
-		def set_column(self,param):
-			x=to_int(param,1)-1
-			sbinfo=self.screen_buffer_info()
-			new_pos=COORD(min(max(0,x),sbinfo.Size.X),sbinfo.CursorPosition.Y)
-			windll.kernel32.SetConsoleCursorPosition(self.hconsole,new_pos)
-		def move_cursor(self,x_offset=0,y_offset=0):
-			sbinfo=self.screen_buffer_info()
-			new_pos=COORD(min(max(0,sbinfo.CursorPosition.X+x_offset),sbinfo.Size.X),min(max(0,sbinfo.CursorPosition.Y+y_offset),sbinfo.Size.Y))
-			windll.kernel32.SetConsoleCursorPosition(self.hconsole,new_pos)
-		def move_up(self,param):
-			self.move_cursor(y_offset=-to_int(param,1))
-		def move_down(self,param):
-			self.move_cursor(y_offset=to_int(param,1))
-		def move_left(self,param):
-			self.move_cursor(x_offset=-to_int(param,1))
-		def move_right(self,param):
-			self.move_cursor(x_offset=to_int(param,1))
-		def next_line(self,param):
-			sbinfo=self.screen_buffer_info()
-			self.move_cursor(x_offset=-sbinfo.CursorPosition.X,y_offset=to_int(param,1))
-		def prev_line(self,param):
-			sbinfo=self.screen_buffer_info()
-			self.move_cursor(x_offset=-sbinfo.CursorPosition.X,y_offset=-to_int(param,1))
-		def rgb2bgr(self,c):
-			return((c&1)<<2)|(c&2)|((c&4)>>2)
-		def set_color(self,param):
-			cols=param.split(';')
-			sbinfo=CONSOLE_SCREEN_BUFFER_INFO()
-			windll.kernel32.GetConsoleScreenBufferInfo(self.hconsole,byref(sbinfo))
-			attr=sbinfo.Attributes
-			for c in cols:
-				c=to_int(c,0)
-				if c in range(30,38):
-					attr=(attr&0xfff0)|self.rgb2bgr(c-30)
-				elif c in range(40,48):
-					attr=(attr&0xff0f)|(self.rgb2bgr(c-40)<<4)
-				elif c==0:
-					attr=self.orig_sbinfo.Attributes
-				elif c==1:
-					attr|=0x08
-				elif c==4:
-					attr|=0x80
-				elif c==7:
-					attr=(attr&0xff88)|((attr&0x70)>>4)|((attr&0x07)<<4)
-			windll.kernel32.SetConsoleTextAttribute(self.hconsole,attr)
-		def show_cursor(self,param):
-			csinfo.bVisible=1
-			windll.kernel32.SetConsoleCursorInfo(self.hconsole,byref(csinfo))
-		def hide_cursor(self,param):
-			csinfo.bVisible=0
-			windll.kernel32.SetConsoleCursorInfo(self.hconsole,byref(csinfo))
-		ansi_command_table={'A':move_up,'B':move_down,'C':move_right,'D':move_left,'E':next_line,'F':prev_line,'G':set_column,'H':set_cursor,'f':set_cursor,'J':clear_screen,'K':clear_line,'h':show_cursor,'l':hide_cursor,'m':set_color,'s':push_cursor,'u':pop_cursor,}
-		ansi_tokens=re.compile('(?:\x1b\[([0-9?;]*)([a-zA-Z])|([^\x1b]+))')
-		def write(self,text):
-			try:
-				wlock.acquire()
-				for param,cmd,txt in self.ansi_tokens.findall(text):
-					if cmd:
-						cmd_func=self.ansi_command_table.get(cmd)
-						if cmd_func:
-							cmd_func(self,param)
-					else:
-						self.writeconsole(txt)
-			finally:
-				wlock.release()
-		def writeconsole(self,txt):
-			chars_written=c_int()
-			writeconsole=windll.kernel32.WriteConsoleA
-			if isinstance(txt,_type):
-				writeconsole=windll.kernel32.WriteConsoleW
-			TINY_STEP=3000
-			for x in range(0,len(txt),TINY_STEP):
-				tiny=txt[x:x+TINY_STEP]
-				writeconsole(self.hconsole,tiny,len(tiny),byref(chars_written),None)
-		def flush(self):
-			pass
-		def isatty(self):
-			return True
-	sys.stderr=sys.stdout=AnsiTerm()
-	os.environ['TERM']='vt100'
diff --git a/waflib/extras/__init__.py b/waflib/extras/__init__.py
deleted file mode 100644
index efeed79..0000000
--- a/waflib/extras/__init__.py
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
diff --git a/waflib/extras/compat15.py b/waflib/extras/compat15.py
deleted file mode 100644
index 76851a2..0000000
--- a/waflib/extras/compat15.py
+++ /dev/null
@@ -1,223 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import sys
-if sys.hexversion < 0x020400f0: from sets import Set as set
-import sys
-from waflib import ConfigSet,Logs,Options,Scripting,Task,Build,Configure,Node,Runner,TaskGen,Utils,Errors,Context
-sys.modules['Environment']=ConfigSet
-ConfigSet.Environment=ConfigSet.ConfigSet
-sys.modules['Logs']=Logs
-sys.modules['Options']=Options
-sys.modules['Scripting']=Scripting
-sys.modules['Task']=Task
-sys.modules['Build']=Build
-sys.modules['Configure']=Configure
-sys.modules['Node']=Node
-sys.modules['Runner']=Runner
-sys.modules['TaskGen']=TaskGen
-sys.modules['Utils']=Utils
-from waflib.Tools import c_preproc
-sys.modules['preproc']=c_preproc
-from waflib.Tools import c_config
-sys.modules['config_c']=c_config
-ConfigSet.ConfigSet.copy=ConfigSet.ConfigSet.derive
-ConfigSet.ConfigSet.set_variant=Utils.nada
-Build.BuildContext.add_subdirs=Build.BuildContext.recurse
-Build.BuildContext.new_task_gen=Build.BuildContext.__call__
-Build.BuildContext.is_install=0
-Node.Node.relpath_gen=Node.Node.path_from
-def name_to_obj(self,s,env=None):
-	Logs.warn('compat: change "name_to_obj(name, env)" by "get_tgen_by_name(name)"')
-	return self.get_tgen_by_name(s)
-Build.BuildContext.name_to_obj=name_to_obj
-def env_of_name(self,name):
-	try:
-		return self.all_envs[name]
-	except KeyError:
-		Logs.error('no such environment: '+name)
-		return None
-Build.BuildContext.env_of_name=env_of_name
-def set_env_name(self,name,env):
-	self.all_envs[name]=env
-	return env
-Configure.ConfigurationContext.set_env_name=set_env_name
-def retrieve(self,name,fromenv=None):
-	try:
-		env=self.all_envs[name]
-	except KeyError:
-		env=ConfigSet.ConfigSet()
-		self.prepare_env(env)
-		self.all_envs[name]=env
-	else:
-		if fromenv:Logs.warn("The environment %s may have been configured already"%name)
-	return env
-Configure.ConfigurationContext.retrieve=retrieve
-Configure.ConfigurationContext.sub_config=Configure.ConfigurationContext.recurse
-Configure.ConfigurationContext.check_tool=Configure.ConfigurationContext.load
-Configure.conftest=Configure.conf
-Configure.ConfigurationError=Errors.ConfigurationError
-Options.OptionsContext.sub_options=Options.OptionsContext.recurse
-Options.OptionsContext.tool_options=Context.Context.load
-Options.Handler=Options.OptionsContext
-Task.simple_task_type=Task.task_type_from_func=Task.task_factory
-Task.TaskBase.classes=Task.classes
-def setitem(self,key,value):
-	if key.startswith('CCFLAGS'):
-		key=key[1:]
-	self.table[key]=value
-ConfigSet.ConfigSet.__setitem__=setitem
-def old_importpaths(self):
-	if getattr(self,'importpaths',[]):
-		self.includes=self.importpaths
-from waflib import Context
-eld=Context.load_tool
-def load_tool(*k,**kw):
-	ret=eld(*k,**kw)
-	if'set_options'in ret.__dict__:
-		Logs.warn('compat: rename "set_options" to options')
-		ret.options=ret.set_options
-	if'detect'in ret.__dict__:
-		Logs.warn('compat: rename "detect" to "configure"')
-		ret.configure=ret.detect
-	return ret
-Context.load_tool=load_tool
-rev=Context.load_module
-def load_module(path):
-	ret=rev(path)
-	if'set_options'in ret.__dict__:
-		Logs.warn('compat: rename "set_options" to "options" (%r)'%path)
-		ret.options=ret.set_options
-	if'srcdir'in ret.__dict__:
-		Logs.warn('compat: rename "srcdir" to "top" (%r)'%path)
-		ret.top=ret.srcdir
-	if'blddir'in ret.__dict__:
-		Logs.warn('compat: rename "blddir" to "out" (%r)'%path)
-		ret.out=ret.blddir
-	return ret
-Context.load_module=load_module
-old_post=TaskGen.task_gen.post
-def post(self):
-	self.features=self.to_list(self.features)
-	if'cc'in self.features:
-		Logs.warn('compat: the feature cc does not exist anymore (use "c")')
-		self.features.remove('cc')
-		self.features.append('c')
-	if'cstaticlib'in self.features:
-		Logs.warn('compat: the feature cstaticlib does not exist anymore (use "cstlib" or "cxxstlib")')
-		self.features.remove('cstaticlib')
-		self.features.append(('cxx'in self.features)and'cxxstlib'or'cstlib')
-	if getattr(self,'ccflags',None):
-		Logs.warn('compat: "ccflags" was renamed to "cflags"')
-		self.cflags=self.ccflags
-	return old_post(self)
-TaskGen.task_gen.post=post
-def waf_version(*k,**kw):
-	Logs.warn('wrong version (waf_version was removed in waf 1.6)')
-Utils.waf_version=waf_version
-import os
-def apply_uselib_local(self):
-	env=self.env
-	from waflib.Tools.ccroot import stlink_task
-	self.uselib=self.to_list(getattr(self,'uselib',[]))
-	self.includes=self.to_list(getattr(self,'includes',[]))
-	names=self.to_list(getattr(self,'uselib_local',[]))
-	get=self.bld.get_tgen_by_name
-	seen=set([])
-	tmp=Utils.deque(names)
-	if tmp:
-		Logs.warn('compat: "uselib_local" is deprecated, replace by "use"')
-	while tmp:
-		lib_name=tmp.popleft()
-		if lib_name in seen:
-			continue
-		y=get(lib_name)
-		y.post()
-		seen.add(lib_name)
-		if getattr(y,'uselib_local',None):
-			for x in self.to_list(getattr(y,'uselib_local',[])):
-				obj=get(x)
-				obj.post()
-				if getattr(obj,'link_task',None):
-					if not isinstance(obj.link_task,stlink_task):
-						tmp.append(x)
-		if getattr(y,'link_task',None):
-			link_name=y.target[y.target.rfind(os.sep)+1:]
-			if isinstance(y.link_task,stlink_task):
-				env.append_value('STLIB',[link_name])
-			else:
-				env.append_value('LIB',[link_name])
-			self.link_task.set_run_after(y.link_task)
-			self.link_task.dep_nodes+=y.link_task.outputs
-			tmp_path=y.link_task.outputs[0].parent.bldpath()
-			if not tmp_path in env['LIBPATH']:
-				env.prepend_value('LIBPATH',[tmp_path])
-		for v in self.to_list(getattr(y,'uselib',[])):
-			if not env['STLIB_'+v]:
-				if not v in self.uselib:
-					self.uselib.insert(0,v)
-		if getattr(y,'export_includes',None):
-			self.includes.extend(y.to_incnodes(y.export_includes))
-def apply_objdeps(self):
-	names=getattr(self,'add_objects',[])
-	if not names:
-		return
-	names=self.to_list(names)
-	get=self.bld.get_tgen_by_name
-	seen=[]
-	while names:
-		x=names[0]
-		if x in seen:
-			names=names[1:]
-			continue
-		y=get(x)
-		if getattr(y,'add_objects',None):
-			added=0
-			lst=y.to_list(y.add_objects)
-			lst.reverse()
-			for u in lst:
-				if u in seen:continue
-				added=1
-				names=[u]+names
-			if added:continue
-		y.post()
-		seen.append(x)
-		for t in getattr(y,'compiled_tasks',[]):
-			self.link_task.inputs.extend(t.outputs)
-def process_obj_files(self):
-	if not hasattr(self,'obj_files'):
-		return
-	for x in self.obj_files:
-		node=self.path.find_resource(x)
-		self.link_task.inputs.append(node)
-def add_obj_file(self,file):
-	if not hasattr(self,'obj_files'):self.obj_files=[]
-	if not'process_obj_files'in self.meths:self.meths.append('process_obj_files')
-	self.obj_files.append(file)
-old_define=Configure.ConfigurationContext.__dict__['define']
-def define(self,key,val,quote=True):
-	old_define(self,key,val,quote)
-	if key.startswith('HAVE_'):
-		self.env[key]=1
-old_undefine=Configure.ConfigurationContext.__dict__['undefine']
-def undefine(self,key):
-	old_undefine(self,key)
-	if key.startswith('HAVE_'):
-		self.env[key]=0
-def set_incdirs(self,val):
-	Logs.warn('compat: change "export_incdirs" by "export_includes"')
-	self.export_includes=val
-TaskGen.task_gen.export_incdirs=property(None,set_incdirs)
-
-TaskGen.feature('d')(old_importpaths)
-TaskGen.before('apply_incpaths')(old_importpaths)
-TaskGen.feature('c','cxx','d')(apply_uselib_local)
-TaskGen.before('apply_incpaths','propagate_uselib_vars')(apply_uselib_local)
-TaskGen.after('apply_link','process_source')(apply_uselib_local)
-TaskGen.feature('cprogram','cxxprogram','cstlib','cxxstlib','cshlib','cxxshlib','dprogram','dstlib','dshlib')(apply_objdeps)
-TaskGen.after('apply_link')(apply_objdeps)
-TaskGen.after('apply_link')(process_obj_files)
-TaskGen.taskgen_method(add_obj_file)
-Configure.conf(define)
-Configure.conf(undefine)
\ No newline at end of file
diff --git a/waflib/fixpy2.py b/waflib/fixpy2.py
deleted file mode 100644
index 2e6962b..0000000
--- a/waflib/fixpy2.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
-
-import os
-all_modifs={}
-def fixdir(dir):
-	global all_modifs
-	for k in all_modifs:
-		for v in all_modifs[k]:
-			modif(os.path.join(dir,'waflib'),k,v)
-def modif(dir,name,fun):
-	if name=='*':
-		lst=[]
-		for y in'. Tools extras'.split():
-			for x in os.listdir(os.path.join(dir,y)):
-				if x.endswith('.py'):
-					lst.append(y+os.sep+x)
-		for x in lst:
-			modif(dir,x,fun)
-		return
-	filename=os.path.join(dir,name)
-	f=open(filename,'r')
-	txt=f.read()
-	f.close()
-	txt=fun(txt)
-	f=open(filename,'w')
-	f.write(txt)
-	f.close()
-def subst(*k):
-	def do_subst(fun):
-		global all_modifs
-		for x in k:
-			try:
-				all_modifs[x].append(fun)
-			except KeyError:
-				all_modifs[x]=[fun]
-		return fun
-	return do_subst
-def r1(code):
-	code=code.replace(',e:',',e:')
-	code=code.replace("",'')
-	code=code.replace('','')
-	return code
-def r4(code):
-	code=code.replace('next(self.biter)','self.biter.next()')
-	return code
-
-subst('*')(r1)
-subst('Runner.py')(r4)
\ No newline at end of file
diff --git a/wscript b/wscript
deleted file mode 100644
index e19d9c9..0000000
--- a/wscript
+++ /dev/null
@@ -1,139 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import sys
-import Utils
-
-VERSION = "0.2.1"
-VERSION_MAJOR_MINOR =  ".".join(VERSION.split(".")[0:2])
-APPNAME = "clinica"
-
-top = '.'
-out = '_build_'
-
-def options (opt):
-    opt.load ('compiler_cc glib2 gnu_dirs')
-
-def put_config_h_in (ctx, destination):
-    
-    # Config.h for libclinica
-    ctx.define ("GETTEXT_PACKAGE", APPNAME)
-    ctx.define('PACKAGE', APPNAME)
-    ctx.define('PACKAGE_NAME', APPNAME)
-    ctx.define('PACKAGE_STRING', APPNAME + '-' + VERSION)
-    ctx.define('PACKAGE_VERSION', APPNAME + '-' + VERSION)
-
-    ctx.define('VERSION', VERSION)
-    ctx.define('VERSION_MAJOR_MINOR', VERSION_MAJOR_MINOR)
-
-    ctx.write_config_header (os.path.join (destination, "config.h"))
-
-
-def configure(ctx):
-    ctx.load ('compiler_cc gnu_dirs glib2 intltool vala')
-    ctx.check_vala (min_version = (0,12,0))
-
-    # Some definitions
-    ctx.check_cfg(package='glib-2.0', uselib_store='GLIB',
-                   atleast_version='2.14.0', mandatory=True, args='--cflags --libs')
-    ctx.check_cfg(package='gobject-2.0', uselib_store='GOBJECT',
-                   atleast_version='2.14.0', mandatory=True, args='--cflags --libs')
-    ctx.check_cfg(package='gtk+-3.0', uselib_store='GTK+',
-                   atleast_version='2.10.0', mandatory=True, args='--cflags --libs')
-    ctx.check_cfg(package='sqlite3', uselib_store='SQLITE',
-                   atleast_version='3.0', mandatory=True, args='--cflags --libs')
-    ctx.check_cfg(package='gee-1.0', uselib_store='GEE',
-                   atleast_version='0.5', mandatory=True, args='--cflags --libs')
-    ctx.check_cfg(package='libpeas-1.0', uselib_store='PEAS',
-                   atleast_version='0.7.0', mandatory=True, args='--cflags --libs')
-    ctx.check_cfg(package='libpeas-gtk-1.0', uselib_store='PEASGTK',
-                   atleast_version='0.7.0', mandatory=True, args='--cflags --libs')
-
-    ctx.find_program ('glib-compile-schemas', var='GLIB_COMPILE_SCHEMAS')
-    ctx.find_program ('g-ir-compiler', var = 'G_IR_COMPILER')
-
-    ctx.env.append_value ('VALAFLAGS', '-g')
-
-    put_config_h_in (ctx, "libclinica")
-    put_config_h_in (ctx, "clinica")
-    put_config_h_in (ctx, "plugins")
-
-    ctx.env.append_value ('CFLAGS', '-g -DHAVE_CONFIG_H -include config.h'.split ())
-
-def build(bld):
-    bld.add_subdirs('libclinica')
-    bld.add_subdirs('clinica')
-    bld.add_subdirs('plugins')
-
-    # Translations
-    bld (
-        features = 'intltool_po', 
-        podir = 'po',
-        appname = 'clinica'
-        )
-
-    # Install data files
-    topdir = bld.path.find_dir (top)
-    bld.install_files ('${PREFIX}/share/clinica', topdir.ant_glob ('ui/*'),
-                       relative_trick = True)
-    bld.install_files ('${PREFIX}/share/clinica', topdir.ant_glob ('ui/icons/*'),
-                       relative_trick = True)
-
-    # Install the help
-    help_dir = bld.path.find_dir ("help")
-    bld.install_files ('${PREFIX}/share/gnome/help/clinica',
-                       help_dir.ant_glob ('**/*.page'), relative_trick = True,
-                       cwd = help_dir)
-    bld.install_files ('${PREFIX}/share/gnome/help/clinica',
-                       help_dir.ant_glob ('**/figures/*'), relative_trick = True,
-                       cwd = help_dir)
-
-    # Install the applications shortcut
-    bld.install_files ('${PREFIX}/share/applications',
-                       'clinica.desktop')
-
-    # And the icons
-    bld.install_files ('${PREFIX}/share/pixmaps',
-                       'ui/icons/clinica.svg')
-
-    # ..and the man documentation
-    bld.install_files ('${PREFIX}/share/man/man1', 'doc/clinica.1')
-
-def update_potfile_list (ctx):
-    """Update the file POTFILES.in"""
-    source_files = map (lambda x : os.path.join ("libclinica", x),
-                        filter (lambda x : x.endswith (".vala") or x.endswith (".c"),
-                                os.listdir ("libclinica")))
-    source_files += map (lambda x : os.path.join ("clinica", x),
-                         filter (lambda x : x.endswith (".vala"),
-                                 os.listdir ("clinica")))
-    source_files += map (lambda x : os.path.join ("ui", x),
-                         filter (lambda x : x.endswith (".glade"),
-                                 os.listdir ("ui")))
-    with open ("po/POTFILES.in", "w") as handle:
-        handle.write ("[encoding: UTF-8]\n")
-        handle.write ("\n".join (source_files))
-
-    print("""POTFILES.in has been regenerated, you may want to run intltool-update on the po files.
-For example: cd po && intltool-udpate it
-""")
-        
-def run(ctx):
-    from waflib import Options
-    Options.commands = [ 'build', '__do_run' ] + Options.commands
-
-def __do_run (ctx):
-    ctx.exec_command ("LD_LIBRARY_PATH=./_build_/libclinica ./_build_/clinica/clinica")
-
-def debug (ctx):
-    ctx.exec_command ("LD_LIBRARY_PATH=./_build_/libclinica gdb --args ./_build_/clinica/clinica")
-
-def update_po (ctx):
-    # Get the list of languages 
-    with open("po/LINGUAS") as handle:
-        content = handle.read()
-    languages = filter (lambda x : len(x) == 2 and x.strip()[0] != '#', content.split("\n"))
-    os.chdir ("po")
-    ctx.exec_command("intltool-update -p -g clinica")
-    for code in languages:
-        ctx.exec_command("intltool-update -g clinica %s" % code)

-- 
Simple medical records manager



More information about the debian-med-commit mailing list