gui/window: Switch to C-style gtk widgets
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
066d27a240
commit
0c8bcfa552
|
@ -10,6 +10,7 @@ extern "C" {
|
|||
}
|
||||
#include <gui/ocarina.h>
|
||||
#include <gui/tabs.h>
|
||||
#include <gui/window.h>
|
||||
|
||||
|
||||
static std::string ocarina_dir = "";
|
||||
|
@ -63,14 +64,15 @@ int main(int argc, char **argv)
|
|||
|
||||
core_init(&argc, &argv, &init_data);
|
||||
gui_settings_init();
|
||||
gui_window_init(gui :: share_file("ocarina.png").c_str());
|
||||
gui_audio_init();
|
||||
|
||||
plist :: init();
|
||||
manager :: init();
|
||||
init_tabs();
|
||||
window = window_init();
|
||||
post_init_tabs();
|
||||
|
||||
window = Glib :: wrap(GTK_WINDOW(gui_builder_widget("o_window")), false);
|
||||
ocarina_app->signal_window_removed().connect(sigc::ptr_fun(on_window_removed));
|
||||
ocarina_app->run(*window, argc, argv);
|
||||
core_deinit();
|
||||
|
|
|
@ -2,22 +2,17 @@
|
|||
* Copyright 2014 (c) Anna Schumaker.
|
||||
*/
|
||||
extern "C" {
|
||||
#include <core/audio.h>
|
||||
#include <core/tempq.h>
|
||||
#include <core/version.h>
|
||||
#include <gui/builder.h>
|
||||
}
|
||||
#include <gui/ocarina.h>
|
||||
#include <gui/tabs.h>
|
||||
|
||||
const std::string appname = "Ocarina ";
|
||||
|
||||
Gtk::Window *window_init()
|
||||
void gui_window_init(const gchar *icon)
|
||||
{
|
||||
Gtk::Window *window = Glib :: wrap(GTK_WINDOW(gui_builder_widget("o_window")), false);
|
||||
GtkWindow *window = GTK_WINDOW(gui_builder_widget("o_window"));
|
||||
|
||||
window->set_title(appname + get_version());
|
||||
window->set_icon_from_file(gui :: share_file("ocarina.png"));
|
||||
|
||||
return window;
|
||||
gtk_window_set_title(window, (appname + get_version()).c_str());
|
||||
gtk_window_set_icon_from_file(window, icon, NULL);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,4 @@ namespace plist
|
|||
}
|
||||
|
||||
|
||||
/* window.cpp */
|
||||
Gtk::Window *window_init();
|
||||
|
||||
#endif /* OCARINA_H */
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* Copyright 2015 (c) Anna Schumaker.
|
||||
*/
|
||||
#ifndef OCARINA_GUI_WINDOW_H
|
||||
#define OCARINA_GUI_WINDOW_H
|
||||
|
||||
/* Called to initialize the main window. */
|
||||
void gui_window_init(const gchar *);
|
||||
|
||||
#endif /* OCARINA_GUI_WINDOW_H */
|
Loading…
Reference in New Issue