gui: Begin breaking out window code
I think this will help with maintainability. We'll see ... Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
5c2bd9231d
commit
9b98788106
|
@ -211,7 +211,7 @@ Gtk::Window *setup_gui()
|
|||
|
||||
|
||||
/* Keyboard shortcuts */
|
||||
Gtk::Window *window = lib :: get_widget<Gtk::Window>("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));
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright 2014 (c) Anna Schumaker.
|
||||
*/
|
||||
#include <core/version.h>
|
||||
#include <gui/ocarina.h>
|
||||
|
||||
const std::string appname = "Ocarina ";
|
||||
|
||||
Gtk::Window *window_init()
|
||||
{
|
||||
Gtk::Window *window = lib :: get_widget<Gtk::Window>("o_window");
|
||||
|
||||
window->set_title(appname + get_version());
|
||||
|
||||
return window;
|
||||
}
|
|
@ -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 &);
|
||||
|
|
Loading…
Reference in New Issue