lumiera_/src/gui/gtk-lumiera.cpp

95 lines
2 KiB
C++
Raw Normal View History

2008-04-09 00:21:05 +02:00
/*
gtk-lumiera.cpp - The entry point for the GTK GUI application
Copyright (C) Lumiera.org
2008, Joel Holdsworth <joel@airwebreathe.org.uk>
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., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
2008-04-09 00:21:05 +02:00
#include <gtkmm.h>
#include <nobug.h>
2008-04-09 00:21:05 +02:00
#ifdef ENABLE_NLS
# include <libintl.h>
#endif
#include "gtk-lumiera.hpp"
2008-04-20 00:16:27 +02:00
#include "window-manager.hpp"
2008-04-19 20:15:59 +02:00
#include "workspace/workspace-window.hpp"
#include "model/project.hpp"
2008-04-10 16:36:21 +02:00
extern "C" {
#include "backend/interface.h"
}
NOBUG_CPP_DEFINE_FLAG(gui);
2008-04-19 20:15:59 +02:00
using namespace Gtk;
using namespace Glib;
using namespace gui;
using namespace gui::workspace;
using namespace gui::model;
2008-04-09 00:21:05 +02:00
GtkLumiera the_application;
int
main (int argc, char *argv[])
{
return the_application.main(argc, argv);
}
namespace gui {
int
GtkLumiera::main(int argc, char *argv[])
{
NOBUG_INIT;
Main kit(argc, argv);
Glib::set_application_name(AppTitle);
Project project;
WindowManager window_manager;
window_manager.set_theme("lumiera_ui.rc");
WorkspaceWindow main_window(&project);
2008-04-20 00:16:27 +02:00
kit.run(main_window);
}
2008-04-20 00:16:27 +02:00
Glib::ustring
GtkLumiera::get_home_data_path()
{
const ustring app_name("lumiera");
const ustring path(Glib::get_home_dir());
return ustring::compose("%1/.%2", path, app_name);
}
GtkLumiera&
application()
{
return the_application;
}
} // namespace gui