[gtkmm-documentation] Application examples: Minor clarification.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm-documentation] Application examples: Minor clarification.
- Date: Mon, 13 Feb 2012 09:45:08 +0000 (UTC)
commit 8ca0c280dcb69bbb4ddec9d2e09e2ec5d3d1f966
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Feb 13 10:44:29 2012 +0100
Application examples: Minor clarification.
* examples/book/application/command_line_handling/exampleapplication.cc:
* examples/book/application/simple/exampleapplication.cc: on_open():
When calling the base class implementation, specify Gtk::Applicaition in
full, to avoid ambiguity when people take this example and rename the class
to their own namespaces Application class.
ChangeLog | 10 ++++++++++
.../command_line_handling/exampleapplication.cc | 3 ++-
.../book/application/simple/exampleapplication.cc | 3 ++-
3 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 146c1cb..c32ed9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2012-02-13 Murray Cumming <murrayc murrayc com>
+ Application examples: Minor clarification.
+
+ * examples/book/application/command_line_handling/exampleapplication.cc:
+ * examples/book/application/simple/exampleapplication.cc: on_open():
+ When calling the base class implementation, specify Gtk::Applicaition in
+ full, to avoid ambiguity when people take this example and rename the class
+ to their own namespaces Application class.
+
+2012-02-13 Murray Cumming <murrayc murrayc com>
+
Application examples: Remove the need for Gtk::Main.
* examples/book/application/command_line_handling/exampleapplication.cc:
diff --git a/examples/book/application/command_line_handling/exampleapplication.cc b/examples/book/application/command_line_handling/exampleapplication.cc
index 1499e0c..790a626 100644
--- a/examples/book/application/command_line_handling/exampleapplication.cc
+++ b/examples/book/application/command_line_handling/exampleapplication.cc
@@ -89,7 +89,8 @@ void ExampleApplication::on_open(const Gio::Application::type_vec_files& files,
create_window(file);
}
- Application::on_open(files, hint);
+ //Call the base class's implementation:
+ Gtk::Application::on_open(files, hint);
}
int ExampleApplication::on_command_line(const Glib::RefPtr<Gio::ApplicationCommandLine>& command_line)
diff --git a/examples/book/application/simple/exampleapplication.cc b/examples/book/application/simple/exampleapplication.cc
index 23ef3c0..8691dae 100644
--- a/examples/book/application/simple/exampleapplication.cc
+++ b/examples/book/application/simple/exampleapplication.cc
@@ -87,5 +87,6 @@ void ExampleApplication::on_open(const Gio::Application::type_vec_files& files,
create_window(file);
}
- Application::on_open(files, hint);
+ //Call the base class's implementation:
+ Gtk::Application::on_open(files, hint);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]