Commit cde8995c authored by Fabien Parent's avatar Fabien Parent
Browse files

Use Gtk::Application & Gtk::ApplicationWindow

parent 107c71d6
...@@ -202,7 +202,9 @@ int main(int argc, char** argv) ...@@ -202,7 +202,9 @@ int main(int argc, char** argv)
Util::initialize_gettext(PACKAGE_TARNAME, REGEXXER_LOCALEDIR); Util::initialize_gettext(PACKAGE_TARNAME, REGEXXER_LOCALEDIR);
std::auto_ptr<RegexxerOptions> options = RegexxerOptions::create(); std::auto_ptr<RegexxerOptions> options = RegexxerOptions::create();
Gtk::Main main_instance (argc, argv, options->context()); options->context().parse(argc, argv);
Glib::RefPtr<Gtk::Application> app =
Gtk::Application::create(argc, argv, Regexxer::conf_schema);
Gsv::init(); Gsv::init();
Gio::init(); Gio::init();
...@@ -215,7 +217,7 @@ int main(int argc, char** argv) ...@@ -215,7 +217,7 @@ int main(int argc, char** argv)
window.initialize(options->init_state()); window.initialize(options->init_state());
options.reset(); options.reset();
Gtk::Main::run(*window.get_window()); app->run(*window.get_window());
return 0; return 0;
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<interface> <interface>
<requires lib="gtk+" version="3.0"/> <requires lib="gtk+" version="3.0"/>
<object class="GtkAccelGroup" id="mainwindow_accelgroup"/> <object class="GtkAccelGroup" id="mainwindow_accelgroup"/>
<object class="GtkWindow" id="mainwindow"> <object class="GtkApplicationWindow" id="mainwindow">
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="default_width">640</property> <property name="default_width">640</property>
<property name="default_height">480</property> <property name="default_height">480</property>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment