bakery r119 - in trunk: . bakery/App



Author: murrayc
Date: Mon Dec  8 17:28:38 2008
New Revision: 119
URL: http://svn.gnome.org/viewvc/bakery?rev=119&view=rev

Log:
2008-12-08  Murray Cumming  <murrayc murrayc com>

* bakery/App/App_WithDoc.cc: open_document(): When storing the 
recently-opened document, get the URI again, in case it has changed 
during the load, for instance if it was a template file that was 
resaved. This makes recent-documents work in Glom when creating a neww 
file from a template.

Modified:
   trunk/ChangeLog
   trunk/bakery/App/App_WithDoc.cc

Modified: trunk/bakery/App/App_WithDoc.cc
==============================================================================
--- trunk/bakery/App/App_WithDoc.cc	(original)
+++ trunk/bakery/App/App_WithDoc.cc	Mon Dec  8 17:28:38 2008
@@ -174,7 +174,10 @@
         set_document_modified(false); //disables menu and toolbar Save items.
 
         //Update document history list:
-        document_history_add(file_uri);
+        //(Getting the file URI again, in case it has changed while being opened, 
+        //for instance if it was a template file that was saved as a real file.)
+        if(pApp->m_pDocument)
+          document_history_add(pApp->m_pDocument->get_file_uri());
 
         return true; //success.
       }



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