[gtkmm-documentation] Simple application example: Fix a typo.



commit ec12e3ba75e5710131cc55a7269a3bc4e3b53a93
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Aug 3 11:02:10 2011 +0200

    Simple application example: Fix a typo.
    
    	* examples/book/application/simple/exampleapplication.cc: on_open():
    	Use the i iterator, instead of 0.

 ChangeLog                                          |    7 +++++++
 .../book/application/simple/exampleapplication.cc  |    4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b45afcb..27f91c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-08-03  Murray Cumming  <murrayc murrayc com>
+
+	Simple application example: Fix a typo.
+
+	* examples/book/application/simple/exampleapplication.cc: on_open():
+	Use the i iterator, instead of 0.
+
 2011-03-24  Murray Cumming  <murrayc murrayc com>
 
   Add back use of Gtk::Application so we can finish it.
diff --git a/examples/book/application/simple/exampleapplication.cc b/examples/book/application/simple/exampleapplication.cc
index 245b635..3c488fd 100644
--- a/examples/book/application/simple/exampleapplication.cc
+++ b/examples/book/application/simple/exampleapplication.cc
@@ -44,7 +44,7 @@ void ExampleApplication::create_window(const Glib::RefPtr<Gio::File>& file)
 
   if(!file)
   {
-    //This is probably an new empty file, as a result of an activation rather
+    //This is probably a new empty file, as a result of an activation rather
     //than an open.
     return;
   }
@@ -76,7 +76,7 @@ void ExampleApplication::on_open(const Gio::Application::type_vec_files& files,
   //std::cout << "debug: files.size()=" << files.size() << std::endl;
   for(guint i = 0; i < files.size(); i++)
   {
-    Glib::RefPtr<Gio::File> file = files[0];
+    Glib::RefPtr<Gio::File> file = files[i];
     if(!file)
     {
       std::cerr << G_STRFUNC << ": file is null." << std::endl;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]