[regexxer] Use Gtk::Application & Gtk::ApplicationWindow
- From: Fabien Parent <fparent src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [regexxer] Use Gtk::Application & Gtk::ApplicationWindow
- Date: Sun, 23 Feb 2014 13:33:09 +0000 (UTC)
commit cde8995c415bdc7182ca97924fd183cda1a1d79a
Author: Fabien Parent <parent f gmail com>
Date: Sat Feb 22 22:15:21 2014 +0100
Use Gtk::Application & Gtk::ApplicationWindow
src/main.cc | 6 ++++--
ui/mainwindow.ui | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/main.cc b/src/main.cc
index 851f789..d57753a 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -202,7 +202,9 @@ int main(int argc, char** argv)
Util::initialize_gettext(PACKAGE_TARNAME, REGEXXER_LOCALEDIR);
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();
Gio::init();
@@ -215,7 +217,7 @@ int main(int argc, char** argv)
window.initialize(options->init_state());
options.reset();
- Gtk::Main::run(*window.get_window());
+ app->run(*window.get_window());
return 0;
}
diff --git a/ui/mainwindow.ui b/ui/mainwindow.ui
index 99846a5..8b65381 100644
--- a/ui/mainwindow.ui
+++ b/ui/mainwindow.ui
@@ -3,7 +3,7 @@
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkAccelGroup" id="mainwindow_accelgroup"/>
- <object class="GtkWindow" id="mainwindow">
+ <object class="GtkApplicationWindow" id="mainwindow">
<property name="can_focus">False</property>
<property name="default_width">640</property>
<property name="default_height">480</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]