[gtkmm-documentation] Application examples: Remove the need for Gtk::Main.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm-documentation] Application examples: Remove the need for Gtk::Main.
- Date: Mon, 13 Feb 2012 09:45:03 +0000 (UTC)
commit 5cc67dcef39fa4eea28d894baf8c7a304ab9022a
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Feb 13 10:41:57 2012 +0100
Application examples: Remove the need for Gtk::Main.
* examples/book/application/command_line_handling/exampleapplication.cc:
* examples/book/application/command_line_handling/main.cc:
* examples/book/application/simple/exampleapplication.cc:
* examples/book/application/simple/main.cc: Use the new init_gtkmm() method
in the create() methods, and remove the calls to Gtk::Main() from main().
ChangeLog | 10 ++++++++++
.../command_line_handling/exampleapplication.cc | 2 ++
.../book/application/command_line_handling/main.cc | 2 --
.../book/application/simple/exampleapplication.cc | 2 ++
examples/book/application/simple/main.cc | 2 --
5 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 02b24e2..146c1cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-02-13 Murray Cumming <murrayc murrayc com>
+
+ Application examples: Remove the need for Gtk::Main.
+
+ * examples/book/application/command_line_handling/exampleapplication.cc:
+ * examples/book/application/command_line_handling/main.cc:
+ * examples/book/application/simple/exampleapplication.cc:
+ * examples/book/application/simple/main.cc: Use the new init_gtkmm() method
+ in the create() methods, and remove the calls to Gtk::Main() from main().
+
2012-01-30 Pedro Ferreira <darkiiiiii gmail com>
Keyboard Events chapter: Clarify keyboard event propagation.
diff --git a/examples/book/application/command_line_handling/exampleapplication.cc b/examples/book/application/command_line_handling/exampleapplication.cc
index 49cfa93..1499e0c 100644
--- a/examples/book/application/command_line_handling/exampleapplication.cc
+++ b/examples/book/application/command_line_handling/exampleapplication.cc
@@ -27,6 +27,8 @@ ExampleApplication::ExampleApplication()
Glib::RefPtr<ExampleApplication> ExampleApplication::create()
{
+ init_gtkmm();
+
return Glib::RefPtr<ExampleApplication>( new ExampleApplication() );
}
diff --git a/examples/book/application/command_line_handling/main.cc b/examples/book/application/command_line_handling/main.cc
index 05fdad7..21f253b 100644
--- a/examples/book/application/command_line_handling/main.cc
+++ b/examples/book/application/command_line_handling/main.cc
@@ -21,8 +21,6 @@
int main(int argc, char *argv[])
{
- Gtk::Main kit(argc, argv); //TODO: Make this unnecessary: Put it in Gtk::Application.
-
Glib::RefPtr<ExampleApplication> application =
ExampleApplication::create();
diff --git a/examples/book/application/simple/exampleapplication.cc b/examples/book/application/simple/exampleapplication.cc
index 3c488fd..23ef3c0 100644
--- a/examples/book/application/simple/exampleapplication.cc
+++ b/examples/book/application/simple/exampleapplication.cc
@@ -25,6 +25,8 @@ ExampleApplication::ExampleApplication()
Glib::RefPtr<ExampleApplication> ExampleApplication::create()
{
+ init_gtkmm();
+
return Glib::RefPtr<ExampleApplication>( new ExampleApplication() );
}
diff --git a/examples/book/application/simple/main.cc b/examples/book/application/simple/main.cc
index 05fdad7..21f253b 100644
--- a/examples/book/application/simple/main.cc
+++ b/examples/book/application/simple/main.cc
@@ -21,8 +21,6 @@
int main(int argc, char *argv[])
{
- Gtk::Main kit(argc, argv); //TODO: Make this unnecessary: Put it in Gtk::Application.
-
Glib::RefPtr<ExampleApplication> application =
ExampleApplication::create();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]