[gtkmm-documentation] Base example: Try to use Gtk::Application instead of Gtk::Main.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm-documentation] Base example: Try to use Gtk::Application instead of Gtk::Main.
- Date: Wed, 19 Jan 2011 09:46:07 +0000 (UTC)
commit 4ff46b9190ce0fbce155340b07a80083d29e6462
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Jan 19 10:45:55 2011 +0100
Base example: Try to use Gtk::Application instead of Gtk::Main.
* examples/book/base/base.cc: Replace Gtk::Main with Gtk::Application,
though run() does not seem to return when the window is closed.
ChangeLog | 7 +++++++
examples/book/base/base.cc | 8 ++++----
2 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 802d060..a002628 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-01-19 Murray Cumming <murrayc murrayc com>
+
+ Base example: Try to use Gtk::Application instead of Gtk::Main.
+
+ * examples/book/base/base.cc: Replace Gtk::Main with Gtk::Application,
+ though run() does not seem to return when the window is closed.
+
2011-01-18 Murray Cumming <murrayc murrayc com>
Application example: Use ExampleApplication via RefPtr.
diff --git a/examples/book/base/base.cc b/examples/book/base/base.cc
index bc70383..676bde2 100644
--- a/examples/book/base/base.cc
+++ b/examples/book/base/base.cc
@@ -2,11 +2,11 @@
int main(int argc, char *argv[])
{
- Gtk::Main kit(argc, argv);
+ Glib::RefPtr<Gtk::Application> app =
+ Gtk::Application::create(argc, argv,
+ "org.gtkmm.examples.base");
Gtk::Window window;
- Gtk::Main::run(window);
-
- return 0;
+ return app->run(window);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]