[glom] Recent Files: Make sure that we remember these for saved-from-example files.



commit 22608f6584e658566dffd332eb454a734b844a7f
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Apr 7 16:46:48 2010 +0200

    Recent Files: Make sure that we remember these for saved-from-example files.
    
    * glom/application.cc: on_document_load(): Add an extra call to
        document_history_add() after successfully saving from an example.

 ChangeLog           |    7 +++++++
 glom/application.cc |    6 ++++--
 2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0943a08..6056374 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-04-07  Murray Cumming  <murrayc murrayc com>
+
+    Recent Files: Make sure that we remember these for saved-from-example files.
+
+	* glom/application.cc: on_document_load(): Add an extra call to 
+    document_history_add() after successfully saving from an example.
+
 2010-04-07  Daniel Borgmann  <danielb openismus com>
 
 	Find bar adjustments.
diff --git a/glom/application.cc b/glom/application.cc
index a5d843c..6716e77 100644
--- a/glom/application.cc
+++ b/glom/application.cc
@@ -1207,9 +1207,11 @@ bool Application::on_document_load()
       //Switch to operator mode when opening new documents:
       pDocument->set_userlevel(AppState::USERLEVEL_OPERATOR);
 
+      //Make sure that it's saved in history, even if it was saved from an example file:
+      document_history_add(pDocument->get_file_uri());
+
       //Open default table, or show list of tables instead:
       m_pFrame->do_menu_Navigate_Table(true /* open the default if there is one */);
-
     }
   }
 
@@ -1539,7 +1541,7 @@ void Application::existing_or_new_new()
         m_pFrame->set_databases_selected(database_name_used);
 
         // Add the document to recent files
-	document_history_add(document->get_file_uri());
+	    document_history_add(document->get_file_uri());
       }
       else
       {



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