gui/window: Add gui_window_deinit()
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
29985d2a69
commit
0c214dd1a9
|
@ -75,8 +75,12 @@ int main(int argc, char **argv)
|
|||
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();
|
||||
cleanup_tabs();
|
||||
gui_window_deinit();
|
||||
gui_settings_deinit();
|
||||
//gui_builder_deinit();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -15,3 +15,8 @@ void gui_window_init(const gchar *icon)
|
|||
|
||||
g_free(title);
|
||||
}
|
||||
|
||||
void gui_window_deinit()
|
||||
{
|
||||
gtk_widget_destroy(gui_builder_widget("o_window"));
|
||||
}
|
||||
|
|
|
@ -7,4 +7,7 @@
|
|||
/* Called to initialize the main window. */
|
||||
void gui_window_init(const gchar *);
|
||||
|
||||
/* Called to deinitialize the main window. */
|
||||
void gui_window_deinit();
|
||||
|
||||
#endif /* OCARINA_GUI_WINDOW_H */
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <core/string.h>
|
||||
#include <gui/audio.h>
|
||||
#include <gui/builder.h>
|
||||
#include <gui/window.h>
|
||||
#include <tests/test.h>
|
||||
|
||||
struct core_init_data init_data = {
|
||||
|
@ -129,6 +130,7 @@ static void test_audio()
|
|||
test_equal(audio_cur_state(), GST_STATE_PAUSED);
|
||||
test_equal(audio_position(), 0);
|
||||
|
||||
gui_window_deinit();
|
||||
gui_builder_deinit();
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ static void test_window()
|
|||
window = GTK_WINDOW(gui_builder_widget("o_window"));
|
||||
test_equal(gtk_window_get_title(window), "Ocarina " CONFIG_VERSION);
|
||||
|
||||
gui_window_deinit();
|
||||
gui_builder_deinit();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue