[longomatch] Add a new databases manager



commit e55c473f7f23fdef4a056f7b2c83e624ad2f8e79
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Wed Apr 10 07:08:47 2013 +0200

    Add a new databases manager

 .gitignore                                         |   5 +-
 LongoMatch.Addins/AddinsManager.cs                 |  25 ++-
 LongoMatch.Core/Common/Constants.cs                |   2 +-
 LongoMatch.Core/Common/SerializableObject.cs       |  47 +++--
 LongoMatch.Core/Config.cs                          | 145 +++++++++++---
 LongoMatch.Core/Handlers/Handlers.cs               |   1 +
 LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs      |   1 +
 LongoMatch.Core/Interfaces/GUI/IMainWindow.cs      |   1 +
 LongoMatch.Core/Interfaces/IDataBaseManager.cs     |  32 +++
 LongoMatch.Core/Interfaces/IDatabase.cs            |  10 +
 LongoMatch.Core/LongoMatch.Core.mdp                |   1 +
 LongoMatch.Core/Makefile.am                        |   1 +
 LongoMatch.Core/Store/Player.cs                    |   2 +-
 .../Gui/Component/CategoriesTemplateEditor.cs      |   2 +-
 .../Gui/Component/ProjectDetailsWidget.cs          |   2 +-
 LongoMatch.GUI/Gui/Dialog/DatabasesManager.cs      | 195 +++++++++++++++++++
 LongoMatch.GUI/Gui/Dialog/DrawingTool.cs           |   2 +-
 LongoMatch.GUI/Gui/Dialog/ProjectsManager.cs       |   2 +-
 LongoMatch.GUI/Gui/Dialog/VideoConversionTool.cs   |   4 +-
 .../Gui/Dialog/VideoEditionProperties.cs           |   4 +-
 LongoMatch.GUI/Gui/GUIToolkit.cs                   |   8 +
 LongoMatch.GUI/Gui/MainWindow.cs                   |  22 ++-
 LongoMatch.GUI/LongoMatch.GUI.mdp                  |   2 +
 LongoMatch.GUI/Makefile.am                         |   2 +
 .../LongoMatch.Gui.Dialog.DatabasesManager.cs      | 216 +++++++++++++++++++++
 .../gtk-gui/LongoMatch.Gui.Dialog.EntryDialog.cs   |   2 +-
 .../gtk-gui/LongoMatch.Gui.MainWindow.cs           |   6 +-
 LongoMatch.GUI/gtk-gui/gui.stetic                  | 182 +++++++++++++++++
 LongoMatch.GUI/gtk-gui/objects.xml                 |  34 ++--
 LongoMatch.Multimedia/Utils/GStreamer.cs           |   2 +-
 LongoMatch.Plugins/CSVExporter.cs                  |   2 +-
 LongoMatch.Services/LongoMatch.Services.mdp        |   2 +
 LongoMatch.Services/Makefile.am                    |   1 +
 LongoMatch.Services/Services/Core.cs               |  43 ++--
 LongoMatch.Services/Services/DataBase.cs           | 164 +++++++++-------
 LongoMatch.Services/Services/DataBaseManager.cs    | 132 +++++++++++++
 LongoMatch.Services/Services/EventsManager.cs      |   2 +-
 LongoMatch.Services/Services/PlaylistManager.cs    |   4 +-
 LongoMatch.Services/Services/ProjectsManager.cs    |   6 +-
 .../Services/VideoDrawingsManager.cs               |   2 +-
 LongoMatch/LongoMatchGtk.mdp                       |   2 +-
 LongoMatch/Main.cs                                 |   4 +-
 po/POTFILES.in                                     |   6 +-
 43 files changed, 1147 insertions(+), 183 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 9311afb..c393614 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,10 +46,11 @@ Makefile.in
 aclocal.m4
 configure
 install-sh
+libcesarplayer/test-*
 libcesarplayer/Makefile.in
 libcesarplayer/libcesarplayer.md.pc
-libcesarplayer/deps/
-libcesarplayer/libs/
+libcesarplayer/.deps/
+libcesarplayer/.libs/
 libcesarplayer/Makefile.in
 libcesarplayer/baconvideowidget-marshal.c
 libcesarplayer/baconvideowidget-marshal.h
diff --git a/LongoMatch.Addins/AddinsManager.cs b/LongoMatch.Addins/AddinsManager.cs
index db69050..1be19be 100644
--- a/LongoMatch.Addins/AddinsManager.cs
+++ b/LongoMatch.Addins/AddinsManager.cs
@@ -39,21 +39,36 @@ namespace LongoMatch.Addins
                
                public void LoadConfigModifierAddins() {
                        foreach (IConfigModifier configModifier in 
AddinManager.GetExtensionObjects<IConfigModifier> ()) {
-                               configModifier.ModifyConfig();
+                               try {
+                                       configModifier.ModifyConfig();
+                               } catch (Exception ex) {
+                                       Log.Error ("Error loading config modifier");
+                                       Log.Exception (ex);
+                               }
                        }
                }
                
                public void LoadExportProjectAddins(IMainWindow mainWindow) {
                        foreach (IExportProject exportProject in 
AddinManager.GetExtensionObjects<IExportProject> ()) {
-                               mainWindow.AddExportEntry(exportProject.GetMenuEntryName(), 
exportProject.GetMenuEntryShortName(),
-                                       new Action<Project, IGUIToolkit>(exportProject.ExportProject));
+                               try {
+                                       mainWindow.AddExportEntry(exportProject.GetMenuEntryName(), 
exportProject.GetMenuEntryShortName(),
+                                                                 new Action<Project, 
IGUIToolkit>(exportProject.ExportProject));
+                               } catch (Exception ex) {
+                                       Log.Error ("Error adding export entry");
+                                       Log.Exception (ex);
+                               }
                        }
                }
                
                public void LoadImportProjectAddins(IMainWindow mainWindow) {
                        foreach (IImportProject importProject in 
AddinManager.GetExtensionObjects<IImportProject> ()) {
-                               mainWindow.AddImportEntry(importProject.GetMenuEntryName(), 
importProject.GetMenuEntryShortName(),
-                                   importProject.GetFilterName(), importProject.GetFilter(), 
importProject.ImportProject, true);
+                               try{
+                                       mainWindow.AddImportEntry(importProject.GetMenuEntryName(), 
importProject.GetMenuEntryShortName(),
+                                                                 importProject.GetFilterName(), 
importProject.GetFilter(), importProject.ImportProject, true);
+                               } catch (Exception ex) {
+                                       Log.Error ("Error adding import entry");
+                                       Log.Exception (ex);
+                               }
                        }
                }
        }
diff --git a/LongoMatch.Core/Common/Constants.cs b/LongoMatch.Core/Common/Constants.cs
index d817e94..b048f08 100644
--- a/LongoMatch.Core/Common/Constants.cs
+++ b/LongoMatch.Core/Common/Constants.cs
@@ -29,7 +29,7 @@ namespace LongoMatch.Common
 
                public const string PROJECT_NAME = SOFTWARE_NAME + " project";
 
-               public const string DB_FILE = "longomatch.1.db";
+               public const string DEFAULT_DB_NAME = "longomatch";
                
                public const string COPYRIGHT =  "Copyright ©2007-2010 Andoni Morales Alastruey";
                
diff --git a/LongoMatch.Core/Common/SerializableObject.cs b/LongoMatch.Core/Common/SerializableObject.cs
index 92634b2..521cab6 100644
--- a/LongoMatch.Core/Common/SerializableObject.cs
+++ b/LongoMatch.Core/Common/SerializableObject.cs
@@ -18,34 +18,59 @@
 using System;
 using System.IO;
 using System.Runtime.Serialization.Formatters.Binary;
+using System.Xml.Serialization;
 
 namespace LongoMatch.Common
 {
        public class SerializableObject
        {
-               public static void Save<T>(T obj, Stream stream) {
-                       BinaryFormatter formatter = new  BinaryFormatter();
-                       formatter.Serialize(stream, obj);
+               public enum SerializationType {
+                       Binary,
+                       Xml
                }
                
-               public static void Save<T>(T obj, string filepath) {
+               public static void Save<T>(T obj, Stream stream,
+                                          SerializationType type=SerializationType.Binary) {
+                       switch (type) {
+                       case SerializationType.Binary:
+                               BinaryFormatter formatter = new  BinaryFormatter();
+                               formatter.Serialize(stream, obj);
+                               break;
+                       case SerializationType.Xml:
+                               XmlSerializer xmlformatter = new XmlSerializer(typeof(T));
+                               xmlformatter.Serialize(stream, obj);
+                               break;
+                       }
+               }
+               
+               public static void Save<T>(T obj, string filepath,
+                                          SerializationType type=SerializationType.Binary) {
                        Stream stream = new FileStream(filepath, FileMode.Create, FileAccess.Write, 
FileShare.None);
                        using (stream) {
-                               Save<T> (obj, stream);
+                               Save<T> (obj, stream, type);
                                stream.Close();
                        }
                }
 
-               public static T Load<T>(Stream stream) {
-                       BinaryFormatter formatter = new BinaryFormatter();
-                       var obj = formatter.Deserialize(stream);
-                       return (T)obj;
+               public static T Load<T>(Stream stream,
+                                       SerializationType type=SerializationType.Binary) {
+                       switch (type) {
+                       case SerializationType.Binary:
+                               BinaryFormatter formatter = new BinaryFormatter();
+                               return (T)formatter.Deserialize(stream);
+                       case SerializationType.Xml:
+                               XmlSerializer xmlformatter = new XmlSerializer(typeof(T));
+                               return (T) xmlformatter.Deserialize(stream);
+                       default:
+                               throw new Exception();
+                       }
                }
                
-               public static T Load<T>(string filepath) {
+               public static T Load<T>(string filepath,
+                                       SerializationType type=SerializationType.Binary) {
                        Stream stream = new FileStream(filepath, FileMode.Open, FileAccess.Read, 
FileShare.Read);
                        using (stream) {
-                               return Load<T> (stream);
+                               return Load<T> (stream, type);
                        }
                }
        }
diff --git a/LongoMatch.Core/Config.cs b/LongoMatch.Core/Config.cs
index efbe0cc..710d712 100644
--- a/LongoMatch.Core/Config.cs
+++ b/LongoMatch.Core/Config.cs
@@ -24,70 +24,159 @@ namespace LongoMatch
 {
        public class Config
        {
-               public static string baseDirectory;
                public static string homeDirectory;
+               public static string baseDirectory;
                public static string configDirectory;
-               public static bool fastTagging = false;
+               static ConfigState state;
                
-               public static string HomeDir() {
-                       return homeDirectory;
+               public static void Load () {
+                       if (File.Exists(Config.ConfigFile)) {
+                               Log.Information ("Loading config from " + Config.ConfigFile);
+                               try {
+                                       state = SerializableObject.Load<ConfigState>(Config.ConfigFile, 
SerializableObject.SerializationType.Xml);
+                               } catch (Exception ex) {
+                                       Log.Error ("Error loading config");
+                                       Log.Exception (ex);
+                               }
+                       }
+                       
+                       if (state == null) {
+                               Log.Information ("Creating new config at " + Config.ConfigFile);
+                               state = new ConfigState();
+                               Save ();
+                       }
+               }
+               
+               public static void Save () {
+                       try {
+                               SerializableObject.Save(state, Config.ConfigFile, 
SerializableObject.SerializationType.Xml); 
+                       } catch (Exception ex) {
+                               Log.Error ("Errro saving config");
+                               Log.Exception (ex);
+                       }
+               }
+               
+               public static string ConfigFile {
+                       get {
+                               string filename = Constants.SOFTWARE_NAME.ToLower() + ".config";
+                               return Path.Combine(Config.ConfigDir, filename);
+                       }
+               }
+               
+               public static string HomeDir {
+                       get {
+                               return homeDirectory;
+                       }
                }
 
-               public static string PlayListDir() {
-                       return Path.Combine(homeDirectory, "playlists");
+               public static string BaseDir {
+                       set {
+                               baseDirectory = value;
+                       }
+               }
+               
+               public static string ConfigDir {
+                       set {
+                               configDirectory = value;
+                       }
+                       get {
+                               return configDirectory;
+                       }
+               }
+               
+               public static string PlayListDir {
+                       get {
+                               return Path.Combine(homeDirectory, "playlists");
+                       }
                }
 
-               public static string SnapshotsDir() {
-                       return Path.Combine(homeDirectory, "snapshots");
+               public static string SnapshotsDir {
+                       get {
+                               return Path.Combine(homeDirectory, "snapshots");
+                       }
                }
 
-               public static string TemplatesDir() {
-                       return Path.Combine(homeDirectory, "templates");
+               public static string TemplatesDir {
+                       get {
+                               return Path.Combine(homeDirectory, "templates");
+                       }
                }
 
-               public static string VideosDir() {
-                       return Path.Combine(homeDirectory, "videos");
+               public static string VideosDir {
+                       get {
+                               return Path.Combine(homeDirectory, "videos");
+                       }
                }
 
-               public static string TempVideosDir() {
-                       return Path.Combine(configDirectory, "temp");
+               public static string TempVideosDir {
+                       get {
+                               return Path.Combine(configDirectory, "temp");
+                       }
                }
 
-               public static string ImagesDir() {
-                       return RelativeToPrefix(String.Format("share/{0}/images",
-                                               Constants.SOFTWARE_NAME.ToLower()));
+               public static string ImagesDir {
+                       get {
+                               return RelativeToPrefix(String.Format("share/{0}/images",
+                                                                     Constants.SOFTWARE_NAME.ToLower()));
+                       }
                }
                
-               public static string PluginsDir() {
-                       return RelativeToPrefix(String.Format("lib/{0}/plugins",
-                                               Constants.SOFTWARE_NAME.ToLower()));
+               public static string PluginsDir {
+                       get {
+                               return RelativeToPrefix(String.Format("lib/{0}/plugins",
+                                                                     Constants.SOFTWARE_NAME.ToLower()));
+                       }
                }
                
-               public static string PluginsConfigDir() {
-                       return Path.Combine(configDirectory, "addins");
+               public static string PluginsConfigDir {
+                       get {
+                               return Path.Combine(configDirectory, "addins");
+                       }
                }
 
-               public static string DBDir() {
-                       return Path.Combine(configDirectory, "db");
+               public static string DBDir {
+                       get {
+                               return Path.Combine(configDirectory, "db");
+                       }
                }
                
                public static string RelativeToPrefix(string relativePath) {
                        return Path.Combine(baseDirectory, relativePath);
                }
                
+               #region Properties
                public static bool FastTagging {
                        get {
-                               return fastTagging;
+                               return state.fastTagging;
                        }
                        set {
-                               fastTagging = value;
+                               state.fastTagging = value;
+                               Save ();
                        }
                }
                
+               public static bool UseGameUnits {
+                       get;
+                       set;
+               }
                
-               /* Properties */
-               public static bool useGameUnits = false;
+               public static string CurrentDatabase {
+                       get {
+                               return state.currentDatabase;
+                       }
+                       set {
+                               state.currentDatabase = value;
+                               Save ();
+                       }
+               }
+               #endregion
 
        }
+       
+       [Serializable]
+       public class ConfigState{
+               public bool fastTagging=false;
+               public string currentDatabase=Constants.DEFAULT_DB_NAME;
+       }
 }
 
diff --git a/LongoMatch.Core/Handlers/Handlers.cs b/LongoMatch.Core/Handlers/Handlers.cs
index 1f9de1a..0ed7bef 100644
--- a/LongoMatch.Core/Handlers/Handlers.cs
+++ b/LongoMatch.Core/Handlers/Handlers.cs
@@ -63,6 +63,7 @@ namespace LongoMatch.Handlers
        public delegate void ManageTeamsHandler();
        public delegate void ManageCategoriesHandler();
        public delegate void ManageProjects();
+       public delegate void ManageDatabases();
        
 
        /*Playlist Events*/
diff --git a/LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs b/LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs
index 61d6019..f14b62a 100644
--- a/LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs
+++ b/LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs
@@ -65,6 +65,7 @@ namespace LongoMatch.Interfaces.GUI
                void OpenProjectsManager(Project openedProject, IDatabase db, ITemplatesService ts);
                void OpenCategoriesTemplatesManager(ITemplatesService ts);
                void OpenTeamsTemplatesManager(ITeamTemplatesProvider tp);
+               void OpenDatabasesManager(IDataBaseManager dm);
                
                void ManageJobs(IRenderingJobsManager manager);
                
diff --git a/LongoMatch.Core/Interfaces/GUI/IMainWindow.cs b/LongoMatch.Core/Interfaces/GUI/IMainWindow.cs
index b291c4c..b7bc4a6 100644
--- a/LongoMatch.Core/Interfaces/GUI/IMainWindow.cs
+++ b/LongoMatch.Core/Interfaces/GUI/IMainWindow.cs
@@ -62,6 +62,7 @@ namespace LongoMatch.Interfaces.GUI
                event ManageTeamsHandler ManageTeamsEvent;
                event ManageCategoriesHandler ManageCategoriesEvent;
                event ManageProjects ManageProjectsEvent;
+               event ManageDatabases ManageDatabasesEvent;
                event ApplyCurrentRateHandler ApplyRateEvent;
                
                /* Game Units events */
diff --git a/LongoMatch.Core/Interfaces/IDataBaseManager.cs b/LongoMatch.Core/Interfaces/IDataBaseManager.cs
new file mode 100644
index 0000000..04bd97c
--- /dev/null
+++ b/LongoMatch.Core/Interfaces/IDataBaseManager.cs
@@ -0,0 +1,32 @@
+// 
+//  Copyright (C) 2013 Andoni Morales Alastruey
+// 
+//  This program 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 2 of the License, or
+//  (at your option) any later version.
+// 
+//  This program 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 this program; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+// 
+using System;
+using System.Collections.Generic;
+
+namespace LongoMatch.Interfaces
+{
+       public interface IDataBaseManager
+       {
+               void SetActiveByName (string name);
+               IDatabase Add (string name);
+               bool Delete (IDatabase db);
+               IDatabase ActiveDB { get; set; }
+               List<IDatabase> Databases { get; set; }
+       }
+}
+
diff --git a/LongoMatch.Core/Interfaces/IDatabase.cs b/LongoMatch.Core/Interfaces/IDatabase.cs
index 2f91133..5307748 100644
--- a/LongoMatch.Core/Interfaces/IDatabase.cs
+++ b/LongoMatch.Core/Interfaces/IDatabase.cs
@@ -34,6 +34,16 @@ namespace LongoMatch.Interfaces
                void UpdateProject(Project project);
                
                bool Exists(Project project);
+               
+               bool Backup ();
+               
+               bool Delete ();
+               
+               string Name {get;}
+               
+               DateTime LastBackup {get;}
+               
+               int Count {get;}
        }
 }
 
diff --git a/LongoMatch.Core/LongoMatch.Core.mdp b/LongoMatch.Core/LongoMatch.Core.mdp
index 85cd900..eb4226e 100644
--- a/LongoMatch.Core/LongoMatch.Core.mdp
+++ b/LongoMatch.Core/LongoMatch.Core.mdp
@@ -103,6 +103,7 @@
     <File subtype="Code" buildaction="Compile" name="Common/Coordinates.cs" />
     <File subtype="Code" buildaction="Compile" name="Interfaces/Multimedia/IVideoConverter.cs" />
     <File subtype="Code" buildaction="Compile" name="Common/SysInfo.cs" />
+    <File subtype="Code" buildaction="Compile" name="Interfaces/IDataBaseManager.cs" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="System, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089" />
diff --git a/LongoMatch.Core/Makefile.am b/LongoMatch.Core/Makefile.am
index 2d9cb04..1944f50 100644
--- a/LongoMatch.Core/Makefile.am
+++ b/LongoMatch.Core/Makefile.am
@@ -38,6 +38,7 @@ SOURCES = \
        Interfaces/Multimedia/IVideoConverter.cs \
        Interfaces/Multimedia/IVideoEditor.cs \
        Interfaces/IDatabase.cs \
+       Interfaces/IDataBaseManager.cs \
        Interfaces/IPlayList.cs \
        Interfaces/IRenderingJobsManager.cs \
        Interfaces/ISubCategory.cs \
diff --git a/LongoMatch.Core/Store/Player.cs b/LongoMatch.Core/Store/Player.cs
index d344b3d..7775a7b 100644
--- a/LongoMatch.Core/Store/Player.cs
+++ b/LongoMatch.Core/Store/Player.cs
@@ -121,7 +121,7 @@ namespace LongoMatch.Store
                
                public override string ToString ()
                {
-                       return String.Format("{0} ({1})", Name, Number);
+                       return String.Format("{0} - {1}", Number, Name);
                }
 
                #endregion
diff --git a/LongoMatch.GUI/Gui/Component/CategoriesTemplateEditor.cs 
b/LongoMatch.GUI/Gui/Component/CategoriesTemplateEditor.cs
index 97027be..e9895cd 100644
--- a/LongoMatch.GUI/Gui/Component/CategoriesTemplateEditor.cs
+++ b/LongoMatch.GUI/Gui/Component/CategoriesTemplateEditor.cs
@@ -45,7 +45,7 @@ namespace LongoMatch.Gui.Component
                        FirstPageName = Catalog.GetString("Categories");
                        AddTreeView(categoriestreeview);
                        gameUnitsEditor = new GameUnitsEditor();
-                       if (Config.useGameUnits) {
+                       if (Config.UseGameUnits) {
                                AddPage(gameUnitsEditor, "Game phases");
                        }
                        this.ts = ts;
diff --git a/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs 
b/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs
index 067794a..c79fe94 100644
--- a/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs
@@ -463,7 +463,7 @@ namespace LongoMatch.Gui.Component
                                                                 FileChooserAction.Save,
                                                                 "gtk-cancel",ResponseType.Cancel,
                                                                 "gtk-save",ResponseType.Accept);
-                               fChooser.SetCurrentFolder(Config.VideosDir());
+                               fChooser.SetCurrentFolder(Config.VideosDir);
                                fChooser.DoOverwriteConfirmation = true;
                                if(fChooser.Run() == (int)ResponseType.Accept)
                                        fileEntry.Text = fChooser.Filename;
diff --git a/LongoMatch.GUI/Gui/Dialog/DatabasesManager.cs b/LongoMatch.GUI/Gui/Dialog/DatabasesManager.cs
new file mode 100644
index 0000000..f277143
--- /dev/null
+++ b/LongoMatch.GUI/Gui/Dialog/DatabasesManager.cs
@@ -0,0 +1,195 @@
+// 
+//  Copyright (C) 2013 Andoni Morales Alastruey
+// 
+//  This program 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 2 of the License, or
+//  (at your option) any later version.
+// 
+//  This program 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 this program; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+// 
+using System;
+using System.Linq;
+using Gtk;
+using Mono.Unix;
+
+using LongoMatch.Interfaces;
+using LongoMatch.Gui.Helpers;
+
+namespace LongoMatch.Gui.Dialog
+{
+       public partial class DatabasesManager : Gtk.Dialog
+       {
+               IDataBaseManager manager;
+               ListStore store;
+                       
+               public DatabasesManager (IDataBaseManager manager)
+               {
+                       this.Build ();
+                       this.manager = manager;
+                       ActiveDB = manager.ActiveDB;
+                       SetTreeView ();
+               }
+               
+               IDatabase ActiveDB {
+                       set {
+                               dblabel.Text = Catalog.GetString("Active database") +": " + value.Name;
+                       }
+               }
+               
+               void SetTreeView () {
+                       /* DB name */
+                       TreeViewColumn nameCol = new TreeViewColumn();
+                       nameCol.Title = Catalog.GetString("Name");
+                       CellRendererText nameCell = new CellRendererText();
+                       nameCol.PackStart(nameCell, true);
+                       nameCol.SetCellDataFunc(nameCell, new TreeCellDataFunc(RenderName));
+                       treeview.AppendColumn(nameCol);
+                       
+                       /* DB last backup */
+                       TreeViewColumn lastbackupCol = new TreeViewColumn();
+                       lastbackupCol.Title = Catalog.GetString("Last backup");
+                       CellRendererText lastbackupCell = new CellRendererText();
+                       lastbackupCol.PackStart(lastbackupCell, true);
+                       lastbackupCol.SetCellDataFunc(lastbackupCell, new TreeCellDataFunc(RenderLastbackup));
+                       treeview.AppendColumn(lastbackupCol);
+                       
+                       /* DB Projects count */
+                       TreeViewColumn countCol = new TreeViewColumn();
+                       countCol.Title = Catalog.GetString("Projects count");
+                       CellRendererText countCell = new CellRendererText();
+                       countCol.PackStart(countCell, true);
+                       countCol.SetCellDataFunc(countCell, new TreeCellDataFunc(RenderCount));
+                       treeview.AppendColumn(countCol);
+                       store = new ListStore(typeof (IDatabase));
+                       foreach (IDatabase db in manager.Databases) {
+                               store.AppendValues(db);
+                       }
+                       treeview.Model = store;
+               }
+               
+               IDatabase SelectedDB {
+                       get {
+                               TreeIter iter;
+                               
+                               treeview.Selection.GetSelected (out iter);
+                               return store.GetValue (iter, 0) as IDatabase;
+                       }
+               }
+
+               void RenderCount (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, 
Gtk.TreeIter iter)
+               {
+                       IDatabase db = (IDatabase) store.GetValue(iter, 0);
+
+                       (cell as Gtk.CellRendererText).Text = db.Count.ToString(); 
+                       if(db == manager.ActiveDB) {
+                               cell.CellBackground = "red";
+                       } else {
+                               cell.CellBackground = "white";
+                       }
+               }
+
+               void RenderLastbackup (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, 
Gtk.TreeIter iter)
+               {
+                       IDatabase db = (IDatabase) store.GetValue(iter, 0);
+
+                       (cell as Gtk.CellRendererText).Text = db.LastBackup.ToShortDateString(); 
+                       if(db == manager.ActiveDB) {
+                               cell.CellBackground = "red";
+                       } else {
+                               cell.CellBackground = "white";
+                       }
+               }
+
+               void RenderName (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, 
Gtk.TreeIter iter)
+               {
+                       IDatabase db = (IDatabase) store.GetValue(iter, 0);
+
+                       (cell as Gtk.CellRendererText).Text = db.Name; 
+                       if(db == manager.ActiveDB) {
+                               cell.CellBackground = "red";
+                       } else {
+                               cell.CellBackground = "white";
+                       }
+               }
+
+               protected void OnSelectbuttonClicked (object sender, System.EventArgs e)
+               {
+                       IDatabase db = SelectedDB;
+                       if (db != null) {
+                               manager.ActiveDB = db;
+                               ActiveDB = db;
+                       }
+               }
+
+               protected void OnAddbuttonClicked (object sender, System.EventArgs e)
+               {
+                       IDatabase db;
+                       string dbname = MessagesHelpers.QueryMessage (this, Catalog.GetString ("Database 
name"));
+                       if (dbname == null || dbname == "")
+                               return;
+                       
+                       if (manager.Databases.Where (d => d.Name == dbname).Count() != 0) {
+                               var msg = Catalog.GetString ("A database already exists with this name");
+                               MessagesHelpers.ErrorMessage (this, msg);
+                               return;
+                       }
+                       
+                       db = manager.Add (dbname);
+                       if (db != null)
+                               store.AppendValues (db);
+               }
+
+               protected void OnDelbuttonClicked (object sender, System.EventArgs e)
+               {
+                       TreeIter iter;
+                       IDatabase db;
+                               
+                       treeview.Selection.GetSelected (out iter);
+                       db  = store.GetValue (iter, 0) as IDatabase;
+                       
+                       if (db == manager.ActiveDB) {
+                               var msg = Catalog.GetString ("This database is the active one and can't be 
deleted");
+                               MessagesHelpers.ErrorMessage (this, msg);
+                               return;
+                       }
+
+                       if (db != null) {
+                               var msg = Catalog.GetString ("Do you really want to delete the database: " + 
db.Name);
+                               if (MessagesHelpers.QuestionMessage (this, msg)) {
+                                       db.Backup ();
+                                       manager.Delete (db);
+                                       store.Remove(ref iter);
+                               }
+                       }
+               }
+
+               protected void OnBackupbuttonClicked (object sender, System.EventArgs e)
+               {
+                       IDatabase db = SelectedDB;
+                       if (db != null) {
+                               if (db.Backup())
+                                       MessagesHelpers.InfoMessage (this, Catalog.GetString ("Backup 
successfull"));
+                               else
+                                       MessagesHelpers.ErrorMessage (this, Catalog.GetString ("Could not 
create backup"));
+                       }
+               }
+
+               protected void OnTreeviewCursorChanged (object sender, System.EventArgs e)
+               {
+                       bool selected = SelectedDB != null;
+                       
+                       delbutton.Sensitive = selected;
+                       backupbutton.Sensitive = selected;
+                       selectbutton.Sensitive = selected;
+               }
+       }
+}
+
diff --git a/LongoMatch.GUI/Gui/Dialog/DrawingTool.cs b/LongoMatch.GUI/Gui/Dialog/DrawingTool.cs
index 2a06805..a8c2f27 100644
--- a/LongoMatch.GUI/Gui/Dialog/DrawingTool.cs
+++ b/LongoMatch.GUI/Gui/Dialog/DrawingTool.cs
@@ -107,7 +107,7 @@ namespace LongoMatch.Gui.Dialog
                                                         FileChooserAction.Save,
                                                         "gtk-cancel",ResponseType.Cancel,
                                                         "gtk-save",ResponseType.Accept);
-                       fChooser.SetCurrentFolder(Config.SnapshotsDir());
+                       fChooser.SetCurrentFolder(Config.SnapshotsDir);
                        fChooser.Filter = filter;
                        fChooser.DoOverwriteConfirmation = true;
 
diff --git a/LongoMatch.GUI/Gui/Dialog/ProjectsManager.cs b/LongoMatch.GUI/Gui/Dialog/ProjectsManager.cs
index 6ae5d5e..d8b0c08 100644
--- a/LongoMatch.GUI/Gui/Dialog/ProjectsManager.cs
+++ b/LongoMatch.GUI/Gui/Dialog/ProjectsManager.cs
@@ -187,7 +187,7 @@ namespace LongoMatch.Gui.Dialog
                                        FileChooserAction.Save,
                                        "gtk-cancel",ResponseType.Cancel,
                                        "gtk-save",ResponseType.Accept);
-                       fChooser.SetCurrentFolder(Config.HomeDir());
+                       fChooser.SetCurrentFolder(Config.HomeDir);
                        FileFilter filter = new FileFilter();
                        filter.Name = Constants.PROJECT_NAME;
                        filter.AddPattern(Constants.PROJECT_EXT);
diff --git a/LongoMatch.GUI/Gui/Dialog/VideoConversionTool.cs 
b/LongoMatch.GUI/Gui/Dialog/VideoConversionTool.cs
index 47144c1..1287991 100644
--- a/LongoMatch.GUI/Gui/Dialog/VideoConversionTool.cs
+++ b/LongoMatch.GUI/Gui/Dialog/VideoConversionTool.cs
@@ -80,7 +80,7 @@ namespace LongoMatch.Gui.Dialog
                protected void OnAddbuttonClicked (object sender, System.EventArgs e)
                {
                        List<string> paths = GUIToolkit.Instance.OpenFiles (Catalog.GetString("Add file"), 
null,
-                                                                           Config.HomeDir(), null, null);
+                                                                           Config.HomeDir, null, null);
                        List<string> errors = new List<string>();
                        foreach (string path in paths) {
                                try {
@@ -115,7 +115,7 @@ namespace LongoMatch.Gui.Dialog
                {
                        string path = GUIToolkit.Instance.SaveFile (Catalog.GetString("Add file"),
                                                                    "NewVideo.mp4",
-                                                                   Config.VideosDir(),
+                                                                   Config.VideosDir,
                                                                    Catalog.GetString("MP4 file"),
                                                                    "mp4");
                        outputFile = System.IO.Path.ChangeExtension (path, "mp4");
diff --git a/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs 
b/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
index efa529e..6da8d31 100644
--- a/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
+++ b/LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
@@ -158,7 +158,7 @@ namespace LongoMatch.Gui.Dialog
                                        FileChooserAction.Save,
                                        "gtk-cancel",ResponseType.Cancel,
                                        "gtk-save",ResponseType.Accept);
-                       fChooser.SetCurrentFolder(Config.VideosDir());
+                       fChooser.SetCurrentFolder(Config.VideosDir);
                        fChooser.CurrentName = "NewVideo."+GetExtension();
                        fChooser.DoOverwriteConfirmation = true;
                        FileFilter filter = new FileFilter();
@@ -196,7 +196,7 @@ namespace LongoMatch.Gui.Dialog
                                        FileChooserAction.SelectFolder,
                                        "gtk-cancel",ResponseType.Cancel,
                                        "gtk-open",ResponseType.Accept);
-                       fChooser.SetCurrentFolder(Config.VideosDir());
+                       fChooser.SetCurrentFolder(Config.VideosDir);
                        fChooser.CurrentName = "Playlist";
                        if(fChooser.Run() == (int)ResponseType.Accept) {
                                dirlabel.Text = fChooser.Filename;
diff --git a/LongoMatch.GUI/Gui/GUIToolkit.cs b/LongoMatch.GUI/Gui/GUIToolkit.cs
index 4c5b407..a2efde4 100644
--- a/LongoMatch.GUI/Gui/GUIToolkit.cs
+++ b/LongoMatch.GUI/Gui/GUIToolkit.cs
@@ -244,6 +244,14 @@ namespace LongoMatch.Gui
                        pm.Show();
                }
                
+               public void OpenDatabasesManager(IDataBaseManager manager)
+               {
+                       DatabasesManager dm = new DatabasesManager (manager);
+                       dm.TransientFor = mainWindow as Gtk.Window;
+                       dm.Run();
+                       dm.Destroy();
+               }
+               
                public void ManageJobs(IRenderingJobsManager manager) {
                        RenderingJobsDialog dialog = new RenderingJobsDialog(manager);
                        dialog.TransientFor = mainWindow as Gtk.Window;
diff --git a/LongoMatch.GUI/Gui/MainWindow.cs b/LongoMatch.GUI/Gui/MainWindow.cs
index c70fd88..9b39799 100644
--- a/LongoMatch.GUI/Gui/MainWindow.cs
+++ b/LongoMatch.GUI/Gui/MainWindow.cs
@@ -82,6 +82,7 @@ namespace LongoMatch.Gui
                public event ManageTeamsHandler ManageTeamsEvent;
                public event ManageCategoriesHandler ManageCategoriesEvent;
                public event ManageProjects ManageProjectsEvent;
+               public event ManageDatabases ManageDatabasesEvent;
                public event ApplyCurrentRateHandler ApplyRateEvent;
                
                /* Game Units events */
@@ -123,20 +124,22 @@ namespace LongoMatch.Gui
                        guTimeline = new GameUnitsTimelineWidget ();
                        downbox.PackStart(guTimeline, true, true, 0);
                        
+                       TagSubcategoriesAction.Active = !Config.FastTagging;
+                       
                        playercapturer.Mode = PlayerCapturerBin.PlayerOperationMode.Player;
-                       playercapturer.SetLogo(System.IO.Path.Combine(Config.ImagesDir(),"background.png"));
+                       playercapturer.SetLogo(System.IO.Path.Combine(Config.ImagesDir,"background.png"));
                        playercapturer.LogoMode = true;
                        playercapturer.Tick += OnTick;
                        playercapturer.Detach += DetachPlayer;
 
-                       playercapturer.Logo = System.IO.Path.Combine(Config.ImagesDir(),"background.png");
+                       playercapturer.Logo = System.IO.Path.Combine(Config.ImagesDir,"background.png");
                        playercapturer.CaptureFinished += (sender, e) => {CloseCaptureProject();};
                        
                        buttonswidget.Mode = TagMode.Predifined;
                        ConnectSignals();
                        ConnectMenuSignals();
                        
-                       if (!Config.useGameUnits)
+                       if (!Config.UseGameUnits)
                                GameUnitsViewAction.Visible = false;
                        
                        MenuItem parent = ImportProjectActionMenu;
@@ -310,6 +313,7 @@ namespace LongoMatch.Gui
                        CategoriesTemplatesManagerAction.Activated += (o, e) => {EmitManageCategories();};
                        TeamsTemplatesManagerAction.Activated += (o, e) => {EmitManageTeams();};
                        ProjectsManagerAction.Activated += (o, e) => {EmitManageProjects();};
+                       DatabasesManagerAction.Activated +=  (o, e) => {EmitManageDatabases();};
                }
                
                void DetachPlayer (bool detach) {
@@ -336,7 +340,7 @@ namespace LongoMatch.Gui
                                playercapturer.Reparent(box);
                                buttonswidget.Visible = true;
                                timeline.Visible = true;
-                               if (Config.useGameUnits) {
+                               if (Config.UseGameUnits) {
                                        guTimeline.Visible = true;
                                        gameunitstaggerwidget1.Visible = true;
                                }
@@ -578,7 +582,7 @@ namespace LongoMatch.Gui
                        timeline.Visible = !action.Active && TimelineViewAction.Active;
                        buttonswidget.Visible = !action.Active &&
                                (TaggingViewAction.Active || ManualTaggingViewAction.Active);
-                       if (Config.useGameUnits) {
+                       if (Config.UseGameUnits) {
                                guTimeline.Visible = !action.Visible && GameUnitsViewAction.Active;
                                gameunitstaggerwidget1.Visible = !action.Active && 
(GameUnitsViewAction.Active || 
                                        TaggingViewAction.Active || ManualTaggingViewAction.Active);
@@ -598,7 +602,7 @@ namespace LongoMatch.Gui
                        
                        buttonswidget.Visible = action == ManualTaggingViewAction || sender == 
TaggingViewAction;
                        timeline.Visible = action == TimelineViewAction;
-                       if (Config.useGameUnits) {
+                       if (Config.UseGameUnits) {
                                guTimeline.Visible = action == GameUnitsViewAction;
                                gameunitstaggerwidget1.Visible = buttonswidget.Visible || guTimeline.Visible;
                        }
@@ -872,6 +876,12 @@ namespace LongoMatch.Gui
                                ManageProjectsEvent();
                }
                
+               private void EmitManageDatabases()
+               {
+                       if (ManageDatabasesEvent != null)
+                               ManageDatabasesEvent();
+               }
+               
                private void EmitNewPlaylist() {
                        if (NewPlaylistEvent != null)
                                NewPlaylistEvent();
diff --git a/LongoMatch.GUI/LongoMatch.GUI.mdp b/LongoMatch.GUI/LongoMatch.GUI.mdp
index 6201931..1a639eb 100644
--- a/LongoMatch.GUI/LongoMatch.GUI.mdp
+++ b/LongoMatch.GUI/LongoMatch.GUI.mdp
@@ -159,6 +159,8 @@
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.ShortcutsHelpDialog.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Dialog/VideoConversionTool.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.VideoConversionTool.cs" />
+    <File subtype="Code" buildaction="Compile" name="Gui/Dialog/DatabasesManager.cs" />
+    <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.DatabasesManager.cs" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="atk-sharp, Version=2.12.0.0, Culture=neutral, 
PublicKeyToken=35e10195dab3c99f" />
diff --git a/LongoMatch.GUI/Makefile.am b/LongoMatch.GUI/Makefile.am
index c56f21c..3db5942 100644
--- a/LongoMatch.GUI/Makefile.am
+++ b/LongoMatch.GUI/Makefile.am
@@ -29,6 +29,7 @@ SOURCES = \
        gtk-gui/LongoMatch.Gui.Component.TaggerWidget.cs \
        gtk-gui/LongoMatch.Gui.Component.TeamTaggerWidget.cs \
        gtk-gui/LongoMatch.Gui.Dialog.BusyDialog.cs \
+       gtk-gui/LongoMatch.Gui.Dialog.DatabasesManager.cs \
        gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs \
        gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs \
        gtk-gui/LongoMatch.Gui.Dialog.EditPlayerDialog.cs \
@@ -88,6 +89,7 @@ SOURCES = \
        Gui/Component/TimeScale.cs \
        Gui/Dialog/About.cs \
        Gui/Dialog/BusyDialog.cs \
+       Gui/Dialog/DatabasesManager.cs \
        Gui/Dialog/DrawingTool.cs \
        Gui/Dialog/EditCategoryDialog.cs \
        Gui/Dialog/EditPlayerDialog.cs \
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.DatabasesManager.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.DatabasesManager.cs
new file mode 100644
index 0000000..7b43536
--- /dev/null
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.DatabasesManager.cs
@@ -0,0 +1,216 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace LongoMatch.Gui.Dialog
+{
+       public partial class DatabasesManager
+       {
+               private global::Gtk.VBox vbox2;
+               private global::Gtk.Label dblabel;
+               private global::Gtk.HBox hbox1;
+               private global::Gtk.ScrolledWindow GtkScrolledWindow;
+               private global::Gtk.TreeView treeview;
+               private global::Gtk.VBox vbox3;
+               private global::Gtk.Button selectbutton;
+               private global::Gtk.Button delbutton;
+               private global::Gtk.Button backupbutton;
+               private global::Gtk.Button addbutton;
+               private global::Gtk.Button buttonOk;
+               
+               protected virtual void Build ()
+               {
+                       global::Stetic.Gui.Initialize (this);
+                       // Widget LongoMatch.Gui.Dialog.DatabasesManager
+                       this.Name = "LongoMatch.Gui.Dialog.DatabasesManager";
+                       this.Title = global::Mono.Unix.Catalog.GetString ("Databases manager");
+                       this.Icon = global::Gdk.Pixbuf.LoadFromResource ("logo.svg");
+                       this.WindowPosition = ((global::Gtk.WindowPosition)(4));
+                       this.Modal = true;
+                       this.Gravity = ((global::Gdk.Gravity)(5));
+                       this.SkipPagerHint = true;
+                       this.SkipTaskbarHint = true;
+                       // Internal child LongoMatch.Gui.Dialog.DatabasesManager.VBox
+                       global::Gtk.VBox w1 = this.VBox;
+                       w1.Name = "dialog1_VBox";
+                       w1.BorderWidth = ((uint)(2));
+                       // Container child dialog1_VBox.Gtk.Box+BoxChild
+                       this.vbox2 = new global::Gtk.VBox ();
+                       this.vbox2.Name = "vbox2";
+                       this.vbox2.Spacing = 6;
+                       // Container child vbox2.Gtk.Box+BoxChild
+                       this.dblabel = new global::Gtk.Label ();
+                       this.dblabel.Name = "dblabel";
+                       this.vbox2.Add (this.dblabel);
+                       global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.dblabel]));
+                       w2.Position = 0;
+                       w2.Expand = false;
+                       w2.Fill = false;
+                       // Container child vbox2.Gtk.Box+BoxChild
+                       this.hbox1 = new global::Gtk.HBox ();
+                       this.hbox1.Name = "hbox1";
+                       this.hbox1.Spacing = 6;
+                       // Container child hbox1.Gtk.Box+BoxChild
+                       this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
+                       this.GtkScrolledWindow.Name = "GtkScrolledWindow";
+                       this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
+                       // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
+                       this.treeview = new global::Gtk.TreeView ();
+                       this.treeview.CanFocus = true;
+                       this.treeview.Name = "treeview";
+                       this.GtkScrolledWindow.Add (this.treeview);
+                       this.hbox1.Add (this.GtkScrolledWindow);
+                       global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox1 
[this.GtkScrolledWindow]));
+                       w4.Position = 0;
+                       // Container child hbox1.Gtk.Box+BoxChild
+                       this.vbox3 = new global::Gtk.VBox ();
+                       this.vbox3.Name = "vbox3";
+                       this.vbox3.Spacing = 6;
+                       // Container child vbox3.Gtk.Box+BoxChild
+                       this.selectbutton = new global::Gtk.Button ();
+                       this.selectbutton.Sensitive = false;
+                       this.selectbutton.CanFocus = true;
+                       this.selectbutton.Name = "selectbutton";
+                       this.selectbutton.UseUnderline = true;
+                       // Container child selectbutton.Gtk.Container+ContainerChild
+                       global::Gtk.Alignment w5 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
+                       // Container child GtkAlignment.Gtk.Container+ContainerChild
+                       global::Gtk.HBox w6 = new global::Gtk.HBox ();
+                       w6.Spacing = 2;
+                       // Container child GtkHBox.Gtk.Container+ContainerChild
+                       global::Gtk.Image w7 = new global::Gtk.Image ();
+                       w7.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-apply", 
global::Gtk.IconSize.Menu);
+                       w6.Add (w7);
+                       // Container child GtkHBox.Gtk.Container+ContainerChild
+                       global::Gtk.Label w9 = new global::Gtk.Label ();
+                       w9.LabelProp = global::Mono.Unix.Catalog.GetString ("_Select DB");
+                       w9.UseUnderline = true;
+                       w6.Add (w9);
+                       w5.Add (w6);
+                       this.selectbutton.Add (w5);
+                       this.vbox3.Add (this.selectbutton);
+                       global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox3 
[this.selectbutton]));
+                       w13.Position = 0;
+                       w13.Expand = false;
+                       w13.Fill = false;
+                       // Container child vbox3.Gtk.Box+BoxChild
+                       this.delbutton = new global::Gtk.Button ();
+                       this.delbutton.Sensitive = false;
+                       this.delbutton.CanFocus = true;
+                       this.delbutton.Name = "delbutton";
+                       this.delbutton.UseUnderline = true;
+                       // Container child delbutton.Gtk.Container+ContainerChild
+                       global::Gtk.Alignment w14 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
+                       // Container child GtkAlignment.Gtk.Container+ContainerChild
+                       global::Gtk.HBox w15 = new global::Gtk.HBox ();
+                       w15.Spacing = 2;
+                       // Container child GtkHBox.Gtk.Container+ContainerChild
+                       global::Gtk.Image w16 = new global::Gtk.Image ();
+                       w16.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-delete", 
global::Gtk.IconSize.Menu);
+                       w15.Add (w16);
+                       // Container child GtkHBox.Gtk.Container+ContainerChild
+                       global::Gtk.Label w18 = new global::Gtk.Label ();
+                       w18.LabelProp = global::Mono.Unix.Catalog.GetString ("_Delete");
+                       w18.UseUnderline = true;
+                       w15.Add (w18);
+                       w14.Add (w15);
+                       this.delbutton.Add (w14);
+                       this.vbox3.Add (this.delbutton);
+                       global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.vbox3 
[this.delbutton]));
+                       w22.Position = 1;
+                       w22.Expand = false;
+                       w22.Fill = false;
+                       // Container child vbox3.Gtk.Box+BoxChild
+                       this.backupbutton = new global::Gtk.Button ();
+                       this.backupbutton.Sensitive = false;
+                       this.backupbutton.CanFocus = true;
+                       this.backupbutton.Name = "backupbutton";
+                       this.backupbutton.UseUnderline = true;
+                       // Container child backupbutton.Gtk.Container+ContainerChild
+                       global::Gtk.Alignment w23 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
+                       // Container child GtkAlignment.Gtk.Container+ContainerChild
+                       global::Gtk.HBox w24 = new global::Gtk.HBox ();
+                       w24.Spacing = 2;
+                       // Container child GtkHBox.Gtk.Container+ContainerChild
+                       global::Gtk.Image w25 = new global::Gtk.Image ();
+                       w25.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-save-as", 
global::Gtk.IconSize.Menu);
+                       w24.Add (w25);
+                       // Container child GtkHBox.Gtk.Container+ContainerChild
+                       global::Gtk.Label w27 = new global::Gtk.Label ();
+                       w27.LabelProp = global::Mono.Unix.Catalog.GetString ("_Backup");
+                       w27.UseUnderline = true;
+                       w24.Add (w27);
+                       w23.Add (w24);
+                       this.backupbutton.Add (w23);
+                       this.vbox3.Add (this.backupbutton);
+                       global::Gtk.Box.BoxChild w31 = ((global::Gtk.Box.BoxChild)(this.vbox3 
[this.backupbutton]));
+                       w31.Position = 2;
+                       w31.Expand = false;
+                       w31.Fill = false;
+                       // Container child vbox3.Gtk.Box+BoxChild
+                       this.addbutton = new global::Gtk.Button ();
+                       this.addbutton.CanFocus = true;
+                       this.addbutton.Name = "addbutton";
+                       this.addbutton.UseUnderline = true;
+                       // Container child addbutton.Gtk.Container+ContainerChild
+                       global::Gtk.Alignment w32 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
+                       // Container child GtkAlignment.Gtk.Container+ContainerChild
+                       global::Gtk.HBox w33 = new global::Gtk.HBox ();
+                       w33.Spacing = 2;
+                       // Container child GtkHBox.Gtk.Container+ContainerChild
+                       global::Gtk.Image w34 = new global::Gtk.Image ();
+                       w34.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-add", 
global::Gtk.IconSize.Menu);
+                       w33.Add (w34);
+                       // Container child GtkHBox.Gtk.Container+ContainerChild
+                       global::Gtk.Label w36 = new global::Gtk.Label ();
+                       w36.LabelProp = global::Mono.Unix.Catalog.GetString ("_Add");
+                       w36.UseUnderline = true;
+                       w33.Add (w36);
+                       w32.Add (w33);
+                       this.addbutton.Add (w32);
+                       this.vbox3.Add (this.addbutton);
+                       global::Gtk.Box.BoxChild w40 = ((global::Gtk.Box.BoxChild)(this.vbox3 
[this.addbutton]));
+                       w40.Position = 3;
+                       w40.Expand = false;
+                       w40.Fill = false;
+                       this.hbox1.Add (this.vbox3);
+                       global::Gtk.Box.BoxChild w41 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox3]));
+                       w41.Position = 1;
+                       w41.Expand = false;
+                       w41.Fill = false;
+                       this.vbox2.Add (this.hbox1);
+                       global::Gtk.Box.BoxChild w42 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
+                       w42.Position = 1;
+                       w1.Add (this.vbox2);
+                       global::Gtk.Box.BoxChild w43 = ((global::Gtk.Box.BoxChild)(w1 [this.vbox2]));
+                       w43.Position = 0;
+                       // Internal child LongoMatch.Gui.Dialog.DatabasesManager.ActionArea
+                       global::Gtk.HButtonBox w44 = this.ActionArea;
+                       w44.Name = "dialog1_ActionArea";
+                       w44.Spacing = 10;
+                       w44.BorderWidth = ((uint)(5));
+                       w44.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
+                       // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+                       this.buttonOk = new global::Gtk.Button ();
+                       this.buttonOk.CanDefault = true;
+                       this.buttonOk.CanFocus = true;
+                       this.buttonOk.Name = "buttonOk";
+                       this.buttonOk.UseStock = true;
+                       this.buttonOk.UseUnderline = true;
+                       this.buttonOk.Label = "gtk-ok";
+                       this.AddActionWidget (this.buttonOk, -5);
+                       global::Gtk.ButtonBox.ButtonBoxChild w45 = 
((global::Gtk.ButtonBox.ButtonBoxChild)(w44 [this.buttonOk]));
+                       w45.Expand = false;
+                       w45.Fill = false;
+                       if ((this.Child != null)) {
+                               this.Child.ShowAll ();
+                       }
+                       this.DefaultWidth = 400;
+                       this.DefaultHeight = 300;
+                       this.Show ();
+                       this.treeview.CursorChanged += new global::System.EventHandler 
(this.OnTreeviewCursorChanged);
+                       this.selectbutton.Clicked += new global::System.EventHandler 
(this.OnSelectbuttonClicked);
+                       this.delbutton.Clicked += new global::System.EventHandler (this.OnDelbuttonClicked);
+                       this.backupbutton.Clicked += new global::System.EventHandler 
(this.OnBackupbuttonClicked);
+                       this.addbutton.Clicked += new global::System.EventHandler (this.OnAddbuttonClicked);
+               }
+       }
+}
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.EntryDialog.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.EntryDialog.cs
index 2a1f2bf..468d2ab 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.EntryDialog.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.EntryDialog.cs
@@ -151,7 +151,7 @@ namespace LongoMatch.Gui.Dialog
                                this.Child.ShowAll ();
                        }
                        this.DefaultWidth = 339;
-                       this.DefaultHeight = 178;
+                       this.DefaultHeight = 195;
                        this.Show ();
                        this.checkbutton.Toggled += new global::System.EventHandler 
(this.OnCheckbuttonToggled);
                }
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
index e474c5b..f8a5156 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
@@ -37,6 +37,7 @@ namespace LongoMatch.Gui
                private global::Gtk.Action ImportFromFileAction;
                private global::Gtk.ToggleAction TagSubcategoriesAction;
                private global::Gtk.Action VideoConverterToolAction;
+               private global::Gtk.Action DatabasesManagerAction;
                private global::Gtk.VBox vbox1;
                private global::Gtk.VBox menubox;
                private global::Gtk.MenuBar menubar1;
@@ -172,6 +173,9 @@ namespace LongoMatch.Gui
                        this.VideoConverterToolAction = new global::Gtk.Action ("VideoConverterToolAction", 
global::Mono.Unix.Catalog.GetString ("Video Converter Tool"), null, null);
                        this.VideoConverterToolAction.ShortLabel = global::Mono.Unix.Catalog.GetString 
("Video Converter Tool");
                        w1.Add (this.VideoConverterToolAction, null);
+                       this.DatabasesManagerAction = new global::Gtk.Action ("DatabasesManagerAction", 
global::Mono.Unix.Catalog.GetString ("Databases Manager"), null, null);
+                       this.DatabasesManagerAction.ShortLabel = global::Mono.Unix.Catalog.GetString 
("Databases Manager");
+                       w1.Add (this.DatabasesManagerAction, null);
                        this.UIManager.InsertActionGroup (w1, 0);
                        this.AddAccelGroup (this.UIManager.AccelGroup);
                        this.Name = "LongoMatch.Gui.MainWindow";
@@ -188,7 +192,7 @@ namespace LongoMatch.Gui
                        this.menubox.Name = "menubox";
                        this.menubox.Spacing = 6;
                        // Container child menubox.Gtk.Box+BoxChild
-                       this.UIManager.AddUiFromString ("<ui><menubar name='menubar1'><menu name='FileAction' 
action='FileAction'><menuitem name='NewPojectAction' action='NewPojectAction'/><menuitem name='openAction' 
action='openAction'/><menuitem name='SaveProjectAction' action='SaveProjectAction'/><menuitem 
name='CloseProjectAction' action='CloseProjectAction'/><separator/><menu name='ImportProjectAction' 
action='ImportProjectAction'/><separator/><menuitem name='QuitAction' action='QuitAction'/></menu><menu 
name='ToolsAction' action='ToolsAction'><menuitem name='ProjectsManagerAction' 
action='ProjectsManagerAction'/><menuitem name='CategoriesTemplatesManagerAction' 
action='CategoriesTemplatesManagerAction'/><menuitem name='TeamsTemplatesManagerAction' 
action='TeamsTemplatesManagerAction'/><menu name='ExportProjectAction1' 
action='ExportProjectAction1'><menuitem name='ExportToProjectFileAction' 
action='ExportToProjectFileAction'/></menu><separator/><menuitem name='VideoConverterToolAction' acti
 on='VideoConverterToolAction'/></menu><menu name='ViewAction' action='ViewAction'><menuitem 
name='FullScreenAction' action='FullScreenAction'/><menuitem name='HideAllWidgetsAction' 
action='HideAllWidgetsAction'/><separator/><menuitem name='PlaylistAction' 
action='PlaylistAction'/><separator/><menuitem name='TagSubcategoriesAction' 
action='TagSubcategoriesAction'/><menuitem name='TaggingViewAction' action='TaggingViewAction'/><menuitem 
name='ManualTaggingViewAction' action='ManualTaggingViewAction'/><menuitem name='TimelineViewAction' 
action='TimelineViewAction'/><menuitem name='GameUnitsViewAction' action='GameUnitsViewAction'/></menu><menu 
name='HelpAction' action='HelpAction'><menuitem name='AboutAction' action='AboutAction'/><menuitem 
name='HelpAction1' action='HelpAction1'/><menuitem name='dialogInfoAction' 
action='dialogInfoAction'/></menu></menubar></ui>");
+                       this.UIManager.AddUiFromString ("<ui><menubar name='menubar1'><menu name='FileAction' 
action='FileAction'><menuitem name='NewPojectAction' action='NewPojectAction'/><menuitem name='openAction' 
action='openAction'/><menuitem name='SaveProjectAction' action='SaveProjectAction'/><menuitem 
name='CloseProjectAction' action='CloseProjectAction'/><separator/><menu name='ImportProjectAction' 
action='ImportProjectAction'/><separator/><menuitem name='QuitAction' action='QuitAction'/></menu><menu 
name='ToolsAction' action='ToolsAction'><menuitem name='ProjectsManagerAction' 
action='ProjectsManagerAction'/><menuitem name='CategoriesTemplatesManagerAction' 
action='CategoriesTemplatesManagerAction'/><menuitem name='TeamsTemplatesManagerAction' 
action='TeamsTemplatesManagerAction'/><menuitem name='DatabasesManagerAction' 
action='DatabasesManagerAction'/><separator/><menu name='ExportProjectAction1' 
action='ExportProjectAction1'><menuitem name='ExportToProjectFileAction' action='ExportTo
 ProjectFileAction'/></menu><separator/><menuitem name='VideoConverterToolAction' 
action='VideoConverterToolAction'/></menu><menu name='ViewAction' action='ViewAction'><menuitem 
name='FullScreenAction' action='FullScreenAction'/><menuitem name='HideAllWidgetsAction' 
action='HideAllWidgetsAction'/><separator/><menuitem name='PlaylistAction' 
action='PlaylistAction'/><separator/><menuitem name='TagSubcategoriesAction' 
action='TagSubcategoriesAction'/><menuitem name='TaggingViewAction' action='TaggingViewAction'/><menuitem 
name='ManualTaggingViewAction' action='ManualTaggingViewAction'/><menuitem name='TimelineViewAction' 
action='TimelineViewAction'/><menuitem name='GameUnitsViewAction' action='GameUnitsViewAction'/></menu><menu 
name='HelpAction' action='HelpAction'><menuitem name='AboutAction' action='AboutAction'/><menuitem 
name='HelpAction1' action='HelpAction1'/><menuitem name='dialogInfoAction' 
action='dialogInfoAction'/></menu></menubar></ui>");
                        this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget ("/menubar1")));
                        this.menubar1.Name = "menubar1";
                        this.menubox.Add (this.menubar1);
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index 051b8f2..ceef73c 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -1865,6 +1865,11 @@
         <property name="ShortLabel" translatable="yes">Video Converter Tool</property>
         <signal name="Activated" handler="OnVideoConverterToolActionActivated" />
       </action>
+      <action id="DatabasesManagerAction">
+        <property name="Type">Action</property>
+        <property name="Label" translatable="yes">Databases Manager</property>
+        <property name="ShortLabel" translatable="yes">Databases Manager</property>
+      </action>
     </action-group>
     <property name="MemberName" />
     <property name="Title" translatable="yes">LongoMatch</property>
@@ -1897,6 +1902,8 @@
                     <node type="Menuitem" action="ProjectsManagerAction" />
                     <node type="Menuitem" action="CategoriesTemplatesManagerAction" />
                     <node type="Menuitem" action="TeamsTemplatesManagerAction" />
+                    <node type="Menuitem" action="DatabasesManagerAction" />
+                    <node type="Separator" />
                     <node type="Menu" action="ExportProjectAction1">
                       <node type="Menuitem" action="ExportToProjectFileAction" />
                     </node>
@@ -7384,4 +7391,179 @@ Defining &lt;b&gt; Game Units &lt;/b&gt; will help you during the analysis to in
       </widget>
     </child>
   </widget>
+  <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.DatabasesManager" design-size="400 300">
+    <property name="MemberName" />
+    <property name="Title" translatable="yes">Databases manager</property>
+    <property name="Icon">resource:logo.svg</property>
+    <property name="WindowPosition">CenterOnParent</property>
+    <property name="Modal">True</property>
+    <property name="Gravity">Center</property>
+    <property name="SkipPagerHint">True</property>
+    <property name="SkipTaskbarHint">True</property>
+    <property name="Buttons">1</property>
+    <property name="HelpButton">False</property>
+    <child internal-child="VBox">
+      <widget class="Gtk.VBox" id="dialog1_VBox">
+        <property name="MemberName" />
+        <property name="BorderWidth">2</property>
+        <child>
+          <widget class="Gtk.VBox" id="vbox2">
+            <property name="MemberName" />
+            <property name="Spacing">6</property>
+            <child>
+              <widget class="Gtk.Label" id="dblabel">
+                <property name="MemberName" />
+              </widget>
+              <packing>
+                <property name="Position">0</property>
+                <property name="AutoSize">True</property>
+                <property name="Expand">False</property>
+                <property name="Fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="Gtk.HBox" id="hbox1">
+                <property name="MemberName" />
+                <property name="Spacing">6</property>
+                <child>
+                  <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+                    <property name="MemberName" />
+                    <property name="ShadowType">In</property>
+                    <child>
+                      <widget class="Gtk.TreeView" id="treeview">
+                        <property name="MemberName" />
+                        <property name="CanFocus">True</property>
+                        <property name="ShowScrollbars">True</property>
+                        <signal name="CursorChanged" handler="OnTreeviewCursorChanged" />
+                      </widget>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="Position">0</property>
+                    <property name="AutoSize">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="Gtk.VBox" id="vbox3">
+                    <property name="MemberName" />
+                    <property name="Spacing">6</property>
+                    <child>
+                      <widget class="Gtk.Button" id="selectbutton">
+                        <property name="MemberName" />
+                        <property name="Sensitive">False</property>
+                        <property name="CanFocus">True</property>
+                        <property name="Type">TextAndIcon</property>
+                        <property name="Icon">stock:gtk-apply Menu</property>
+                        <property name="Label" translatable="yes">_Select DB</property>
+                        <property name="UseUnderline">True</property>
+                        <signal name="Clicked" handler="OnSelectbuttonClicked" />
+                      </widget>
+                      <packing>
+                        <property name="Position">0</property>
+                        <property name="AutoSize">True</property>
+                        <property name="Expand">False</property>
+                        <property name="Fill">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="Gtk.Button" id="delbutton">
+                        <property name="MemberName" />
+                        <property name="Sensitive">False</property>
+                        <property name="CanFocus">True</property>
+                        <property name="Type">TextAndIcon</property>
+                        <property name="Icon">stock:gtk-delete Menu</property>
+                        <property name="Label" translatable="yes">_Delete</property>
+                        <property name="UseUnderline">True</property>
+                        <signal name="Clicked" handler="OnDelbuttonClicked" />
+                      </widget>
+                      <packing>
+                        <property name="Position">1</property>
+                        <property name="AutoSize">True</property>
+                        <property name="Expand">False</property>
+                        <property name="Fill">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="Gtk.Button" id="backupbutton">
+                        <property name="MemberName" />
+                        <property name="Sensitive">False</property>
+                        <property name="CanFocus">True</property>
+                        <property name="Type">TextAndIcon</property>
+                        <property name="Icon">stock:gtk-save-as Menu</property>
+                        <property name="Label" translatable="yes">_Backup</property>
+                        <property name="UseUnderline">True</property>
+                        <signal name="Clicked" handler="OnBackupbuttonClicked" />
+                      </widget>
+                      <packing>
+                        <property name="Position">2</property>
+                        <property name="AutoSize">True</property>
+                        <property name="Expand">False</property>
+                        <property name="Fill">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="Gtk.Button" id="addbutton">
+                        <property name="MemberName" />
+                        <property name="CanFocus">True</property>
+                        <property name="Type">TextAndIcon</property>
+                        <property name="Icon">stock:gtk-add Menu</property>
+                        <property name="Label" translatable="yes">_Add</property>
+                        <property name="UseUnderline">True</property>
+                        <signal name="Clicked" handler="OnAddbuttonClicked" />
+                      </widget>
+                      <packing>
+                        <property name="Position">3</property>
+                        <property name="AutoSize">True</property>
+                        <property name="Expand">False</property>
+                        <property name="Fill">False</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="Position">1</property>
+                    <property name="AutoSize">True</property>
+                    <property name="Expand">False</property>
+                    <property name="Fill">False</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="Position">1</property>
+                <property name="AutoSize">False</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="Position">0</property>
+            <property name="AutoSize">False</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+    <child internal-child="ActionArea">
+      <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+        <property name="MemberName" />
+        <property name="Spacing">10</property>
+        <property name="BorderWidth">5</property>
+        <property name="Size">1</property>
+        <property name="LayoutStyle">End</property>
+        <child>
+          <widget class="Gtk.Button" id="buttonOk">
+            <property name="MemberName" />
+            <property name="CanDefault">True</property>
+            <property name="CanFocus">True</property>
+            <property name="UseStock">True</property>
+            <property name="Type">StockItem</property>
+            <property name="StockId">gtk-ok</property>
+            <property name="ResponseId">-5</property>
+            <property name="label">gtk-ok</property>
+          </widget>
+          <packing>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
 </stetic-interface>
\ No newline at end of file
diff --git a/LongoMatch.GUI/gtk-gui/objects.xml b/LongoMatch.GUI/gtk-gui/objects.xml
index 7081c33..709b482 100644
--- a/LongoMatch.GUI/gtk-gui/objects.xml
+++ b/LongoMatch.GUI/gtk-gui/objects.xml
@@ -299,23 +299,6 @@
       </itemgroup>
     </signals>
   </object>
-  <object type="LongoMatch.Gui.Component.ProjectDetailsWidget" palette-category="LongoMatch" 
allow-children="false" base-type="Gtk.Bin">
-    <itemgroups>
-      <itemgroup label="ProjectDetailsWidget Properties">
-        <property name="Edited" />
-        <property name="Season" />
-        <property name="Competition" />
-        <property name="LocalGoals" />
-        <property name="VisitorGoals" />
-        <property name="Date" />
-      </itemgroup>
-    </itemgroups>
-    <signals>
-      <itemgroup label="ProjectDetailsWidget Signals">
-        <signal name="EditedEvent" />
-      </itemgroup>
-    </signals>
-  </object>
   <object type="LongoMatch.Gui.Component.PlaysSelectionWidget" palette-category="General" 
allow-children="false" base-type="Gtk.Bin">
     <itemgroups />
     <signals>
@@ -345,4 +328,21 @@
       </itemgroup>
     </signals>
   </object>
+  <object type="LongoMatch.Gui.Component.ProjectDetailsWidget" palette-category="LongoMatch" 
allow-children="false" base-type="Gtk.Bin">
+    <itemgroups>
+      <itemgroup label="ProjectDetailsWidget Properties">
+        <property name="Edited" />
+        <property name="Season" />
+        <property name="Competition" />
+        <property name="LocalGoals" />
+        <property name="VisitorGoals" />
+        <property name="Date" />
+      </itemgroup>
+    </itemgroups>
+    <signals>
+      <itemgroup label="ProjectDetailsWidget Signals">
+        <signal name="EditedEvent" />
+      </itemgroup>
+    </signals>
+  </object>
 </objects>
\ No newline at end of file
diff --git a/LongoMatch.Multimedia/Utils/GStreamer.cs b/LongoMatch.Multimedia/Utils/GStreamer.cs
index bcb00b2..8211223 100644
--- a/LongoMatch.Multimedia/Utils/GStreamer.cs
+++ b/LongoMatch.Multimedia/Utils/GStreamer.cs
@@ -75,7 +75,7 @@ namespace LongoMatch.Multimedia.Utils
                }
                
                private static string GetGstDirectory () {
-                       return Path.Combine (Config.HomeDir(), GST_DIRECTORY);
+                       return Path.Combine (Config.HomeDir, GST_DIRECTORY);
                }
                
                private static string GetRegistryPath() {
diff --git a/LongoMatch.Plugins/CSVExporter.cs b/LongoMatch.Plugins/CSVExporter.cs
index ce76d65..573f56c 100644
--- a/LongoMatch.Plugins/CSVExporter.cs
+++ b/LongoMatch.Plugins/CSVExporter.cs
@@ -44,7 +44,7 @@ namespace LongoMatch.Plugins
                
                public void ExportProject (Project project, IGUIToolkit guiToolkit) {
                        string filename = guiToolkit.SaveFile(Catalog.GetString("Output file"), null,
-                                                             Config.HomeDir(), "CSV", ".csv");
+                                                             Config.HomeDir, "CSV", ".csv");
                        
                        if (filename == null)
                                return;
diff --git a/LongoMatch.Services/LongoMatch.Services.mdp b/LongoMatch.Services/LongoMatch.Services.mdp
index 6b8dafa..0493736 100644
--- a/LongoMatch.Services/LongoMatch.Services.mdp
+++ b/LongoMatch.Services/LongoMatch.Services.mdp
@@ -29,6 +29,7 @@
     <File subtype="Directory" buildaction="Compile" name="." />
     <File subtype="Directory" buildaction="Compile" name=".." />
     <File subtype="Directory" buildaction="Compile" name="Services" />
+    <File subtype="Code" buildaction="Compile" name="Services/DataBaseManager.cs" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="System, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089" />
@@ -37,5 +38,6 @@
     <ProjectReference type="Gac" localcopy="True" refto="Db4objects.Db4o, Version=8.0.184.15484, 
Culture=neutral, PublicKeyToken=6199cd4f203aa8eb" />
     <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, 
PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, 
PublicKeyToken=35e10195dab3c99f" />
+    <ProjectReference specificVersion="False" type="Gac" localcopy="False" refto="System.Core, 
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   </References>
 </Project>
\ No newline at end of file
diff --git a/LongoMatch.Services/Makefile.am b/LongoMatch.Services/Makefile.am
index 143fb73..23fcfb5 100644
--- a/LongoMatch.Services/Makefile.am
+++ b/LongoMatch.Services/Makefile.am
@@ -6,6 +6,7 @@ LINK = $(REF_DEP_LONGOMATCH_SERVICES)
 SOURCES = \
        Services/Core.cs \
        Services/DataBase.cs \
+       Services/DataBaseManager.cs \
        Services/EventsManager.cs \
        Services/GameUnitsManager.cs \
        Services/HotKeysManager.cs \
diff --git a/LongoMatch.Services/Services/Core.cs b/LongoMatch.Services/Services/Core.cs
index 38a9219..a895b6f 100644
--- a/LongoMatch.Services/Services/Core.cs
+++ b/LongoMatch.Services/Services/Core.cs
@@ -25,14 +25,15 @@ using LongoMatch.Common;
 using LongoMatch.Interfaces.GUI;
 using LongoMatch.Interfaces.Multimedia;
 using LongoMatch.Store;
+using LongoMatch.Interfaces;
 
 
 namespace LongoMatch.Services
 {
        public class Core
        {
-               static DataBase db;
                static TemplatesService ts;
+               static DataBaseManager dbManager;
                static EventsManager eManager;
                static HotKeysManager hkManager;
                static GameUnitsManager guManager;
@@ -53,6 +54,9 @@ namespace LongoMatch.Services
 
                        /* Check default folders */
                        CheckDirs();
+                       
+                       /* Load user config */
+                       Config.Load();
                }
 
                public static void Start(IGUIToolkit guiToolkit, IMultimediaToolkit multimediaToolkit) {
@@ -66,11 +70,12 @@ namespace LongoMatch.Services
                        ProjectsManager projectsManager;
                                
                        /* Start TemplatesService */
-                       ts = new TemplatesService(Config.TemplatesDir());
+                       ts = new TemplatesService(Config.TemplatesDir);
                        Core.mainWindow.TemplatesService = ts;
 
                        /* Start DB services */
-                       db = new DataBase(Path.Combine(Config.DBDir(),Constants.DB_FILE));
+                       dbManager = new DataBaseManager (Config.DBDir, guiToolkit);
+                       dbManager.SetActiveByName (Config.CurrentDatabase);
                        
                        /* Start the events manager */
                        eManager = new EventsManager(guiToolkit);
@@ -103,25 +108,25 @@ namespace LongoMatch.Services
                }
 
                public static void CheckDirs() {
-                       if(!System.IO.Directory.Exists(Config.HomeDir()))
-                               System.IO.Directory.CreateDirectory(Config.HomeDir());
-                       if(!System.IO.Directory.Exists(Config.TemplatesDir()))
-                               System.IO.Directory.CreateDirectory(Config.TemplatesDir());
-                       if(!System.IO.Directory.Exists(Config.SnapshotsDir()))
-                               System.IO.Directory.CreateDirectory(Config.SnapshotsDir());
-                       if(!System.IO.Directory.Exists(Config.PlayListDir()))
-                               System.IO.Directory.CreateDirectory(Config.PlayListDir());
-                       if(!System.IO.Directory.Exists(Config.DBDir()))
-                               System.IO.Directory.CreateDirectory(Config.DBDir());
-                       if(!System.IO.Directory.Exists(Config.VideosDir()))
-                               System.IO.Directory.CreateDirectory(Config.VideosDir());
-                       if(!System.IO.Directory.Exists(Config.TempVideosDir()))
-                               System.IO.Directory.CreateDirectory(Config.TempVideosDir());
+                       if(!System.IO.Directory.Exists(Config.HomeDir))
+                               System.IO.Directory.CreateDirectory(Config.HomeDir);
+                       if(!System.IO.Directory.Exists(Config.TemplatesDir))
+                               System.IO.Directory.CreateDirectory(Config.TemplatesDir);
+                       if(!System.IO.Directory.Exists(Config.SnapshotsDir))
+                               System.IO.Directory.CreateDirectory(Config.SnapshotsDir);
+                       if(!System.IO.Directory.Exists(Config.PlayListDir))
+                               System.IO.Directory.CreateDirectory(Config.PlayListDir);
+                       if(!System.IO.Directory.Exists(Config.DBDir))
+                               System.IO.Directory.CreateDirectory(Config.DBDir);
+                       if(!System.IO.Directory.Exists(Config.VideosDir))
+                               System.IO.Directory.CreateDirectory(Config.VideosDir);
+                       if(!System.IO.Directory.Exists(Config.TempVideosDir))
+                               System.IO.Directory.CreateDirectory(Config.TempVideosDir);
                }
 
-               public static DataBase DB {
+               public static IDatabase DB {
                        get {
-                               return db;
+                               return dbManager.ActiveDB;
                        }
                }
                
diff --git a/LongoMatch.Services/Services/DataBase.cs b/LongoMatch.Services/Services/DataBase.cs
index 5c1f8ed..6cb3fd4 100644
--- a/LongoMatch.Services/Services/DataBase.cs
+++ b/LongoMatch.Services/Services/DataBase.cs
@@ -21,6 +21,7 @@
 using System;
 using System.Collections.Generic;
 using System.IO;
+using System.Linq;
 using Db4objects.Db4o;
 using Db4objects.Db4o.Query;
 
@@ -40,21 +41,15 @@ namespace LongoMatch.DB
        /// </summary>
        public sealed class DataBase: IDatabase
        {
-               // File path of the database
-               private string file;
-
-               private Version dbVersion;
-               
-               private BackupDate lastBackup;
-
-               private const int MAYOR=2;
-
-               private const int MINOR=0;
+               string DBFile;
+               string DBName;
+               Version dbVersion;
+               BackupDate lastBackup;
+               int count;
+               const int MAYOR=2;
+               const int MINOR=0;
+               TimeSpan maxDaysWithoutBackup = new TimeSpan(5, 0, 0, 0);
                
-               private TimeSpan maxDaysWithoutBackup = new TimeSpan(5, 0, 0, 0);
-               
-               private const string backupFilename = Constants.DB_FILE + ".backup";
-
                
                /// <summary>
                /// Creates a proxy for the database
@@ -64,14 +59,10 @@ namespace LongoMatch.DB
                /// </param>
                public DataBase(string file)
                {
-                       this.file = file;
-                       Init();
-                       try {
-                               BackupDB();
-                       } catch (Exception e) {
-                               Log.Error("Error creating databse backup");
-                               Log.Exception(e);
-                       }
+                       DBFile = file;
+                       DBName = Path.GetFileNameWithoutExtension(DBFile);
+                       DBName = Path.GetFileNameWithoutExtension(DBName);
+                       Load ();
                }
                
                /// <value>
@@ -83,9 +74,40 @@ namespace LongoMatch.DB
                        }
                }
                
+               public string Name {
+                       get {
+                               return DBName;
+                       }
+               }
+               
+               public DateTime LastBackup {
+                       get {
+                               return lastBackup.Date;
+                       }
+               }
+               
+               public int Count {
+                       get {
+                               return count;
+                       }
+               }
+               
+               public bool Backup () {
+                       return BackupDB (true);
+               }
+               
+               public bool Delete () {
+                       try {
+                               File.Delete (DBFile);
+                               return true;
+                       } catch (Exception ex) {
+                               return false;
+                       }
+               }
+               
                public void ListObjects() {
                        Dictionary<Type, int> dict = new Dictionary<Type, int>();
-                       IObjectContainer db = Db4oFactory.OpenFile(file);
+                       IObjectContainer db = Db4oFactory.OpenFile(DBFile);
                        
                        IQuery query = db.Query();
                        query.Constrain(typeof(object));
@@ -110,16 +132,29 @@ namespace LongoMatch.DB
                /// <summary>
                /// Initialize the Database
                /// </summary>
-               public void Init() {
+               public bool Load() {
+                       bool ret = false;
+                       
+                       Log.Debug ("Loading database file: " + DBFile);
                        /* Create a new DB if it doesn't exists yet */
-                       if(!System.IO.File.Exists(file))
+                       if(!System.IO.File.Exists(DBFile)) {
+                               Log.Debug ("File doesn't exists, creating a new one");
                                CreateNewDB();
-                       
-                       Log.Information ("Using database file: " + file);
+                               ret = true;
+                       }
                        
                        GetDBVersion();
                        GetBackupDate();
                        CheckDB();
+                       try {
+                               BackupDB();
+                       } catch (Exception e) {
+                               Log.Error("Error creating database backup");
+                               Log.Exception(e);
+                       }
+                       count = GetAllProjects().Count;
+                       ListObjects();
+                       return ret;
                }
                
                /// <summary>
@@ -133,7 +168,7 @@ namespace LongoMatch.DB
                /// </returns>
                public List<ProjectDescription> GetAllProjects() {
                        List<ProjectDescription> list = new List<ProjectDescription>();
-                       IObjectContainer db = Db4oFactory.OpenFile(file);
+                       IObjectContainer db = Db4oFactory.OpenFile(DBFile);
                        
                        Log.Debug("Getting all projects");
                        try     {
@@ -170,7 +205,7 @@ namespace LongoMatch.DB
                /// </returns>
                public Project GetProject(Guid id) {
                        Project ret = null;
-                       IObjectContainer db = Db4oFactory.OpenFile(file);
+                       IObjectContainer db = Db4oFactory.OpenFile(DBFile);
                        
                        Log.Debug("Getting project with ID: " + id);
                        try     {
@@ -193,13 +228,14 @@ namespace LongoMatch.DB
                /// A <see cref="Project"/> to add
                /// </param>
                public void AddProject(Project project) {
-                       IObjectContainer db = Db4oFactory.OpenFile(file);
+                       IObjectContainer db = Db4oFactory.OpenFile(DBFile);
                        
                        project.Description.LastModified = DateTime.Now;
                        Log.Debug("Adding new project: " + project);
                        try {
                                db.Store(project);
                                db.Commit();
+                               count ++;
                        } catch (Exception e) {
                                Log.Error("Could not add project");
                                Log.Exception(e);
@@ -217,7 +253,7 @@ namespace LongoMatch.DB
                /// </param>
                public void RemoveProject(Guid id) {
                        SetDeleteCascadeOptions();
-                       IObjectContainer db = Db4oFactory.OpenFile(file);
+                       IObjectContainer db = Db4oFactory.OpenFile(DBFile);
 
                        Log.Debug("Removing project with ID: " + id);
                        try     {
@@ -226,6 +262,7 @@ namespace LongoMatch.DB
                                Project project = (Project)result.Next();
                                db.Delete(project);
                                db.Commit();
+                               count --;
                        } catch (Exception e) {
                                Log.Error("Could not delete project");
                                Log.Exception(e);
@@ -248,7 +285,7 @@ namespace LongoMatch.DB
                public void UpdateProject(Project project) {
                        // Configure db4o to cascade on delete for each one of the objects stored in a Project
                        SetDeleteCascadeOptions();
-                       IObjectContainer db = Db4oFactory.OpenFile(file);
+                       IObjectContainer db = Db4oFactory.OpenFile(DBFile);
                        
                        project.Description.LastModified = DateTime.Now;
                        Log.Debug("Updating project " + project);
@@ -283,7 +320,7 @@ namespace LongoMatch.DB
                /// </returns>
                public bool Exists(Project project) {
                        bool ret;
-                       IObjectContainer db = Db4oFactory.OpenFile(file);
+                       IObjectContainer db = Db4oFactory.OpenFile(DBFile);
                
                        try {
                                IQuery query = GetQueryProjectById(db, project.UUID);
@@ -300,13 +337,13 @@ namespace LongoMatch.DB
                
                private void CreateNewDB () {
                        // Create new DB and add version and last backup date
-                       IObjectContainer db = Db4oFactory.OpenFile(file);
+                       IObjectContainer db = Db4oFactory.OpenFile(DBFile);
                        try {
                                dbVersion= new Version(MAYOR,MINOR);
                                lastBackup = new BackupDate { Date = DateTime.UtcNow};
                                db.Store(dbVersion);
                                db.Store(lastBackup);
-                               Log.Information("Created new database:" + file);
+                               Log.Information("Created new database:" + DBFile);
                        }
                        finally {
                                db.Close();
@@ -330,21 +367,24 @@ namespace LongoMatch.DB
                }
                
                private void UpdateBackupDate (bool create) {
-                       if (create) {
-                       IObjectContainer db = Db4oFactory.OpenFile(file);
-                               try     {
-                                       db.Store(lastBackup);
-                               } finally {
-                                       db.Close();
+                       IObjectContainer db = Db4oFactory.OpenFile(DBFile);
+                       try     {
+                               IQuery query = db.Query();
+                               query.Constrain(typeof(BackupDate));
+                               IObjectSet result = query.Execute();
+                               while (result.HasNext()) {
+                                       BackupDate date = result.Next() as BackupDate;
+                                       db.Delete (date);
                                }
-                       } else {
-                               UpdateObject(lastBackup);
+                               db.Store(lastBackup);
+                       } finally {
+                               db.Close();
                        }
                }
                
                private T GetObject<T>() {
                        T ret = default(T);
-                       IObjectContainer db = Db4oFactory.OpenFile(file);
+                       IObjectContainer db = Db4oFactory.OpenFile(DBFile);
                        try     {
                                IQuery query = db.Query();
                                query.Constrain(typeof(T));
@@ -357,44 +397,30 @@ namespace LongoMatch.DB
                        return ret;
                }
                
-               private void UpdateObject<T>(this T element) {
-                       IObjectContainer db = Db4oFactory.OpenFile(file);
-                       try     {
-                               IQuery query = db.Query();
-                               query.Constrain(typeof(T));
-                               IObjectSet result = query.Execute();
-                               if(result.HasNext()) {
-                                       T obj = (T) result.Next();
-                                       obj = element;
-                                       db.Store(obj);
-                               }
-                       } finally {
-                               db.Close();
-                       }
-               }
-               
                private void CheckDB() {
                        /* FIXME: Check for migrations here */
                }
                
-               private void BackupDB () {
+               private bool BackupDB (bool force=false) {
                        string backupFilepath;
                        DateTime now = DateTime.UtcNow;
-                       if (lastBackup.Date + maxDaysWithoutBackup >= now)
-                               return;
+                       if (!force && lastBackup.Date + maxDaysWithoutBackup >= now)
+                               return true;
                        
-                       backupFilepath = Path.Combine(Config.DBDir(), backupFilename);
-                       if (File.Exists(backupFilepath))
-                               File.Delete(backupFilepath);
-
+                       backupFilepath = DBFile + ".backup";
                        try {
-                               File.Copy(file, backupFilepath);
-                               Log.Information ("Created backup for database at ", backupFilename);
+                               if (File.Exists(backupFilepath))
+                                       File.Delete(backupFilepath);
+
+                               File.Copy(DBFile, backupFilepath);
+                               Log.Debug ("Created backup for database at ", backupFilepath);
                                lastBackup = new BackupDate {Date = now};
                                UpdateBackupDate(false);
+                               return true;
                        } catch (Exception ex) {
                                Log.Error("Could not create backup");
                                Log.Exception(ex);
+                               return false;
                        }
                        
                }
diff --git a/LongoMatch.Services/Services/DataBaseManager.cs b/LongoMatch.Services/Services/DataBaseManager.cs
new file mode 100644
index 0000000..567016f
--- /dev/null
+++ b/LongoMatch.Services/Services/DataBaseManager.cs
@@ -0,0 +1,132 @@
+// 
+//  Copyright (C) 2013 Andoni Morales Alastruey
+// 
+//  This program 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 2 of the License, or
+//  (at your option) any later version.
+// 
+//  This program 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 this program; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+// 
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using Mono.Unix;
+
+using LongoMatch.Interfaces;
+using LongoMatch.Interfaces.GUI;
+
+namespace LongoMatch.DB
+{
+       public class DataBaseManager: IDataBaseManager
+       {
+               string DBDir;
+               IGUIToolkit guiToolkit;
+               IDatabase activeDB;
+               const int SUPPORTED_MAJOR_VERSION = 2;
+               
+               public DataBaseManager (string DBDir, IGUIToolkit guiToolkit)
+               {
+                       this.DBDir = DBDir;
+                       this.guiToolkit = guiToolkit;
+                       ConnectSignals ();
+                       FindDBS();
+               }
+               
+               public void SetActiveByName (string name) {
+                       foreach (DataBase db in Databases) {
+                               if (db.Name == name) {
+                                       Log.Information ("Selecting active database " + db.Name);
+                                       ActiveDB = db;
+                                       return;
+                               }
+                       }
+                       DataBase newdb = new DataBase(NameToFile (name));
+                       Log.Information ("Creating new database " + newdb.Name);
+                       Databases.Add (newdb);
+                       ActiveDB = newdb;
+               }
+               
+               public IDatabase Add (string name) {
+                       if (Databases.Where(db => db.Name == name).Count() != 0) {
+                               throw new Exception("A database with the same name already exists");
+                       }
+                       try {
+                               DataBase newdb = new DataBase(NameToFile (name));
+                               Log.Information ("Creating new database " + newdb.Name);
+                               Databases.Add (newdb);
+                               return newdb;
+                       } catch (Exception ex) {
+                               Log.Exception (ex);
+                               return null;
+                       }
+               }
+               
+               public bool Delete (IDatabase db) {
+                       /* Leave at least one database */
+                       if (Databases.Count < 2) {
+                               return false;
+                       }
+                       return db.Delete ();
+               }
+               
+               public IDatabase ActiveDB {
+                       get {
+                               return activeDB;
+                       } set {
+                               activeDB = value;
+                               Config.CurrentDatabase = value.Name;
+                               Config.Save();
+                       }
+               }
+               
+               public List<IDatabase> Databases {
+                       get;
+                       set;
+               }
+               
+               string NameToFile (string name) {
+                       return Path.Combine (DBDir, name + '.' + Extension);
+                                       
+               }
+               
+               string Extension {
+                       get {
+                               return SUPPORTED_MAJOR_VERSION -1 + ".db";
+                       }
+               }
+
+               void ConnectSignals ()
+               {
+                       guiToolkit.MainWindow.ManageDatabasesEvent += () => {guiToolkit.OpenDatabasesManager 
(this);};
+               }
+               
+               void FindDBS (){
+                       Databases = new List<IDatabase>();
+                       
+                       var paths = Directory.GetFiles(this.DBDir).Where
+                               (f => f.EndsWith(Extension)).ToList();
+                               
+                       foreach (string p in paths) {
+                               try {
+                                       DataBase db = new DataBase (p);
+                                       if (db.Version.Major == SUPPORTED_MAJOR_VERSION) {
+                                               Log.Information ("Found new database " + db.Name);
+                                               Databases.Add (db);
+                                       }
+                               } catch (Exception ex) {
+                                       Log.Exception (ex);
+                               }
+                       }
+               }
+       }
+}
+
diff --git a/LongoMatch.Services/Services/EventsManager.cs b/LongoMatch.Services/Services/EventsManager.cs
index d871924..0419f6a 100644
--- a/LongoMatch.Services/Services/EventsManager.cs
+++ b/LongoMatch.Services/Services/EventsManager.cs
@@ -253,7 +253,7 @@ namespace LongoMatch.Services
 
                protected virtual void OnSnapshotSeries(Play play) {
                        player.Pause();
-                       guiToolkit.ExportFrameSeries(openedProject, play, Config.SnapshotsDir());
+                       guiToolkit.ExportFrameSeries(openedProject, play, Config.SnapshotsDir);
                }
                
                protected virtual void OnPrev()
diff --git a/LongoMatch.Services/Services/PlaylistManager.cs b/LongoMatch.Services/Services/PlaylistManager.cs
index 4b82bde..74894f7 100644
--- a/LongoMatch.Services/Services/PlaylistManager.cs
+++ b/LongoMatch.Services/Services/PlaylistManager.cs
@@ -199,7 +199,7 @@ namespace LongoMatch.Services
                {
                        string filename;
                        
-                       filename = guiToolkit.OpenFile(Catalog.GetString("Open playlist"), null, 
Config.PlayListDir(),
+                       filename = guiToolkit.OpenFile(Catalog.GetString("Open playlist"), null, 
Config.PlayListDir,
                                Constants.PROJECT_NAME + Catalog.GetString("playlists"),
                                "*" + Constants.PLAYLIST_EXT);
                        if (filename != null)
@@ -210,7 +210,7 @@ namespace LongoMatch.Services
                {
                        string filename;
                        
-                       filename = guiToolkit.SaveFile(Catalog.GetString("New playlist"), null, 
Config.PlayListDir(),
+                       filename = guiToolkit.SaveFile(Catalog.GetString("New playlist"), null, 
Config.PlayListDir,
                                Constants.PROJECT_NAME + Catalog.GetString("playlists"),
                                "*" + Constants.PLAYLIST_EXT);
 
diff --git a/LongoMatch.Services/Services/ProjectsManager.cs b/LongoMatch.Services/Services/ProjectsManager.cs
index fb15841..615a15a 100644
--- a/LongoMatch.Services/Services/ProjectsManager.cs
+++ b/LongoMatch.Services/Services/ProjectsManager.cs
@@ -128,7 +128,7 @@ namespace LongoMatch.Services
                        Log.Debug("Importing project");
                        /* Show a file chooser dialog to select the file to import */
                        fileName = guiToolkit.OpenFile(name, null,
-                               Config.HomeDir(), filterName, filter);
+                               Config.HomeDir, filterName, filter);
                                
                        if(fileName == null)
                                return;
@@ -151,7 +151,7 @@ namespace LongoMatch.Services
                                guiToolkit.InfoMessage (Catalog.GetString("This project doesn't have any file 
associated.\n" +
                                                                          "Select one in the next window"));
                                videofile = guiToolkit.OpenFile(Catalog.GetString("Select a video file"), 
null,
-                                                                                Config.HomeDir(), null, 
null);
+                                                                                Config.HomeDir, null, null);
                                if (videofile == null) {
                                        guiToolkit.ErrorMessage (Catalog.GetString("Could not import project, 
you need a video file"));
                                        return;
@@ -389,7 +389,7 @@ namespace LongoMatch.Services
                        }
                        
                        string filename = guiToolkit.SaveFile(Catalog.GetString("Save project"), null,
-                               Config.HomeDir(), Constants.PROJECT_NAME, Constants.PROJECT_EXT);
+                               Config.HomeDir, Constants.PROJECT_NAME, Constants.PROJECT_EXT);
                        
                        if (filename == null)
                                return;
diff --git a/LongoMatch.Services/Services/VideoDrawingsManager.cs 
b/LongoMatch.Services/Services/VideoDrawingsManager.cs
index cb7a4da..d4c8164 100644
--- a/LongoMatch.Services/Services/VideoDrawingsManager.cs
+++ b/LongoMatch.Services/Services/VideoDrawingsManager.cs
@@ -113,7 +113,7 @@ namespace LongoMatch.Services
                private void ResetPlayerWindow() {
                        player.LogoMode = false;
                        player.DrawingMode = false;
-                       player.SetLogo(System.IO.Path.Combine(Config.ImagesDir(),"background.png"));
+                       player.SetLogo(System.IO.Path.Combine(Config.ImagesDir,"background.png"));
                }
 
                private void CheckStopTime(object self) {
diff --git a/LongoMatch/LongoMatchGtk.mdp b/LongoMatch/LongoMatchGtk.mdp
index b9f5b2c..469f25c 100644
--- a/LongoMatch/LongoMatchGtk.mdp
+++ b/LongoMatch/LongoMatchGtk.mdp
@@ -14,7 +14,7 @@
       <Build debugmode="False" target="Exe" />
       <Execution consolepause="False" runwithwarnings="True" runtime="MsNet" />
       <EnvironmentVariables>
-        <Variable name="LGM_DEBUG" value="" />
+        <Variable name="LGM_DEBUG" value="3" />
       </EnvironmentVariables>
       <CodeGeneration compiler="Mcs" warninglevel="4" optimize="False" unsafecodeallowed="False" 
generateoverflowchecks="False" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
     </Configuration>
diff --git a/LongoMatch/Main.cs b/LongoMatch/Main.cs
index 58e9d6e..573bc59 100644
--- a/LongoMatch/Main.cs
+++ b/LongoMatch/Main.cs
@@ -58,7 +58,7 @@ namespace LongoMatch
                        Version version = Assembly.GetExecutingAssembly().GetName().Version;
 
                        try {
-                               AddinsManager manager = new AddinsManager(Config.PluginsConfigDir(), 
Config.PluginsDir());
+                               AddinsManager manager = new AddinsManager(Config.PluginsConfigDir, 
Config.PluginsDir);
                                manager.LoadConfigModifierAddins();
                            GUIToolkit guiToolkit = new GUIToolkit(version);
                            IMultimediaToolkit multimediaToolkit = new MultimediaFactory();
@@ -82,7 +82,7 @@ namespace LongoMatch
                        logFile = logFile.Replace("/","-");
                        logFile = logFile.Replace(" ","-");
                        logFile = logFile.Replace(":","-");
-                       logFile = System.IO.Path.Combine(Config.HomeDir(),logFile);
+                       logFile = System.IO.Path.Combine(Config.HomeDir,logFile);
 
                        message = SysInfo.PrintInfo(Assembly.GetExecutingAssembly().GetName().Version);
                        if(ex.InnerException != null)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 506e949..c41df24 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -83,6 +83,7 @@ LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.StringTaggerWidget.cs
 LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.TaggerWidget.cs
 LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.TeamTaggerWidget.cs
 LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.BusyDialog.cs
+LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.DatabasesManager.cs
 LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
 LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs
 LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.EditPlayerDialog.cs
@@ -141,6 +142,7 @@ LongoMatch.GUI/Gui/Component/TimeReferenceWidget.cs
 LongoMatch.GUI/Gui/Component/TimeScale.cs
 LongoMatch.GUI/Gui/Dialog/About.cs
 LongoMatch.GUI/Gui/Dialog/BusyDialog.cs
+LongoMatch.GUI/Gui/Dialog/DatabasesManager.cs
 LongoMatch.GUI/Gui/Dialog/DrawingTool.cs
 LongoMatch.GUI/Gui/Dialog/EditCategoryDialog.cs
 LongoMatch.GUI/Gui/Dialog/EditPlayerDialog.cs
@@ -163,11 +165,11 @@ LongoMatch.GUI/Gui/Dialog/UpdateDialog.cs
 LongoMatch.GUI/Gui/Dialog/VideoEditionProperties.cs
 LongoMatch.GUI/Gui/Dialog/VideoConversionTool.cs
 LongoMatch.GUI/Gui/Dialog/Win32CalendarDialog.cs
+LongoMatch.GUI/Gui/Helpers/MessagesHelpers.cs
+LongoMatch.GUI/Gui/Helpers/Misc.cs
 LongoMatch.GUI/Gui/GUIToolkit.cs
-LongoMatch.GUI/Gui/Helpers.cs
 LongoMatch.GUI/Gui/MainWindow.cs
 LongoMatch.GUI/Gui/Popup/CalendarPopup.cs
-LongoMatch.GUI/Gui/Popup/MessagePopup.cs
 LongoMatch.GUI/Gui/TransparentDrawingArea.cs
 LongoMatch.GUI/Gui/TreeView/CategoriesFilterTreeView.cs
 LongoMatch.GUI/Gui/TreeView/CategoriesTreeView.cs



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]