diff --git a/src/gui/dialogs/name-chooser.cpp b/src/gui/dialogs/name-chooser.cpp index 634f2bd07..4c8a297e1 100644 --- a/src/gui/dialogs/name-chooser.cpp +++ b/src/gui/dialogs/name-chooser.cpp @@ -30,8 +30,8 @@ using namespace Glib; namespace gui { namespace dialogs { -NameChooser::NameChooser(Window &parent, const Glib::ustring title, - const Glib::ustring default_name) : +NameChooser::NameChooser(Window &parent, cuString title, + cuString default_name) : Dialog::Dialog(title, parent, true), caption(_("Name:")) { @@ -60,7 +60,7 @@ NameChooser::NameChooser(Window &parent, const Glib::ustring title, show_all_children(); } -const Glib::ustring NameChooser::get_name() const +cuString NameChooser::get_name() const { return name.get_text(); } diff --git a/src/gui/dialogs/name-chooser.hpp b/src/gui/dialogs/name-chooser.hpp index 8b020c51f..84634591f 100644 --- a/src/gui/dialogs/name-chooser.hpp +++ b/src/gui/dialogs/name-chooser.hpp @@ -46,15 +46,15 @@ public: * @param default_name The name that will be shown by default in the * edit box of the dialog. */ - NameChooser(Gtk::Window &parent, const Glib::ustring title, - const Glib::ustring default_name); + NameChooser(Gtk::Window &parent, cuString title, + cuString default_name); /** * Gets the current name of the chosen in the dialog. * @return Returns the name currently typed into the edit box of the * dialog. */ - const Glib::ustring get_name() const; + cuString get_name() const; private: Gtk::HBox hBox; diff --git a/src/gui/gtk-base.hpp b/src/gui/gtk-base.hpp index 12c0d5638..37f342cc6 100644 --- a/src/gui/gtk-base.hpp +++ b/src/gui/gtk-base.hpp @@ -69,6 +69,10 @@ /** Lumiera GTK GUI implementation root. */ namespace gui { + + typedef Glib::ustring uString; + typedef const uString cuString; + /** Dialog box classes. */ namespace dialogs {} diff --git a/src/gui/gtk-lumiera.hpp b/src/gui/gtk-lumiera.hpp index 226e1acf3..9d403ccfa 100644 --- a/src/gui/gtk-lumiera.hpp +++ b/src/gui/gtk-lumiera.hpp @@ -61,20 +61,18 @@ class GtkLumiera WindowManager& windowManager(); - static Glib::ustring get_home_data_path(); - /** the name of the application */ - static const Glib::ustring get_app_title(); + static cuString getAppTitle(); - static const Glib::ustring get_app_version(); + static cuString getAppVersion(); - static const Glib::ustring get_app_copyright(); + static cuString getCopyright(); - static const Glib::ustring get_app_website(); + static cuString getLumieraWebsite(); /** alphabetical list of the application's authors */ - static const std::vector get_app_authors(); + static const std::vector getLumieraAuthors(); }; diff --git a/src/gui/model/project.cpp b/src/gui/model/project.cpp index 92dda0758..3b37020cd 100644 --- a/src/gui/model/project.cpp +++ b/src/gui/model/project.cpp @@ -50,7 +50,7 @@ Project::get_sequences() } void -Project::add_new_sequence(Glib::ustring name) +Project::add_new_sequence(uString name) { shared_ptr sequence(new Sequence()); sequence->set_name(name); diff --git a/src/gui/model/project.hpp b/src/gui/model/project.hpp index 42fb8d611..e6e6bbc9e 100644 --- a/src/gui/model/project.hpp +++ b/src/gui/model/project.hpp @@ -43,7 +43,7 @@ public: lumiera::observable_list< boost::shared_ptr >& get_sequences(); - void add_new_sequence(Glib::ustring name); + void add_new_sequence(uString name); private: diff --git a/src/gui/panels/timeline-panel.hpp b/src/gui/panels/timeline-panel.hpp index 198368fae..435599759 100644 --- a/src/gui/panels/timeline-panel.hpp +++ b/src/gui/panels/timeline-panel.hpp @@ -152,7 +152,7 @@ private: /** * The column to use as the label for the combo box widget items. */ - Gtk::TreeModelColumn< Glib::ustring > nameColumn; + Gtk::TreeModelColumn< uString > nameColumn; }; private: diff --git a/src/gui/widgets/menu-button.cpp b/src/gui/widgets/menu-button.cpp index a5e7629b6..d7756a17c 100644 --- a/src/gui/widgets/menu-button.cpp +++ b/src/gui/widgets/menu-button.cpp @@ -57,7 +57,7 @@ MenuButton::MenuButton(const StockID& stock_id) : setup_button(); } -MenuButton::MenuButton(const Glib::ustring& label, bool mnemonic) : +MenuButton::MenuButton(cuString& label, bool mnemonic) : ToggleButton(), caption(label, mnemonic), arrow(arrowType, shadowType) diff --git a/src/gui/widgets/menu-button.hpp b/src/gui/widgets/menu-button.hpp index 422a93adb..25d343a4a 100644 --- a/src/gui/widgets/menu-button.hpp +++ b/src/gui/widgets/menu-button.hpp @@ -26,7 +26,7 @@ #ifndef MENU_BUTTON_HPP #define MENU_BUTTON_HPP -#include +#include "gui/gtk-base.hpp" namespace gui { namespace widgets { @@ -43,7 +43,7 @@ public: * @remarks With an empty button, you can Gtk::Button::add() a widget * such as a Gtk::Pixmap or Gtk::Box. If you just wish to add a * Gtk::Label, you may want to use the - * Gtk::MenuButton(const Glib::ustring& label) ctor directly instead. + * Gtk::MenuButton(cuString& label) ctor directly instead. */ MenuButton(); @@ -61,7 +61,7 @@ public: * able to add a widget in this button since it already has a * Gtk::Label in it */ - MenuButton(const Glib::ustring& label, bool mnemonic=false); + MenuButton(cuString& label, bool mnemonic=false); /** * Gets the menu which will be displayed when the button is clicked diff --git a/src/gui/workspace/actions.cpp b/src/gui/workspace/actions.cpp index d448c41a4..90bc89967 100644 --- a/src/gui/workspace/actions.cpp +++ b/src/gui/workspace/actions.cpp @@ -136,7 +136,7 @@ Actions::populate_main_actions(Glib::RefPtr uiManager) uiManager->insert_action_group(actionGroup); //----- Create the UI layout -----// - Glib::ustring ui_info = + uString ui_info = "" " " " " @@ -216,7 +216,7 @@ Actions::populate_show_panel_actions(Glib::RefPtr uiManager) for(int i = 0; i < count; i++) { const gchar *stock_id = PanelManager::get_panel_stock_id(i); - const ustring name = ustring::compose("Panel%1", i); + cuString name = ustring::compose("Panel%1", i); actionGroup->add(Action::create(name, StockID(stock_id)), bind(mem_fun(*this, &Actions::on_menu_show_panel), i)); } @@ -225,7 +225,7 @@ Actions::populate_show_panel_actions(Glib::RefPtr uiManager) for(int i = 0; i < count; i++) { - const ustring name = ustring::compose("Panel%1", i); + cuString name = ustring::compose("Panel%1", i); uiManager->add_ui(uiManager->new_merge_id(), "/MenuBar/WindowMenu/WindowShowPanel", name, name); } @@ -334,7 +334,7 @@ Actions::on_menu_track_add() void Actions::on_menu_window_new_window() { - GtkLumiera::application().windowManager().new_window( + GtkLumiera::application().windowManager().newWindow ( workspaceWindow.get_project(), workspaceWindow.get_controller()); } @@ -361,11 +361,11 @@ Actions::on_menu_help_about() AboutDialog dialog; //dialog.set_program_name(AppTitle); - dialog.set_version(GtkLumiera::get_app_version()); + dialog.set_version(GtkLumiera::getAppVersion()); //dialog.set_version(AppState::get("version")); - dialog.set_copyright(GtkLumiera::get_app_copyright()); - dialog.set_website(GtkLumiera::get_app_website()); - dialog.set_authors(GtkLumiera::get_app_authors()); + dialog.set_copyright(GtkLumiera::getCopyright()); + dialog.set_website(GtkLumiera::getLumieraWebsite()); + dialog.set_authors(GtkLumiera::getLumieraAuthors()); dialog.set_transient_for(workspaceWindow);