diff --git a/src/gui/gtk-lumiera.cpp b/src/gui/gtk-lumiera.cpp index eb8fbe023..fd53d31f7 100644 --- a/src/gui/gtk-lumiera.cpp +++ b/src/gui/gtk-lumiera.cpp @@ -45,7 +45,7 @@ using namespace gui; using namespace gui::workspace; using namespace gui::model; using namespace gui::controller; - +using namespace std; GtkLumiera the_application; @@ -61,7 +61,7 @@ GtkLumiera::main(int argc, char *argv[]) Main kit(argc, argv); - Glib::set_application_name(AppTitle); + Glib::set_application_name(get_app_title()); Project project; Controller controller(project); @@ -84,30 +84,52 @@ GtkLumiera::get_home_data_path() return ustring::compose("%1/.%2", path, app_name); } +const Glib::ustring +GtkLumiera::get_app_title() +{ + return "Lumiera"; +} + +const Glib::ustring +GtkLumiera::get_app_version() +{ + return "0.1-dev"; +} + +const Glib::ustring GtkLumiera::get_app_copyright() +{ + return _("© 2008 The Lumiera Team"); +} + +const Glib::ustring GtkLumiera::get_app_website() +{ + return "www.lumiera.org"; +} + +const std::vector +GtkLumiera::get_app_authors() +{ + const gchar* app_authors[] = { + "Joel Holdsworth", + "Christian Thaeter", + "Hermann Vosseler", + ""}; + + const int count = sizeof(app_authors) / sizeof(gchar*); + std::vector list(count); + for(int i = 0; i < count; i++) + list[i] = app_authors[i]; + return list; +} + GtkLumiera& application() { return the_application; } -/* ===== Constants ===== */ - -const gchar* GtkLumiera::AppTitle = "Lumiera"; -const gchar* GtkLumiera::AppVersion = _("0.1-dev"); -const gchar* GtkLumiera::AppCopyright = - _("© 2008 The Lumiera Team"); -const gchar* GtkLumiera::AppWebsite = "www.lumiera.org"; -const gchar* GtkLumiera::AppAuthors[] = { - "Joel Holdsworth", - "Christian Thaeter", - "Hermann Vosseler", - ""}; -const int GtkLumiera::AppAuthorCount = 4; - } // namespace gui - - /** * Run the Lumiera GTK GUI as standalone application without backend. */ diff --git a/src/gui/gtk-lumiera.hpp b/src/gui/gtk-lumiera.hpp index a01bc5dc4..53d146b95 100644 --- a/src/gui/gtk-lumiera.hpp +++ b/src/gui/gtk-lumiera.hpp @@ -73,38 +73,30 @@ public: static Glib::ustring get_home_data_path(); - -public: - /* ----- Constants ----- */ /** - * The name of the application - */ - static const gchar* AppTitle; - - /** - * The version number of the application - */ - static const gchar* AppVersion; - - /** - * The copyright of the application - */ - static const gchar* AppCopyright; - - /** - * The website of the application - */ - static const gchar* AppWebsite; - - /** - * An alphabetical list of the application's authors - */ - static const gchar* AppAuthors[]; - - /** - * The number of authors in AppAuthors + * Returns the name of the application **/ - static const int AppAuthorCount; + static const Glib::ustring get_app_title(); + + /** + * Returns the version number of the application + **/ + static const Glib::ustring get_app_version(); + + /** + * Returns the copyright of the application + **/ + static const Glib::ustring get_app_copyright(); + + /** + * Returns the website of the application + **/ + static const Glib::ustring get_app_website(); + + /** + * Returns tn alphabetical list of the application's authors + **/ + static const std::vector get_app_authors(); }; /** diff --git a/src/gui/workspace/actions.cpp b/src/gui/workspace/actions.cpp index 2ac749528..9cbc94aea 100644 --- a/src/gui/workspace/actions.cpp +++ b/src/gui/workspace/actions.cpp @@ -208,12 +208,11 @@ Actions::on_menu_help_about() AboutDialog dialog; //dialog.set_program_name(AppTitle); - dialog.set_version(GtkLumiera::AppVersion); + dialog.set_version(GtkLumiera::get_app_version()); //dialog.set_version(AppState::get("version")); - dialog.set_copyright(GtkLumiera::AppCopyright); - dialog.set_website(GtkLumiera::AppWebsite); - dialog.set_authors(StringArrayHandle(GtkLumiera::AppAuthors, - GtkLumiera::AppAuthorCount, OWNERSHIP_NONE)); + dialog.set_copyright(GtkLumiera::get_app_copyright()); + dialog.set_website(GtkLumiera::get_app_website()); + dialog.set_authors(GtkLumiera::get_app_authors()); dialog.set_transient_for(workspaceWindow); diff --git a/src/gui/workspace/workspace-window.cpp b/src/gui/workspace/workspace-window.cpp index 24557053d..abcce5601 100644 --- a/src/gui/workspace/workspace-window.cpp +++ b/src/gui/workspace/workspace-window.cpp @@ -85,7 +85,7 @@ void WorkspaceWindow::create_ui() { //----- Configure the Window -----// - set_title(GtkLumiera::AppTitle); + set_title(GtkLumiera::get_app_title()); set_default_size(1024, 768); //----- Set up the UI Manager -----//