diff --git a/gui/gui.cpp b/gui/gui.cpp index 6af17beb..2827935b 100644 --- a/gui/gui.cpp +++ b/gui/gui.cpp @@ -211,7 +211,7 @@ Gtk::Window *setup_gui() /* Keyboard shortcuts */ - Gtk::Window *window = lib :: get_widget("o_window"); + Gtk::Window *window = window_init(); window->signal_key_press_event().connect(sigc::ptr_fun(on_window_key_pressed)); window->signal_key_release_event().connect(sigc::ptr_fun(on_window_key_released)); diff --git a/gui/window.cpp b/gui/window.cpp new file mode 100644 index 00000000..ae3b9954 --- /dev/null +++ b/gui/window.cpp @@ -0,0 +1,16 @@ +/* + * Copyright 2014 (c) Anna Schumaker. + */ +#include +#include + +const std::string appname = "Ocarina "; + +Gtk::Window *window_init() +{ + Gtk::Window *window = lib :: get_widget("o_window"); + + window->set_title(appname + get_version()); + + return window; +} diff --git a/include/gui/ocarina.h b/include/gui/ocarina.h index 2b07d968..0df707a1 100644 --- a/include/gui/ocarina.h +++ b/include/gui/ocarina.h @@ -24,6 +24,11 @@ Gtk::Window *setup_gui(); void on_pq_created(Queue *, unsigned int); void post_init_queue_tabs(); + +/* window.cpp */ +Gtk::Window *window_init(); + + #ifdef CONFIG_TEST void do_collection_delete(); void on_collection_toggled(const Glib::ustring &);