/* main.vala
*
* Copyright (C) 2010 Matias De la Puente
*
* 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 3 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, see .
*
* Author:
* Matias De la Puente
*/
using I4uc;
void main (string[] args)
{
Gtk.init (ref args);
load_settings ();
var main_window_view = new MainWindowView ();
main_window_view.show_all ();
var main_window_presenter = new MainWindowPresenter (main_window_view);
var documents_presenter = new DocumentsPresenter (main_window_view.documents_view);
Gtk.main ();
I4uc.Settings.instance.save ();
}
void load_settings ()
{
var settings_folder = Path.build_filename (Environment.get_home_dir (), ".i4uc");
if (!FileUtils.test (settings_folder, FileTest.EXISTS))
DirUtils.create (settings_folder, 0755);
var settings_filename = Path.build_filename (settings_folder, "i4ucrc");
I4uc.Settings.instance.open (settings_filename);
}