gui: Use Gtk::Application() instead of Gtk::Main()

Gtk::Main() is deprecated, and causes several warnings to show up when
closing Ocarina.  I guess it's time to switch to Gtk::Application()!

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2014-10-29 18:07:43 -04:00
parent 979de94712
commit 1be4c57244
1 changed files with 3 additions and 2 deletions

View File

@ -19,9 +19,10 @@ Gtk::Window *ocarina_init(int *argc, char ***argv)
#ifndef CONFIG_TEST
int main(int argc, char **argv)
{
Gtk::Main ocarina(&argc, &argv);
Glib::RefPtr<Gtk::Application> ocarina = Gtk::Application::create(argc, argv, "ocarina");
Gtk::Window *window = ocarina_init(&argc, &argv);
Gtk::Main::run(*window);
ocarina->run(*window);
cleanup_tabs();
return 0;
}